Thursday , 23 September 2021
iten

DMA transfer in interrupt mode


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

    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);

    WHY????????????????????

    #27248
    kekkoian
    Participant

    ok i understand why….

    i think its becouse HAL_UART_RxCpltCallback

    #29576
    kekkoian
    Participant

    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.