NRF52833 uart use 921600 baud NRF_DRV_UART_EVT_ERROR

HI 

        I use SDK 17.0.0 in NRF52833.I test uart by example project  ,the dir is \examples\peripheral\uart\pca10100\blank\arm5_no_packs .

       Modify the baud to 921600 ,and send data to 52833 by serial software. If send data less than 52 bytes,serial software can received the send data from 52833.But send data more than 52 bytes,the serial software not receive any data.By debug,the uart gererated the interrupt  NRF_DRV_UART_EVT_ERROR and enter  uart_error_handle.And  if generate the interrupt  NRF_DRV_UART_EVT_ERROR,52833 not receive all data.

        How to solve this problem?

   

Parents Reply Children
  • You might correct the baud rate divisor in use for 921600 baud, as in the nRF52833 v1.5 datasheet and SDK  v17.1.0 it is incorrect; such a big error (over 2%) can by itself accumulate to generate framing and/or overrun errors. The correct value (my calculation) is below:

    // Quoted values from nRF52833 v1.5 datasheet - "No" means incorrect
    //
    //  --------Calculated-------------------  ---------------Documentation---------------
    //  Required Register      Actual   Error  Register    Required   Actual  Error   Ok?
    //  ======== =========== ======== =======  =========== ======== ======== =======  ====
    //   921600, 0x0EBEE000,  921600, +0.000%  0x0F000000,  921600,  941176, +2.124%,  No,

  • Hi  

        I think the deviation  of baud rate can't cause the problem,because the libuarte project in example project  use 921600 baud is OK.I think the problem is caused by not receiving in time

  • Yes,only modify baud to 921600  and send data more than 52 byte 

  • Hi

    Receiving more than 52 bytes seem to work fine for me, but I made some minor changes to the example to make it easier to run the test. 

    Essentially I use UARTE0 for logging purposes, and enabled UARTE1 with app_uart on a separate set of pins in order to be able to print UART log info without affecting the UART under test. 

    The UARTE1 interfaces is enabled with RX on pin P1.01 and TX on pin P1.02.

    When sending a 53 byte string I see it all received OK in the log.

    <info> app: 54 bytes received: abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz

    Code below:

    Best regards
    Torbjørn

Related