2015-03-20 03:39 AM
Hello,
In multiple places in the UART HAL (in all the variants of HAL_UART_Receive) one can find the following code: /* Check if a transmit process is ongoing or not */ if(huart->State == HAL_UART_STATE_BUSY_TX) { huart->State = HAL_UART_STATE_BUSY_TX_RX; } else { huart->State = HAL_UART_STATE_BUSY_RX; } This code may be interrupted in case of completion of transmit buffer, and the interrupt service routine may change the value of huart->State . The above code should be either protected from interrupt or better replaced by an atomic instruction (which seems fairly easy looking at the possible values of huart->state. Gerard2015-04-12 12:23 AM
Could someone from ST confirm if this is a bug, and will be corrected in next HAL version.
Thanks