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.

DMA done interrupts on Peripheral uDMA channels for TM4C123

Other Parts Discussed in Thread: ADS1255

Hi

I have been trying to continuously read out two ADCs (ADS1255) on SSI1 and SSI2 using the uDMA of the TM4C123 MCU.

The goal would be to have both ADCs running at 30kSPS, with DMA transfer sizes of 29 bursts of 4 bytes each in PingPong Mode. 

I have my program currently set up to use the Timer DMA channels for sending 4-Byte bursts to the SSI TX FIFO at the ADC sampling rate. At the same time, the SSI RX DMA channels are configured for identically sized transfers copying data form the SSI RX FIFO to a buffer in memory. 

My problem is now, that in order to reinitialize the DMA channels I had to use a seperate Timer interrupt, since I do not get any DMA done interrupts on the Timer or SSI interrupt vectors. 

Going back to the TM4C123 Datasheet I found some conflicting information regarding this issue:

As stated in section 9.2.10:

"When a μDMA transfer is complete, the μDMA controller generates a completion interrupt on the interrupt vector of the peripheral. Therefore, if μDMA is used to transfer data for a peripheral and interrupts are used, then the interrupt handler for that peripheral must be designed to handle the μDMA transfer completion  interrupt."


Accordingly, I find the following list of Interrupt events in the SSI Section of the datasheet: (I could not find any similar list in the General Purpose Timer section of the Datasheet)

However, I look at the description of the SSIRIS register, there are no such interrupt bits defined at the locations that the TivaWare Functions would suggest (bits 4 and 5):

(As a side note, when looking into the TM4C129 datasheet, these bits seem to exist in the SSIRIS as well as the GPTMRIS registers).

How can I access the DMA completion interrupts in the TM4C123? Do they even exist? 

Thanks in advance for any help or insights!

  • Hello Roman,

    On TM4C123 the DMA Completion was not straight forward. When the DMA completes it gives an interrupt on the Peripheral Channel which it triggers it. In this case it the Timer. So the Timer Interrupt Handle must be invoked where the check on the DMACHIS needs to be done so as to find the completion of a DMA Transfer..

    Regards
    Amit
  • Hi Amit

    Thanks a lot for your prompt response!

    I checked both the SSI and Timer Interrupts for DMA completion indications. However, also in the GPTMRIS there are no such bits:

    I would have wanted to look for these interrupt status flags to see a DMA completion. 

    Please correct me if I am wrong, but do you suggest to ignore the state of the Peripheral RIS register and if DMACHIS for the corresponding channel is set, I know that the interrupt was caused by the uDMA?

    Regards

    Roman

  • Hello Roman,

    Yes. Enable the Interrupt from the Peripheral that is triggering the DMA request. And in that Interrupt check for the DMACHIS bits for DMA Status.

    Regards
    Amit