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

UART and UARTE state after reset

Hi,

I'm experiencing some UART issues on nRF52832 where it seems like the peripheral is not correctly reset when doing a soft reset.
After a soft reset I expect that the UART peripheral is completely reset but it seems like the RX fifo of the device still contains some bytes.

I'm using flow control and what seems to happen is that the UART RX fifo is filled up either before or during the reset. making the RTS low.

when zephyr 2.2.0 initialized the uart it will clear EVENT_RXDRDY without reading from from RDX. That locks up the RX completely for me
because the uart will keep the RTS low.

I can workaround the issue by fixing the driver with the code below.

	/* Empty the rx fifo for stale bytes */
	while (nrf_uart_event_check(uart0_addr, NRF_UART_EVENT_RXDRDY)) {
		nrf_uart_event_clear(uart0_addr, NRF_UART_EVENT_RXDRDY);
		nrf_uart_rxd_get(uart0_addr);
	}

However this code should not have to exist because the peripheral should be in a good state after the reset.
I've experienced similar issues using the async api with the UARTE peripheral

Can I expect that the peripherals are completely reset after a soft reset or SYSTEM OFF reset?

Related