cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Bus Matrix behavior and arbitration mechanism

MSara.2
Associate

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. 0693W00000NrmDBQAZ.jpgBut 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.

1 ACCEPTED SOLUTION

Accepted Solutions

Read AN4031, AHB-to-APB bridge arbitration chapter.

JW

View solution in original post

4 REPLIES 4

Read AN4031, AHB-to-APB bridge arbitration chapter.

JW

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.​

GLASS
Senior

May be round-robin apply only for same priority request​

> 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​