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
  • Which prescaler and CC? The only register you can write to to modify the baudrate of the UART or UARTE peripheral is the BAUDRATE register, and you should only use values that are described in the register description in the product specification.

    To achieve 941176, write 0x0F000000 (251658240) to the BAUDRATE register as stated in the product specification (typically by setting the sdk_config.h macro for the driver accordingly. Note that if using the UART peripheral instead of UARTE, the value is different (0x0EBED000 = 247386112), which you can also see in the product specification.

Children
Related