DMA configuration by MDMA, is it possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 2:10 AM
MDMA presentation reads:
(MDMA) "Can be used to prepare data for other DMAs and then set the DMA configuration to start transfers".
The first part (prepare data) is clear; however, I cannot figure out how MDMA automatically configures DMA and starts transfer.
Any help/link will be appreciated.
- Labels:
-
DMA
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 3:31 AM
What presentation?
> I cannot figure out how MDMA automatically configures DMA and starts transfer.
By copying a previously prepared set of suitable values from memory to the DMA registers.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 3:54 AM
>> What presentation?
>> By copying a previously prepared set of suitable values from memory to the DMA registers.
Great. However, how do you achieve it? I cannot find MDMA register that says "in the end of MDMA transfer, load DMA1/2 configuration from memory and start DMA1/2".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 4:08 AM
DMA registers are just another area in the overall memory region. If it's accessible by MDMA through the bus matrix, it can be destination of its transfers.
You can chain transfers using the scatter-gather feature of MDMA (ST appears to call it "Linked list mode").
Devil lies, as usually, in the details. For example, I'd consider decrementing destination address when writing to DMA, as the control register needs to be written as last.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 5:13 AM
Thank you very much, it looks very promising.
However, I'm afraid the"devil" you mentioned is not the only one on the road.
Do you have it implemented, or do you know some other's implementation?
Any practical example would be very helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 5:34 AM
> Do you have it implemented, or do you know some other's implementation?
No and no.
But the problem can be easily split to 1. learn how to use DMA writing its registers; 2. learn how to write DMA registers from MDMA (in a single transfer); 3. learn how to use MDMA in scatter/gather mode.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-04 7:23 AM
Many thanks, anyway.
