nRF52840 - UARTE dropping 7th character

I'm essentially building a BLE to UART gateway to allow our microcontroller device to talk to our apps.  The BLE section is the nRF52840 and I'm trying to simply use it to pass through the data from the UART (from the microcontroller) to the BLE using the NUS.

For some reason, when the initial data payload comes back from the microcontroller to the nordic is losing the 7th byte.  EVERYTHING beyond that appears to be there, but I don't currently have it properly splitting across multiple packets yet.

I believe that the issue I'm running into is exactly the same one in the below link, but this is using ncs_v2.5.0 and not the older sdk16 or sdk17.
https://devzone.nordicsemi.com/f/nordic-q-a/105313/losing-uart-characters---activating-uart-in-place-of-uarte-in-nrf52840 

Right now I'm at a loss as to where the issue is, other than obviously I'm not getting into the interrupt quickly enough when the data is flowing out.  I've read other forum posts as well which mention various similar aspects, but nothing seemed to ever have a direct fix mentioned other than it was fixed.  I'm at a big loss as to root cause, as I believe the issue exists in my Zephyr and ncs_v2.5.0 setup, as the bare-metal side doesn't have the same issue.  I have scoped the line, and the data IS there, it's just not entering the nordic system to be bypassed.

My project file uses the following configurations with regards to the UARTE and uses flow control.

# Enable the UART driver
CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y
CONFIG_UART_LINE_CTRL=y
CONFIG_NRFX_UARTE0=y
CONFIG_UART_0_ASYNC=y
CONFIG_UART_0_NRF_HW_ASYNC=y
CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2
CONFIG_NRFX_TIMER2=y
  • Thank you for all of the help.

    In addition to the changes in the above post (marked as "verified answer" above), there was some additional logic inserted into the project was causing the system to disable the uart multiple times using uart_rx_disable().  For whatever reason, instead of crashing, the system just took it.  This happened to close and re-open at the time of the 7th character coming in.

Related