2022-06-13 02:06 PM
Hi,
I'm trying to learn DMA in depth, but I'm confused at some points. It's about Bus Matrix and Arbitration mechanism.
In STM32F446RE, there are 2 DMA controller and each one has 1 peripheral bus and 1 memory bus. Question is not about memory bus of DMA. I know if CPU and DMA tries to reach memory on same bus at same time, there is some procedure to manage arbitration on Bus Matrix. On the below Bus Matrix Block Diagram, it seems clear. But if DMA2 reaches any APB1 peripherals directly using DMA peripheral Bus, and same time CPU is using APB1 bus to do another work on AHB Peripheral Bus 1, what happens? The CPU and DMA may even want to access the same peripheral using this way but not necessarily. Even if DMA don't have to use AHB Peripheral Bus 1, both Masters will eventually use the same bus, APB1. As i understood, there is not any arbitration mechanism because there are not overlaps on Bus Matrix. In this situation, can CPU and DMA work at same time? Is there any arbitration mehanism ?
Thans for replys.
Solved! Go to Solution.
2022-06-13 03:26 PM
2022-06-13 03:26 PM
Read AN4031, AHB-to-APB bridge arbitration chapter.
JW
2022-06-14 02:51 PM
Thanks for reply. I've read AN4031 after your suggestion. My first languege is not English, so, to be sure, i want to explain what i understand.
There is a another arbitration mechanism on AHB-APB bus that is use round-robin mechanism to manage this situation. CPU and DMA can be generate access request to APB at same time but this arbitration mechanism will be decide which one will access (using round robin). In short, CPU and DMA can not access to APB bus at same time. They can only generate access request at same time, arbitration mechanism will be decide which one will be run (using round-robin mechanism).
Is it true?
Thank you.
2022-06-14 09:22 PM
May be round-robin apply only for same priority request
2022-06-15 12:26 PM
> CPU and DMA can be generate access request to APB at same time
> but this arbitration mechanism will be decide which one will access (using round robin)
Yes.
JW