cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable the HAL_UARTEx_RxEventCallback function.

Junde
Senior II

Hi, I am using cubeMx generate the STM32F302VE project, which for receiving the usart1 date by DMA circual mode.

My config as below:

  1. enable DMA, but disable DMA interrupt;
  2. enable USART1, and enable UART_IT_IDLE;

Now, the project can enter the "USART1_IRQHandler()", but can't run to "__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF);", because "huart->ReceptionType != HAL_UART_RECEPTION_TOIDLE". Details can refer the attachment and the following picture.

0693W00000aHiFSQA0.png

1 ACCEPTED SOLUTION

Accepted Solutions
Junde
Senior II

Hi, I already know what's the reason of this question.

I shoud call HAL_UARTEx_ReceiveToIdle_DMA() which is declaration in "stm32f3xx_hal_uart_ex.h" replace the HAL_UART_Receive_DMA().

View solution in original post

2 REPLIES 2
Junde
Senior II

Hi, I already know what's the reason of this question.

I shoud call HAL_UARTEx_ReceiveToIdle_DMA() which is declaration in "stm32f3xx_hal_uart_ex.h" replace the HAL_UART_Receive_DMA().

Junde
Senior II

.