2017-02-24 02:30 AM
Hi There seems to be a bug in the uart driver for the STM32L0, STM32F7 and STM32F4 but
not
for the STM32L1The bug is that you can't send while receiving on the uart:
The code for STM32L0, STM32F7 and STM32F4:
HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
{ /* Check that a Tx process is not already ongoing */ if(huart->gState == HAL_UART_STATE_READY) {The Code for the STM32L1
HAL_StatusTypeDef HAL_UART_Transmit_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
{ uint32_t tmp_state = 0;tmp_state = huart->State;
if((tmp_state == HAL_UART_STATE_READY) || (tmp_state == HAL_UART_STATE_BUSY_RX)) {or in overall, you can't use the RX if you are using TX and the other way around.
In my case I'm using (
STM32L0
) DMA RX and that is all ways in use, so it is not possible for me to TX.#cubemx
#uart