Hello,
I am working about DMA and I have some problems with it.
My starting point:
- I work with a C6678 evaluation board (Later, I will have to do the same with a C6672)
- I use the examples given with the EDMA3 LLD as software starting point.
(C:\Program Files\Texas Instruments\edma3_lld_02_11_03_02\examples\edma3_driver\src)
Theses examples give good results. However, in theses examples all the DMA transfers are manually triggered. For my application, I have to replace theses triggers by triggers on events, precisely on the GPIO 0 for my application.
For that purpose, I have understood that the first thing to do was to replace “EDMA3_DRV_DMA_CHANNEL_ANY “ by “EDMA3_DRV_DMA_CHANNEL_EVENT_XX” in the call of EDMA3_DRV_requestChannel().
From the TMS320C6678 Data Manual (chapter 7.8.4), I have read that the only channels which maybe triggered by the GPIO 0 are the channels 6 of the EDMA 1 and 2, and no change is possible. Then I should begin in my software by using “EDMA3_DRV_DMA_CHANNEL_EVENT_6” in the call of EDMA3_DRV_requestChannel(), eiher with the EDMA1 or with the EDMA2, but not with the EDMA0.
Problem is that the return value of EDMA3_DRV_requestChannel() is EDMA_DRV_E_DMA_CHANNEL_UNAVAIL (-132) in both cases.
In fact, instead of “EDMA3_DRV_DMA_CHANNEL_EVENT_6”, the only channels with which EDMA3_DRV_requestChannel(), gives good results are the followings :
- 0 and 1 with the EDMA0,
- 0x30 and 0x31 with the EDMA1,
- 0x30 and 0x31 with the EDMA2.
After having looking for the reasons of this situation, I have found that:
- The channel 0 and 1 of the EDMA0 might correspond to some values used to initialize the sampleInstInitConfig array in the file “sample_c6678_cfg.c” (EDMA instance 0, region 0)
- The channel 0x30 and 0x31 of the EDMA1 and 2 might correspond to some values used to initialize the sampleInstInitConfig array in the file “sample_c6678_cfg.c” (EDMA instance 1 and 2, region 0 in both cases).
(Path to find with file: C:\ProgramFiles\TexasInstruments\edma3_lld_02_11_03_02\packages\ti\sdo\edma3\drv\sample\src\platforms\sample_c6678_cfg.c)
If it was true then, according to this file, I should have to use the channel 6 of the EDMA0 with the shadow registers of the shadow region 4 in order to trig a DMA transfer one the GPIO 0. But it does not correspond to what we can read in the TMS320C6678 Data Manual (chapter 7.8.4). That's why I don't understand how to trig et DMA transfer with the GPIO 0.
Who to trig a DMA transfer with the GPIO 0 ?
Thanks
Jean-Christophe Peltier