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

Serial comm stops after 8-10h.

I have developed a custom board with NRF52810 (Rigado), a standalone CAN controller (500 kbaud) and serial communication (57600 baud).


The SW is based on the BLE_APP_UART from SDK 15.3.0, SoftDevice S112, modified with SPI support. The custom board is flashed using the nrf52832 DK and Segger.

The NR52810 runs without external LF crystal (RC only).
The CAN controller uses SPI @4MHz and easy DMA. SPI_DEFAULT_CONFIG_IRQ_PRIORITY set to 3 (from default 6).
The serial communication is for receiving 10Hz GPS data.

The data from the SPI and serial comm are served by interrupt service routines (one for SPI and one for serial comm), and the data are put into global static structs.

The CAN data (from SPI) is transmitted over BLE each 40ms and data from the serial comm is transmitted over BLE each 100ms (app_timers reading the global static structs). Approx 100 bytes in each payload.

Everything is running fine for approx. 8-10h.

However, after 8-10h the serial communication stops (does not receive). The CAN/SPI communication and transmit over BLE runs as normal.

Power cycling my custom board does not help. Sometimes a reflash is needed in order to get the serial comm up and running again. Sometimes it is enough to just attach the nrf52832 DKs VDD, GND, SWD IO and SWD CLK pins to the corresponding pins on my custom board.


Any suggestions to why my serial comm stops after 8-10h?

Any suggestions to why power cycling does not result in a clean boot, resetting the serial comm?

Parents
  • Hi,

    Do you get any error codes in the application when the serial interface stops working? Are you using app_uart_fifo, like it is used in ble_app_uart, or do you use another library/driver for UART?

    Can you provide the state of the registers in the UART(E) peripheral when the device is in the error state? Have you checked the UART lines with a logic analyzer, before and after the issue occurs, to see if there are any changes to the communication between the device?

    Best regards,
    Jørgen

  • Preliminary conclusion: Changed the uart_default_config_priority back to the default config (6). Have tested several runs now. The application runs approximately rock steady. Got 5 comm errors on ~9 million bytes.

    It seems clear that the issues I experienced was due to the fact that the application was not able to handle the uart communication load at comm speed above 38kbaud. I realize there are many tickets regarding the uart communication and the need for EasyDMA, but, as I see it, there are no good solutions yet. 

    I have considered the experimental solution (libuarte), but my gut feeling is that I am not sure that will solve my need for running at 115kbaud (have to use 9 ppi's and one timer on the nr52810) with SoftDevice.

    I have concluded on that I will add the max3107 uart in my hw. The max3107 have spi, 256 byte fifo and the possibility to config to give interrupt on LF as well as on timeout since last byte received.   

Reply
  • Preliminary conclusion: Changed the uart_default_config_priority back to the default config (6). Have tested several runs now. The application runs approximately rock steady. Got 5 comm errors on ~9 million bytes.

    It seems clear that the issues I experienced was due to the fact that the application was not able to handle the uart communication load at comm speed above 38kbaud. I realize there are many tickets regarding the uart communication and the need for EasyDMA, but, as I see it, there are no good solutions yet. 

    I have considered the experimental solution (libuarte), but my gut feeling is that I am not sure that will solve my need for running at 115kbaud (have to use 9 ppi's and one timer on the nr52810) with SoftDevice.

    I have concluded on that I will add the max3107 uart in my hw. The max3107 have spi, 256 byte fifo and the possibility to config to give interrupt on LF as well as on timeout since last byte received.   

Children
No Data
Related