This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
#define period 300 //300 cycles -> 200KHz @60MHz CPU
#define period_instr_pwm 120 //512 cycles -> 117k @60MHz CPU
// Configure PWM1 for 200Khz switching Frequency
PWM_1ch_UpDwnCnt_CNF(1, period, 1, 0);
// Configure PWM2 for 200Khz switching Frequency
PWM_1ch_UpDwnCnt_CNF(2, period, 0, 0);
// Configure PWM4 for Instrumentation; 1Mhz switching Frequency
PWM_1ch_UpDwnCnt_CNF(4, period_instr_pwm, 0, 0);
EALLOW;
SysCtrlRegs.PCLKCR1.bit.EPWM7ENCLK = 1; // ePWM7
// Setup TBCLK
EPwm7Regs.TBPRD = 3000; // Set timer period 3000 TBCLKs
EPwm7Regs.TBPHS.half.TBPHS = 0x0000; // Phase is 0
EPwm7Regs.TBCTR = 0x0000; // Clear counter
// Setup counter mode