This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

What's the maximum of baud rate supported of UART?

Hi, I have been trying to maximize the baud rate of my uart module, I am using the app_uart layer to control the uart and I have noticed that in your implementation of HCI you have set the baud rate to be 38400, and it is with hardware flow control. So I am guessing that's pretty much the max baud rate you can get without affecting the performance and robustness of the UART and without flow control the expected baud rate should be lower? Since mine UART constantly run into OVERRUN error so I am guessing the baud rate I set is too high?

  • Hi,

    i dont't know if this is helpfull, but when you look in the nrf51_bitfields libary ther ar some baud define

    /* Bits 31..0 : UART baudrate. / #define UART_BAUDRATE_BAUDRATE_Pos (0UL) /!< Position of BAUDRATE field. / #define UART_BAUDRATE_BAUDRATE_Msk (0xFFFFFFFFUL << UART_BAUDRATE_BAUDRATE_Pos) /!< Bit mask of BAUDRATE field. / #define UART_BAUDRATE_BAUDRATE_Baud1200 (0x0004F000UL) /!< 1200 baud. / #define UART_BAUDRATE_BAUDRATE_Baud2400 (0x0009D000UL) /!< 2400 baud. / #define UART_BAUDRATE_BAUDRATE_Baud4800 (0x0013B000UL) /!< 4800 baud. / #define UART_BAUDRATE_BAUDRATE_Baud9600 (0x00275000UL) /!< 9600 baud. / #define UART_BAUDRATE_BAUDRATE_Baud14400 (0x003B0000UL) /!< 14400 baud. / #define UART_BAUDRATE_BAUDRATE_Baud19200 (0x004EA000UL) /!< 19200 baud. / #define UART_BAUDRATE_BAUDRATE_Baud28800 (0x0075F000UL) /!< 28800 baud. / #define UART_BAUDRATE_BAUDRATE_Baud38400 (0x009D5000UL) /!< 38400 baud. / #define UART_BAUDRATE_BAUDRATE_Baud57600 (0x00EBF000UL) /!< 57600 baud. / #define UART_BAUDRATE_BAUDRATE_Baud76800 (0x013A9000UL) /!< 76800 baud. / #define UART_BAUDRATE_BAUDRATE_Baud115200 (0x01D7E000UL) /!< 115200 baud. / #define UART_BAUDRATE_BAUDRATE_Baud230400 (0x03AFB000UL) /!< 230400 baud. / #define UART_BAUDRATE_BAUDRATE_Baud250000 (0x04000000UL) /!< 250000 baud. / #define UART_BAUDRATE_BAUDRATE_Baud460800 (0x075F7000UL) /!< 460800 baud. / #define UART_BAUDRATE_BAUDRATE_Baud921600 (0x0EBEDFA4UL) /!< 921600 baud. / #define UART_BAUDRATE_BAUDRATE_Baud1M (0x10000000UL) /!< 1M baud. */

    maybe you can change the baudrate to one of this value.

    best regards Nils

  • As Nils mentions the UART hardware can go up to 1 Mbaud, but if you use the BLE SoftDevice without any flow control this could lead to lost bytes from the UART peer to the nRF51822.

    When the S110 SoftDevice is running, and is in a connected state, you could have interrupts from the stack in the 1-5ms range depending on the amount of data being exchanged (as of version 5.1.0. of the S110). This means that you need a very low baudrate to be 100% sure that you won't drop any bytes (for comparison 1 byte at 9600 baud takes about 1ms to transmit).

    I think you have to do one of the following to get around this limitation:

    1. Use flow control (preferred)

    2. Use a low baudrate, 9600 baud or less

    3. Have the nRF51822 inform the peer when it is ready to receive data, to avoid the peer sending data when the nRF51822 is interrupted. Using the radio_notification feature it is possible for the nRF51822 to know when an interrupt from the S110 stack is about to occur.

  • Is there a minimal time interval between two radio event? and between two radio event is it guaranteed that the CPU is idle? Cheers.

Related