This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PWM is stopping a few seconds after boot

We are ready to go into production and have made several pre-production boards. Now that we have several boards we are finding that some of the Nordic parts (nrf52840) have a condition where the PWM starts up at boot, but then a few seconds later stops transitioning. We only see this in a some of the parts. Most of the parts behave fine and the PWM stays on all the time while power is on. We first noticed that all the parts that behaved badly had the same lot code. So we built some more devices with a different lot code and they are behaving badly also. We are now thinking that the parts that behave the way we want are the minority. 

I'm wonder if there is something in software we need to do or can do to prevent the PWM from shutting off. We have tried re-enabling the PWM frequently, that doesn't fix it. We have also de-inited and re-inited the PWM and that doesn't fix it either. We noticing in the PWM code that there are a few workarounds and maybe these are for devices that behave differently from other devices. These workarounds are called pan73 and m_use_ppi_delay_workaround. 

Does anyone out there have experience with this? We can't release to production without understanding this problem. 

Parents
  • Hi,

    It may be difficult to debug exactly what is the problem here. I assume you are using the app_pwm library, which is not using a dedicated pwm hardware module, but instead use a mix of timers, ppi and gpiote to generate a pwm signal. This was originally intended for the nRF51-series which don't have a pwm hardware module.

    I suggest to use the dedicated PWM module in the nRF52840 instead of the "soft" implementation above. You can find a simple PWM implementation here:
    https://devzone.nordicsemi.com/f/nordic-q-a/28081/is-there-a-simple-example-how-to-set-a-pwm-driver/110654#110654 

    The example was written for the nRF52832, but can also work on the nRF52840 (both have PWM hardware modules).

    As to answer your questions on pan73 and ppi delay workaround, this is a workaround for the nRF51-series and early hardware versions of the nRF52832. It does not have any effect on the nRF52840. If you want to pursue what may be the difference between build codes, it can help to understand which build codes you have found works and fails.

    Best regards,
    Kenneth

Reply
  • Hi,

    It may be difficult to debug exactly what is the problem here. I assume you are using the app_pwm library, which is not using a dedicated pwm hardware module, but instead use a mix of timers, ppi and gpiote to generate a pwm signal. This was originally intended for the nRF51-series which don't have a pwm hardware module.

    I suggest to use the dedicated PWM module in the nRF52840 instead of the "soft" implementation above. You can find a simple PWM implementation here:
    https://devzone.nordicsemi.com/f/nordic-q-a/28081/is-there-a-simple-example-how-to-set-a-pwm-driver/110654#110654 

    The example was written for the nRF52832, but can also work on the nRF52840 (both have PWM hardware modules).

    As to answer your questions on pan73 and ppi delay workaround, this is a workaround for the nRF51-series and early hardware versions of the nRF52832. It does not have any effect on the nRF52840. If you want to pursue what may be the difference between build codes, it can help to understand which build codes you have found works and fails.

    Best regards,
    Kenneth

Children
No Data
Related