Wednesday , 18 May 2022

DMA transfer in interrupt mode

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #13900

    Hi all, i am trying understand why in the example of UART DMA trasnfer in interrupt mode the author enables the UART related interrupt.

    I mean it is not the UART to generate the interrupt but the DMA when trasfer is completed, so why he needs to enable UART interrupts?

    The author writes in chapter 9.2.7 Using the HAL_UART Module With DMA Mode Transfers,
    one of key points is :

    • enable the UART related interrupt and call the HAL_UART_IRQHandler() routine from its ISR
    (this is really important, do not skip this step);



    ok i understand why….

    i think its becouse HAL_UART_RxCpltCallback


    hahhaha, the reason is explained in question and suggestions.

    Many thanks, but really i already see this in HAL_UART_Receive_DMA:

    /* Enable the UART Parity Error Interrupt */
    SET_BIT(huart->Instance->CR1, USART_CR1_PEIE);
    /* Enable the UART Error Interrupt: (Frame error, noise error, overrun error) */
    SET_BIT(huart->Instance->CR3, USART_CR3_EIE);

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.