I've been trying to get DMA chaining working with no success.
Tested the DMA ("single shot") and it seems to work. I'm getting all the correct data dumped in the correct location. Getting a chained transfer to work sounds easy, I'm just following p.1027 in the TRM (Rev. C)
However, I'm not seeing it happening. I'm just seeing the target for the 1st DMA fill up with data.
In my test case, I'm using DMA channel 2 and channel 3, no particular reason, just picking them. Everything is setup to be non-synchronized (triggered by software).
These are the settings:
- DMA4_CCR2 = 0x01005040
- DMA4_CCR3 = 0x01005040
- DMA4_CLNK2 = 0x00008003
- DMA4_CLNK3 = 0x00008002
So what I'm doing is just alternating between 2 DMA channels. Each of them go to a different location in memory. Then I kick off the DMA by writing to DMA4_CCR2 = 0x010050C0
I immediately read back DMA4_CCR2 and verified that this channel is enabled, and of course, I get data refreshed so I know it starts. Problem is it never goes to the 2nd DMA channel that I chained to.
I don't send a lot of data for testing, a very small amount, so it should have finished. In fact, I query DMA4_CCR2 and it is 0x01005040, so I assume it has automatically finished its transfer and handed off to the next one in the chain, which, unfortunately, doesn't seem to happen.
I tried different combinations, all pretty much the same thing. The lower DMA channel seems to take effect only. Individually, all the DMA channels seem to work ...
Is there something I'm missing here?