Hi,
I try to modify the RX message of bt_receive_cb, but every time RX receives a string, RESET will occu.
How can I fix this issue?
>Demo code:peripheral_uart (SDK2.0.0)
>Nordic Chip:nRF5340
Any help would be appreciated.
Best Regards,
Lulu
Hi,
I try to modify the RX message of bt_receive_cb, but every time RX receives a string, RESET will occu.
How can I fix this issue?
>Demo code:peripheral_uart (SDK2.0.0)
>Nordic Chip:nRF5340
Any help would be appreciated.
Best Regards,
Lulu
Hi Lulu
I think the problem is that you are trying to do to much in the receive callback directly. The callback function is running in an interrupt context, and it is quite limited what you are able to do directly in the interrupt.
In particular running function calls with a long timeout is very dangerous when running from interrupts.
Possibly it will work if you change the timeout in the uart_tx call to 0, so that the call returns immediately. It seems you already have code in place to push the data to a FIFO, which is the recommended procedure in order to handle the data from thread context later on.
Best regards
Torbjørn
It worked, thank you for your help !
That is good to hear. I will consider the case closed then