- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all, i'm trying to transfer content of an array (SRAM) to a ControlRegister via DMA CPU Request, i'm trying to transfer 1 element of the array per request, but i haven't been able to do it, it seems like it transfer all the array per request.
I understand that if i set REQUEST_PER_BURST to 1 it makes the DMA Controller to transfer 1 byte per request, so i ask for a transfer every 500ms, but when i read the content of the ControlRegister on the DMA Transfer Completed interrupt i read the last element of my array and not the element i'm expecting, as i say i'm expecting transfer 1 element per request, not all 10.
Does anybody had test this kind of transfer?
I haven't found any example or question similar on the forum, find project attached.
Thanks in advance
Carlos
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Carlos
DMA Transfer Completed interrupt is triggered after sending the number of bytes given as Transfer Count. In your case TC is 10.
So the interrupt will be triggered only after sending all the 10 bytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are trying to use a software approach to control each TD transfer, but there is no API for that. What you are using is an API that accessed the DMA controller to start a channel, I'm not quite sure if that will work.
Better solution would be:
Enable DMA Hardware Request and connect the timer tc to DMA drq (you may leave the isr, but you have to remove the call to CyDmaChSetRequest(). Now on each timer tc one byte should be transferred from flash to the control register.
Remember that the isr_DMA is called when the TD has finished, not after the transfer of a single byte.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Carlos
DMA Transfer Completed interrupt is triggered after sending the number of bytes given as Transfer Count. In your case TC is 10.
So the interrupt will be triggered only after sending all the 10 bytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob and SmartPSoC, yes i was able to figure out that DMA interrupt asserts after the whole transfer is done after read Bob reply but i didn't reply back, thanks again for help n00bs liek me and the rest of the forum!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Happy new year, Carlos! Good to see you're back again!
Bob