This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2434: Add idle interrupt to DMA in callback mode

Part Number: AM2434

Hello,

i am currently using the UART DMA in callback mode on an AM243x to read continously data from the UART port. So, if the DMA buffer is full, the ISR is called in which the data is further processed.

But as I have nothing found about this topic my question is, if it is possible to add an idle interrupt or timeout for the case, that there is no more data available while there is already data in the DMA buffer in order not to loose any of them? If yes, what has to be done to achieve this?

Thank you in advance.

Daniel

  • Hello Daniel,

    Thanks for reaching out to Texas Instruments E2E support forum.

    Our domain expert is out today so responses will be delayed. Please expect a reply in a day or two.

    Regards,

    Tushar

  • Hello Daniel,

    I am trying to understand your application .

    So, in above  scenario just we can configure how many bytes should be read by the DMA from UART .But, here user need to wait for untill destination buffer is filled for the DMA callback .If buffer is not filled user don't get DMA completion call back .

    Now we can do improve above method .

    For example , we can call below API to read UART data through DMA . In side below API there is function Udma_ringQueueRaw function which typicall starts the DMA lets say we can assume that DMA  can read data 100bytes with in the X sec but now DMA will read only few bytes not completed 100 bytes .

    UART_lld_readDma

    So,here we can start the timer after calling the Udma_ringQueueRaw function . if all data bytes received by the DMA with in the Time slot then clear the timer .If all data is not received with in the Time slot you may get the timer interrupt in that you can do what ever you want it . But , user don't have an idea how many bytes read by the DMA from UART.

    Regards,

    S.Anil.

  • Hello Anil,

    thank you for your respond. So this means that I have to use an external software timer to read the DMA buffer if no data is received for a specific time (DMA buffer is not full)? Or is there an internal timeout that can be activated as in UART_IER register in non-DMA mode? 

    Regards,

    Daniel