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.

TMS320F280049: HRPWM SFO question

Part Number: TMS320F280049

Hi BU friends,

Assumptions:(the same as P1913 in TRM)  

TBCLK = 10 ns (100 MHz)
PWM frequency = 1.25 MHz (1/800 ns)
Required PWM duty cycle, PWMDuty = 0.405 (40.5%)
PWM period in terms of coarse steps,
PWMPeriod (800 ns/10 ns)
= 80
Number of MEP steps per coarse step at
180 ps (10 n/180 ps ), MEP_ScaleFactor
= 55
Value to keep CMPAHR within the range of
1-255 and fractional rounding constant
(default value) = 0.5 (0080h in Q8 format)

If we use SFO/auto conversion in background, we only need to write CMPA:CMPAHR:Reserved bits=0x00206600h.

The C2000 will transfer 0x00206600h to 00201600h,right?

(The calculation result is shown in P1913 in 28004x TRM).

Thanks,

Minghan

  • Hi,

    You do not have to calculate "Number of MEP steps per coarse step".
    All you need to do is run SFO() and turn on Auto conversion, you seem to be doing this already.
    For the value to keep CMPAHR you can write 1-255. And  0080h will result in 0.5 duty.

     

    The C2000 will transfer 0x00206600h to 00201600h,right?

    AUTOCONV will automatically scale the CMPAHR based on the MEP_ScaleFactor computed by SFO