Other Parts Discussed in Thread: CONTROLSUITE
Tool/software: Code Composer Studio
Hello, experts from TI:
I met a strange problem when using F28335 as MCU of a Motor drive system. My program is almost the same as the example project “HVPM_Sensorless_2833x” in the controlsuite. The only modification is on the initialization of EPWM modules.
According to the 2833x EPWM reference guide, the proper initialization procedure of EPWM modules should be as follows:
1. Enable ePWM module clocks in the PCLKCRx register
2. Set TBCLKSYNC= 0
3. Configure ePWM modules
4. Set TBCLKSYNC=1
However, it turned out that the system cannot enter the ISR (triggered by EPWM) when original initialization codes were modified accordingly. The modification is as follows:
When I commented out the added lines, the system works properly again, this indicated that other codes and the hardware system are OK.
Through several trials I found that the configurations in the PWM_INIT_MACRO(1,2,3,pwm1) macro didn’t effect with initialization codes above, e.g.:
Strangely, I found in the 2833x example project named “epwm_timer_interrupts” that the initialization codes resemble well with my modifications, and this project can work well on the same control board: the ISR counter kept increasing.
Can you please enlighten me the cause of this problem and any possible solution? Thank U in advance.
Best Regards.