Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

How to handle delay time when Direct PWM Drive from GPINX w/o HSLI?

How to handle delay time when Direct PWM Drive from GPINX w/o HSLI?

50 replies posted 25 likes received 25 replies posted

GPINx are not intended for PWM transfer to the LED, but are acting only as activators of the output, and the output will produce a pre-defined duty cycle, which is stored on the OTP configuration.

This is explained in the User Manual (Chapter 1.9), and in the Datasheet (Chapter 5.3) as well.

In the GPIN0_MAP and GPIN1_MAP OTP registers are stored which LEDs are turned-on.

The duty cycle that will be observed at the outputs (mapped totthat GPIN) when the GPINx is set to HIGH is determined by the values stored in the DC0_OUTi and DC1_OUTi registers.

So GPINx have 2 options for control:

  1. PWM decoding: meaning that you can use an Input PWM Signal to either Enable or Disable LED output.
    • Interpreting an input PWM Duty Cycle < 25% as OFF, Disabling GPINx Mapped Output
    • Interpreting an input PWM Duty Cycle > 75% as ON, Enabling GPINx Mapped Output 
  2. Not PWM decoding 
    • HIGH => Disabling GPINx Mapped Output 
    • LOW =>Enabling GPINx Mapped Output  

If the PWM decoding option is not selected and a duty cycle is applied at the GPIN0, there may be flickering, as the device will sample the GPIN0 and attempt to randomly switch the output ON (as per the duty cycle specified on DC0_OUTi), and then turn the outputs off.

This sampling /applying stored duty is also the reason why it is seen a delay from the input PWM to the output PWM.