Tool/software:
Hi,
We are working on a C2000 MCU, specifically the F280025C, for motor control. We have a CAN bootloader residing in the first 3 sectors of flash. After that, our application code is placed.
During a power cycle, the bootloader runs first, waits for some time, then disables CAN and the timer, and finally jumps to the application. This flow works fine — we updated the firmware using CAN during a power cycle, and the application runs correctly.
Next, we wanted to avoid a power cycle and instead perform a software reset by sending a CAN message to the application. The bootloader runs, and we update the firmware again. However, this time the application does not run correctly — specifically, the PWM outputs are not functioning properly.
After performing a power cycle again (without re flashing the firmware), the application works fine.
Observations:
-
Other peripherals like ADC and I/Os are working correctly.
-
Of the 3 PWM outputs (U, V, W), the V and W phases output correctly.
-
The U phase seems to be using the same comparator value as the V phase. We confirmed this by changing the counter compare values.
We are updating the counter compare values via CAN and reading them back using the getCounterCompare()
function, which returns the correct values.
Details:
-
EPWM frequency: 15 kHz
-
U phase - EPWM4 (GPIO 22, 7)
-
V phase - EPWM1 (GPIO 0, 1)
-
W phase - EPWM6 (GPIO 18, 19)
Counter Compare Values Sent:
-
U: 1666
-
V: 833
-
W: 3000
Counter Compare Values Read Back:
-
U: 1666
-
V: 833
-
W: 3000
We also tried different values, but still, the W phase is fine while the U phase output appears to mirror the V phase.
What could be going wrong here?