and only an MCU restart can bring it back .
After some investigation I found out that this happens if i try to transmit data and at the same time Data is recived .
So to investigate further I added the following C-code and send GLOBAL_STR out from Uart 2
it resulted in the UART being RX Busy all the time even when there is no data on RX , RX voltage is 3.3V and the
Interrupt is not begin triggered , it only change to READY if I disable the RX interrupt I don't know if this is normal behavior .
Code: Select all
// Check UART status
switch (HAL_UART_GetState(&MX_UART_NUMBER_1)) {
case HAL_UART_STATE_RESET:
sprintf(FCV_GLOBAL_STR, "UART State: RESET\r\n");
break;
case HAL_UART_STATE_READY:
sprintf(FCV_GLOBAL_STR, "UART State: READY\r\n");
break;
case HAL_UART_STATE_BUSY:
sprintf(FCV_GLOBAL_STR, "UART State: BUSY\r\n");
break;
case HAL_UART_STATE_BUSY_TX:
sprintf(FCV_GLOBAL_STR, "UART State: BUSY TX\r\n");
break;
case HAL_UART_STATE_BUSY_RX:
sprintf(FCV_GLOBAL_STR, "UART State: BUSY RX\r\n");
break;
case HAL_UART_STATE_BUSY_TX_RX:
sprintf(FCV_GLOBAL_STR, "UART State: BUSY TX RX\r\n");
break;
case HAL_UART_STATE_TIMEOUT:
sprintf(FCV_GLOBAL_STR, "UART State: TIMEOUT\r\n");
break;
case HAL_UART_STATE_ERROR:
sprintf(FCV_GLOBAL_STR, "UART State: ERROR\r\n");
break;
default:
sprintf(FCV_GLOBAL_STR, "UART State: Unknown\r\n");
break;
}
Also would like to point out that the UART in software mode will not work , ( will only transmit data but the RX interrupt will not get
triggered .
Anyone had the same issues ?