Low power uart timeout causes micro to hang up

Hi, we are using the LPUART in async mode to communicate between an nRF52840 and an nRF9160. Everything works well except when a timeout occurs. I noticed this when the other micro is being bootloaded and the nRF52 tries to communicate with it. It is possible to replicate this using:
1. C:\ncs\v2.2.0\nrf\samples\peripheral\lpuart example
2. nRF52840DK

For this example you need to connect RX and TX together and also the request and response pins. Leave all these pins unconnected to force a timeout.

To me it looks like the following happens:

1. When the example starts, the req pin goes high.
2. After 10 seconds the timer interrupt calls tx_complete (uart_nrf_sw_lpuart.c line 368). This calls pend_req_pin_idle which waits for the line to be high and then make it low.
3. This causes the pin interrupt to trigger, which calls tx_complete a second time. In here it waits forever in a while loop for the pin to be high. Because this is called from an interrupt context it causes the nRF52 to become completely unresponsive.

Can you please give me advice about this?

Parents Reply Children
Related