Hi,
I use CM UART module.
If I sometimes send wrong packet and get error bit FE and BE from UART_getRxError().
1. After called below process and the UARTRSR Register still with FE and BE(UART_clearRxError() not work). What is the suggested standard software reset method?
UART_clearRxError( UART0_BASE );
UART_setConfig( UART0_BASE, UART_CLK_FREQ , 921600, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE) );
UART_enableFIFO(UART0_BASE);
UART_setFIFOLevel(UART0_BASE, UART_FIFO_TX1_8, UART_FIFO_RX1_8);
2. Are the addresses of UARTRSR and UARTECR are same as 0x4000C004? The UARTRSR Register in TRM said it's read only. But UARTECR can be write any value to clear status. It's weird.
3. I reference to the SCI SciaRegs.SCICTL1.bit.SWRESET. Calling the SysCtl_resetPeripheral(SYSCTL_PERIPH_RES_UART0) can reset all error status(see below). Is there any risk by the method?
UART_clearRxError( UART0_BASE );
SysCtl_resetPeripheral(SYSCTL_PERIPH_RES_UART0);
UART_setConfig( UART0_BASE, UART_CLK_FREQ , 921600, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE) );
UART_enableFIFO(UART0_BASE);
UART_setFIFOLevel(UART0_BASE, UART_FIFO_TX1_8, UART_FIFO_RX1_8);
Thanks