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

16MHz RC oscillator accurate enough for UART

Hi all

According the nRF51822 Product Specification V3.1, the 16MHz RC oscillator has a tolerance of at most 5% and can be used as clock source for the UART module.

Due to several sources on the internet, the maximum tolerance for a proper UART communication is 4%. This would give 2% to the transmitter and 2% to the receiver.

Therefore, is the RC oscillator really accurate enough? Am I missing something?

Kind regards

Remo

Parents Reply Children
  • What does the use of the hardware flow control have to do with an unaccurate clock source? Even if flow control is used, it could be possible that the bits are sampled/sent erroneous due to the wrong clock, or not?

    We are using 38400 and 115200 without flow control. This means we have to enable the XTAL? If the XTAL is requested with the function sd_clock_hfclk_request(), is guaranteed that the SoftDevice doesn't disable the XTAL by itself?

    Is this "recommendation" documented somewhere? Because I've nothing found in the reference manual and the product specification.

  • Hi Remo,

    You have a point, that the jitter on the RC clock should not have anything to do with flow control. Like I said, this was my experience when using high baudrates. This is not documented anywhere. The highest I tried was 115200. If you do not want to use XTAL and want to use 115200 baud, then make sure that your software handles framing errors.

    correct, softdevice will not explicitly turnoff the XTAL if you use sd_clock_hfclk_request().

  • Just to be sure, you recommend to use the XTAL when using 115200 baud? Because if the RC oscillator of the nRF would have a tolerance of e.g. 4% and the peer device also has a clock tolerance of e.g. 2%, it would not be possible to establish a proper UART communication.

    Is it possible that Nordic adds this to the product specification? Because table 8.3 implies that the RC oscillator can be used without any problems for UART communication.

    Kind regards

  • I will double check this with engineers instead of speaking out my experience. I will come back to you tomorrow Remo.

  • Hi Remo,

    Sorry for late response. UART will work on 1MHz clock which is generated by dividing 16MHz clock. So the clock jitter of 5% also is divided. With UART it will be maximim of 5% of 1MHz. Now there can also be a clock jitter with the external UART(peer) and if the jitter in the peer is in the opposite direction then it will cause communication issues. I have asked the engineering team to add a note about this in the product specification.

Related