additional debug output
This commit is contained in:
parent
04405d1b84
commit
b8513b2112
@ -2015,7 +2015,7 @@ HAL_StatusTypeDef HAL_UART_AbortReceive_IT(UART_HandleTypeDef *huart)
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline void dts(uint8_t v) {
|
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 -----------------------------------------------*/
|
/* UART in mode Receiver -----------------------------------------------*/
|
||||||
if (((isrflags & USART_SR_RXNE) != RESET) && ((cr1its & USART_CR1_RXNEIE) != RESET))
|
if (((isrflags & USART_SR_RXNE) != RESET) && ((cr1its & USART_CR1_RXNEIE) != RESET))
|
||||||
{
|
{
|
||||||
|
dts(4);
|
||||||
UART_Receive_IT(huart);
|
UART_Receive_IT(huart);
|
||||||
|
} else {
|
||||||
|
dts(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If Overrun error occurs, or if any error occurs in DMA mode reception,
|
/* 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 */
|
/* Disable the UART DMA Rx request if enabled */
|
||||||
if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR))
|
if (HAL_IS_BIT_SET(huart->Instance->CR3, USART_CR3_DMAR))
|
||||||
{
|
{
|
||||||
dts(4);
|
|
||||||
CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR);
|
CLEAR_BIT(huart->Instance->CR3, USART_CR3_DMAR);
|
||||||
|
|
||||||
/* Abort the UART DMA Rx channel */
|
/* Abort the UART DMA Rx channel */
|
||||||
if (huart->hdmarx != NULL)
|
if (huart->hdmarx != NULL)
|
||||||
{
|
{
|
||||||
dts(5);
|
|
||||||
/* Set the UART DMA Abort callback :
|
/* Set the UART DMA Abort callback :
|
||||||
will lead to call HAL_UART_ErrorCallback() at end of DMA abort procedure */
|
will lead to call HAL_UART_ErrorCallback() at end of DMA abort procedure */
|
||||||
huart->hdmarx->XferAbortCallback = UART_DMAAbortOnError;
|
huart->hdmarx->XferAbortCallback = UART_DMAAbortOnError;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user