Clock skew under temperature for UART and PWM

I am using an nrf52833 with both 32.768 kHz and 32MHz external crystals (identical to the DK). When I go down to -30 deg C, the uart stops working. I believe that this is due to frame errors having to do with clock skew. Interesting enough, when I plug the usb cable (data only), the uart communications started up again.

In order to confirm a clock skew, I used a gpio pin as output of a pwm at 1mSec. I observed an increasing pwm output of 1.03-1.07msec. When usb was plugged in, the pwm output was exactly 1.00msec.

Not sure why this is happening, and why it is not happening when USB is connected?

Parents
  • The 32MHz crystal is quite good at low temperatures but the internal 32MHz clock is affected heavily by both temperature and VDD; VDD is propped up by the USB when it is low due to low battery temperature, and that can correct some of the error in the internal 32MHz clock. Given no mention is made of the UART and PWM clock, note that the UART and PWM clock default to the sloppy internal 32MHz clock and not the external 32MHz crystal. Try enabling HFCLK using the external crystal and the issues should go away.

  • All the defaults were kept, so it sounds like the internal 32MHz clock is being used. How do I enable the HFCLK using the external crystal ? Is there documentation or example on how to do it on ncs ?

    Thank you,

Reply Children
Related