Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 218853

Forum Post: RE: CCS/TMS320F28335: PWM channel change

$
0
0
I dont see the code that migrates interrupt from PWM1 to PWM4, and that the ADC trigger from PWM1 to PWM4. Am copying the original code here for reference only. You need to 1. change TrigSel for ADC initialization 2. change interrupt on PWM4, change PieVector table assignment, and all associated bits. ================================ // Initialize ADC module ADC_MACRO_INIT(ChSel,TrigSel,ACQPS) // Initialize QEP module .... .... ================================ // Reassign ISRs. EALLOW; // This is needed to write to EALLOW protected registers PieVectTable.EPWM1_INT = &OffsetISR; EDIS; // Enable PIE group 3 interrupt 1 for EPWM1_INT PieCtrlRegs.PIEIER3.bit.INTx1 = 1; // Enable CNT_zero interrupt using EPWM1 Time-base EPwm1Regs.ETSEL.bit.INTEN = 1; // Enable EPWM1INT generation EPwm1Regs.ETSEL.bit.INTSEL = 1; // Enable interrupt CNT_zero event EPwm1Regs.ETPS.bit.INTPRD = 1; // Generate interrupt on the 1st event EPwm1Regs.ETCLR.bit.INT = 1; // Enable more interrupts // Enable CPU INT3 for EPWM1_INT: IER |= M_INT3; ================================== Hope it helps.

Viewing all articles
Browse latest Browse all 218853

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>