nRF52840DK uart - 921600 not working

I’m using the nRF52840DK to communicate with a module over uart. My problem is that the module has a baud rate of 921600 and as far as my understanding the nRF52840 is using a baud rate of 941176 when set to 921600.  This leads to my commands (13 bytes) only works around 10-20% of the times, and the data received is not as expected (startbytes etc.).

I have tried using nrf_serial_flush as well but then nothing works. Also tried setting the baud rate manually without succeeding.

Any tips?

Parents Reply
  • The HFXO frequency? Not directly (probing on the crystal will shift the frequency), but you can output a fraction of the frequency using a TIMER and GPIOTE connected via PPI. And then use a frequency counter to measure it.

    That is probably overkill for this, though. A simple way to check if the frequency is sensible (and more than enough for UART) is to just program a BLE peripheral example and try to connect to it. If that works, it must be more or less as it should be, as if not the radio frequency would be too much off.

Children
Related