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.

TM4C123GH6PM: Check DMA channel of peripheral at run time

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL

Hi there, 

I am working on a project for university. I am currently stuck at one point. I want to get the channel number of a peripheral at runtime. Is there any chance to get the corresponding channel number to the peripheral at runtime? E.g. lets say I want to use the SSI0 with DMA access. How do I get from software that I have to use channel number 8 and 9 for transmitting and receiving? Is this saved somehore in the HAL?

Thank you for your help.

Best regards

Sven

  • Hi,

      The channel mapping is fixed. Please refer to the datasheet for details. Below is the excerpt from the datasheet. For example, the SSI0 RX is mapped to channel 10 only and SSI0 TX is mapped to channel 11. Therefore, your application will always know that the SSI0 is mapped to only channel 10 and 11 and nothing else. 

      If you want to find out if SSI0 RX has completed the transfer you can call the uDMAChannelModeGet(UDMA_CHANNEL_SSI0RX). The value returned from the API call will indicate UDMA_MODE_STOP if the transfer is completed. 

      I will also suggest you reference the uDMA example project under <TivaWare_Installation>/examples/boards/ek-tm4c123gxl/udma_demo.