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.

eHRPWM on OMAP-L138

Other Parts Discussed in Thread: OMAP-L138

Dear E2E:

Thank you for your help.

I need to use eHRPWM module on OMAP-L138 to generate high range of frequencies.

The lowest required frequency is ~3Hz.

As I found in User Guide (spruh77a) - page 527 - TBCLK prescale is 128*14 = 1792 maximum.

I have SYSCLK2 = 160MHz which is a clock for eHRPWM module. Is this correct?

TBCLK = SYSCLK2/(HSPCLKDIV*CLKDIV) = 160000KHz/1792 = ~89.285KHz. Is it correct?

The maximum value of Time Base period Register = 0xFFFFh = 65535d (page 530)

The minimum eHRPWM output frequency = ~89285Hz/65536 = 1.362Hz. Is this correct?

The minimum eHRPWM output frequency without prescale = 160000KHz/65536 = ~2.44KHz. Is this correct?

The maximum eHRPWM output frequency without prescale is probable = SYSCLK2/2 = 80MHz. Is it correct?

I don't need High Resolution features of eHRPWM module - I just need to generate low output frequencies.

Is all my understanding about eHRPWM module on OMAP-L138 correct?

Thank you,

Boris Ruvinsky

802-877-4978

  • Hi Boris Ruvinsky.

    Boris Ruvinsky said:
    I have SYSCLK2 = 160MHz which is a clock for eHRPWM module. Is this correct?

    SYSCLK2 clk is for eHRPWM and it is 132MHz not 160MHz. This also depends on your PLL settings in your UBL source.  As per 03.21.00.04 release's UBL source, SYSCLK2 is set for 132Mhz.

    TBCLK = SYSCLK2/(HSPCLKDIV*CLKDIV) = 132000KHz/1792 = ~73.66KHz.

    Boris Ruvinsky said:
    The minimum eHRPWM output frequency = ~89285Hz/65536 = 1.362Hz. Is this correct?

    why are you dividing it by 65536 ? It should be 65535 right?

    The minimum eHRPWM output frequency = ~73660Hz/65535 = 1.12Hz.

    The minimum eHRPWM output frequency without prescale = 132000KHz/65535.

    The maximum eHRPWM output frequency without prescale is SYSCLK2/2 .

    Best Regards,

    Akshay


  • Just to clarify:

    As shown in 17.2.3.3, "Calculating PWM Period and Frequency",

    for up count and down count, Tpwm = (TBPRD+1)*tbclk

    for up-and-down count, Tpwm = 2*TBPRD*tbclk.