diff --git a/cube/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c b/cube/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c index 0064039..b9ca71b 100644 --- a/cube/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c +++ b/cube/Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_uart.c @@ -2015,7 +2015,7 @@ HAL_StatusTypeDef HAL_UART_AbortReceive_IT(UART_HandleTypeDef *huart) } inline void dts(uint8_t v) { - for (uint8_t xx = 0; xx < v; xx++) HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_10); + while (v--) HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_10); } /** @@ -2082,7 +2082,10 @@ dts(3); /* UART in mode Receiver -----------------------------------------------*/ if (((isrflags & USART_SR_RXNE) != RESET) && ((cr1its & USART_CR1_RXNEIE) != RESET)) { + dts(4); UART_Receive_IT(huart); + } else { + dts(5); } /* If Overrun error occurs, or if any error occurs in DMA mode reception, @@ -2098,13 +2101,11 @@ dts(3); /* Disable the UART DMA Rx request if enabled */ if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR)) { -dts(4); CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR); /* Abort the UART DMA Rx channel */ if (huart->hdmarx != NULL) { -dts(5); /* Set the UART DMA Abort callback : will lead to call HAL_UART_ErrorCallback() at end of DMA abort procedure */ huart->hdmarx->XferAbortCallback = UART_DMAAbortOnError;