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

High frequency PWM shifts phase when radio is active

image description

When setting up a 1Mhz square wave using NRF_PWM on the NRF52 or GPIOTE on the NRF51 while BLE is advertising, the PWM stops when the radio is active. The problem doesn't happen when the frequency is below 6khz. No PWM interrupt is enabled. Is this an unavoidable limitation with high PWM frequencies?

Parents
  • image description image description

    I'm also experiencing this on my nrf52. I can see the advertising events causing the artifacts in the pwm output.

    1. Advertising interval = 125x 0.625 ms = 78 ms
    2. Advertising interval = 250 x 0.625 ms = 156 ms

    This might be caused by the BLE-event requesting a clock change from RC to XTAL.

    sd_clock_hfclk_request() did the trick in my case.

  • I am not able to reproduce it here yet, tried on several boards, but no glitch in the PWM.

    Starting the crstyal with sd_clock_hfclk_request() will be the current workaround, there are no drawbacks with doing this other than an increase in current consumption, see here. Running from the crystal will also get higher accuracy (20 ppm crystal on DK vs 1.5% typical for internal oscillator). I will update when I have been able to reproduce this and know more.

    Could you attach a higher resolution picture showing the artifacts more closely so I can see the timing and such (upload the file to the answer)? You are using nRF52 DK? Which version or which version of the chip?

Reply
  • I am not able to reproduce it here yet, tried on several boards, but no glitch in the PWM.

    Starting the crstyal with sd_clock_hfclk_request() will be the current workaround, there are no drawbacks with doing this other than an increase in current consumption, see here. Running from the crystal will also get higher accuracy (20 ppm crystal on DK vs 1.5% typical for internal oscillator). I will update when I have been able to reproduce this and know more.

    Could you attach a higher resolution picture showing the artifacts more closely so I can see the timing and such (upload the file to the answer)? You are using nRF52 DK? Which version or which version of the chip?

Children
No Data
Related