how to set center-aligned PWM using davinci in RH850 P1H-C

I am using  davinci  configure PWM  module in RH850 P1H-C,but there is not center algined PWM settings, how to do this?

and is there a way to config GTM module directly

Parents
  • The GTM of the P1x-C does not support the symmetrical/center aligned PWM. You have to calculate the set and clear timing in your software.

  • There not exists the direct way to generate center-aligned PWM in P1x-C series.

    Though the GTM of the P1x-C does not support the configuration of symmetrical/center aligned PWM ,but we could set it in another way.

    We could use belowed feature of GTM to generate a center- alighed PWM.

    For example, we set ATOM0 Chn.0 to be a refenence channel ,the next 3 channels to be the PWM out channels.The reference channel ATOM0 Chn.0 must be configured as picture showes.(in SOMP mode)

    I supposed you were in need of a three-phased PWM.Thus, the next 3 channels should be configured in opposite way.

    CM0 and CM1 of ATOM0 Chn.1 - Chn.3  define the Duty of PWM, while the CN1 of ATOM0 Chn.0 defines the frequency of this PWM.

    The final results act like the pic below.

     

  • thanks!

    but i have not found GTM module in MCAL, so do I have to write my own code?

  • Firstly, if you do not find GTM module in MCAL ,please check your SIP to verify.

    You could code manually in case there is no such module.

Reply Children
No Data