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

nRF51822 UART maximum speed without flow control

I am using the nRF51822 in an application where I want to run the UART as fast as possible to communicate with a host processor. I have been able to get reliable communication with the host processor up to 115,200 baud.

However when I try to go up to 230,400, 250,000, or 460,800 baud, on reception I always get framing errors on each byte. I have looked at the incoming receive signal with a logic analyzer and the bit times for these three baud rates seem correct and are accurately decoded by the logic analyzer. I have not verified transmit from the nRF51822 at these higher baud rates yet, as it will require some hacking to the protocol and I wanted to figure out the receive issue first.

I am using SDK 11.0 and the nrf_drv_uart code to handle the UART transmission (actually, app_uart which uses that driver). I am setting baud rates with nrf_uart_baudrate_set() and the NRF_UART_BAUDRATE_* enums as the second argument to that function. I am using an external 32MHz HF crystal and have the HF CLK enabled (via nrf_drv_clock_hfclk_request()) and the following in my nrf_drv_config.h.

#define CLOCK_CONFIG_XTAL_FREQ          NRF_CLOCK_XTALFREQ_32MHz
#define CLOCK_CONFIG_LF_SRC             NRF_CLOCK_LFCLK_Synth
#define CLOCK_CONFIG_IRQ_PRIORITY       APP_IRQ_PRIORITY_LOW

Is there any specific HW issue with running at these higher rates? Is there some other item I should be paying attention to? Could it be that the baud rate values being written to the BAUDRATE hw register are slightly off?

Any help here would be greatly appreciated. Thanks.

Related