HI DEV
Currently we found a UART Frame error on customer product:
Application scenario diagram
Figure1
nrf52820 ,SDK17.02, softdevice:S132 , gap event length=6*1.25ms =7.5ms
Issue description:
When user production working on above scenario, sometime the uarte RX will miss some data.
The detail could be show as below. And after debugging we found it will have uarte communication error / frame error.
Picture1 red highlight part is the correct data
Picture2 the red highlight part shows error data
For picture1 correct data like below :
68 1C 00 C3 05 08 93 33 00 00 00 00 22 A3 85 01 DC 20 00 02 01 01 12 08 B3 00 00 D5 BE 16
For picture2 error data like below :
68 1C 00 C3 05 08 93 33 00 00 00 00 22 A3 85 01 E3 20 00 02 01 01 12 08 82 00 00 missing byte1 missing byte2 16
What we did:
- We have change the UARTE to libuarte, but this issue still happen.
- The project only have BLE, RTC and UARTE, we set the uarte interrupt as the highest priority but the issue still happen.
- We try to set stop bits as one stop bits & two stop bits, the issue still happen.
4. we use other uart module to test the uart communication, there is no issue happen. when change back to nrf52820 and working on figure1 status the issue is happen.
Picture3
What we suspect:
1. since uarte and BLE both will use the hfclk, and the this issue only happen will 5 BLE connection(see figure 1).do we have some specical ceritaria for using function "sd_clock_hfclk_request()" ?
is it ok for below sequence to call function sd_clock_hfclk_request() ?
Picture4 Com_Init(): the uarte init , BLE_Init: ble stack init
Our question :
1. uart event error handler
we try to add the bleow code in UART error handler , but the issue still happen.
we want to know, when the error handler capture the APP_UART_COMMUNICATION_ERROR, does it means uarte RX data is incorrect?
Picture5
BR