Quantcast
Viewing all articles
Browse latest Browse all 262198

Lost characters when using CC2540 USART

I'm trying to read data from the CC2540 USART and send it over BLE. The problem is that I'm losing characters almost immediately. The device writing to the UART is sending 6 bytes at 115200, 8N1. I've also tried 57600 without any success.

I've verified that there's never any lost characters from that side. I've also verified that if I ignore the serial data, and just write a constant incrementing byte stream from the CC2540, through BLE, I don't lose anything.

I'll see about 60 good bytes or so and then I'll lose 10-15 bytes.

I'm using BLE 1.3.

I've checked and I'm not getting any errors like HAL_UART_RX_FULL or HAL_UART_RX_ABOUT_FULL.

I've also dramatically increased the size of the RX DMA buffer to no avail.

I've disabled POWER_SAVING and am using DMA. And I've made sure to disable ClkDivOnHalt and HaltDuringRF with the following lines:

HCI_EXT_HaltDuringRfCmd( HCI_EXT_HALT_DURING_RF_DISABLE );
HCI_EXT_ClkDivOnHaltCmd( HCI_EXT_DISABLE_CLK_DIVIDE_ON_HALT );

Here's some relevant #defines from my project.

HAL_DMA=TRUE
xPOWER_SAVING
xPLUS_BROADCASTER
HAL_LED=TRUE
HAL_UART
HAL_UART_ISR=0
HAL_UART_DMA=1
HAL_UART_USB=0
HAL_UART_RX_FLUSH=FALSE
HAL_UART_DMA_RX_MAX=512
HAL_KEY=FALSE
HAL_LCD=FALSE
HAL_ADC=FALSE
HAL_LED=FALSE
HAL_AES=FALSE
HAL_HID=FALSE

At this point I'm out of ideas...


Viewing all articles
Browse latest Browse all 262198

Trending Articles