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

nrf52832 Uart SDK14

Context : I am using a nrf52832 to communicate via UART to a STM32 on a custom board. I've based my work on the Ble nus service example. Main change from the DK is that i don't have an external 32khz so i enabled NRF_CLOCK_LF_SRC_RC

I recently updated the nrf52832 code from SDK12/s132 version 3.0 to SDK14 /s132 version 5.0 because i had issues with some Android devices.

Problem : The BLE part is doing fine now with all the devices that were causing trouble (advertisement, connection, characteristic reading/writing) but the UART part is now unstable.

Hardware flow control is enabled UART_DEFAULT_CONFIG_HWFC, baudrate is set to 115200. On the SDK14, i've tried UART_EASY_DMA_SUPPORT but it's not working, so i switched to using UART_LEGACY_SUPPORT.

At first, uart communication is good at transmitting / receiving but after a while, the connexion hang and i have to reset the whole board. The uart_event_handle doesn't seems to have a APP_UART_COMMUNICATION_ERROR or APP_UART_FIFO_ERROR event but what happen is a high state on the CTS pin of the nrf52. Also, UART_RX_BUF_SIZE value seems to change the delay/latency after which i have this problem.

After debugging i did get those two info from the uart :

EVENTS_CTS 1 EVENTS_NCTS 1 EVENTS_ERROR 0 ERRORSRC 0

Can someone give me hints on what to look after ?

(already saw devzone.nordicsemi.com/.../ and checked the pinout)

EDIT: the high state is on the RTS pin of the nrf52 not the CTS (blue line is RTS, yellow is RX)

image description

Parents
  • Sorry I didn't took the time to explain all the steps but i though it would take too long to do it. At the same time I did restart from scratch the migration and managed to find the problem.

    As i said, i disabled the easyDma ( #define UART_EASY_DMA_SUPPORT 0 #define UART0_CONFIG_USE_EASY_DMA 0) but what did the trick was commenting the line #define UARTE_PRESENT in nrf52832_peripherals.h. Since then, the uart with HW flow control is working fine at 115200. If anyone have an explanation, i would be glad to hear it. I will set this comment as an answer if no tech tell me i'm wrong.

    Thanks for the support Sigurd !

Reply
  • Sorry I didn't took the time to explain all the steps but i though it would take too long to do it. At the same time I did restart from scratch the migration and managed to find the problem.

    As i said, i disabled the easyDma ( #define UART_EASY_DMA_SUPPORT 0 #define UART0_CONFIG_USE_EASY_DMA 0) but what did the trick was commenting the line #define UARTE_PRESENT in nrf52832_peripherals.h. Since then, the uart with HW flow control is working fine at 115200. If anyone have an explanation, i would be glad to hear it. I will set this comment as an answer if no tech tell me i'm wrong.

    Thanks for the support Sigurd !

Children
No Data
Related