Hi,
I am currently using the NRF52840 in a 2 MCU setting (2nd MCU is from STM). UART0 is connected to the PC while UART1 is connected to the second MCU for communication. I currently experience the problem that I sometimes receive a UART_RX_DISABLED event from Zephyr if the second MCU is resetted while a message is being received on the NRF52840. I can also reproduce the problem by removing the jumper for the RX pin while receiving.
When I receive the UART_RX_DISABLED event I try to reenable the UART which works, but after the reenable it seems the UART is a bit unstable since my messages then have corrupted bytes which are detected by a CRC check in my messages. The UART stays unstable until I reset the NRF52840. Resetting the second MCU does not help.
Is there a way to avoid this problem or completely reset the UART in Zephyr to recover from it?
My device tree is
uartIpc: &uart1 { compatible = "nordic,nrf-uarte"; status = "okay"; current-speed = <115200>; data-bits = <8>; stop-bits = "1"; parity = "even"; pinctrl-0 = <&uart1_ipc>; pinctrl-names = "default"; }; &pinctrl { uart1_ipc: uart1_ipc { group1 { psels = <NRF_PSEL(UART_TX, 0, 14)>; bias-pull-up; }; group2 { psels = <NRF_PSEL(UART_RX, 0, 15)>; bias-pull-up; }; }; };
Thank you in advance
Antek