cancel
Showing results for 
Search instead for 
Did you mean: 

DMA request generation from Software STM32H750

VN.2
Associate III

I'm attempting to optimize the amount of instructions/time it takes to move data from CPU to GPIO.

When doing ODR = X, I lose about 40ns, closer to 80 because I need to use 2 ODR writes to different ports and in general ODR output seems to sit at about 25mhz.

DMA seems to at least be somewhat faster and offloads the CPU for other tasks.

I have setup the BDMA controller to move data from SRAM D3 to GPIO, but I need to wait on the CPU to decode data 32bit of data and put it in SRAM D3 first. After which I would like to trigger a request generator to invoke 3 DMA channels at once.

I have attempted to make the request generator listen on EXTI2 and generate a software interrupt for the same IRQ, would this work or should I be looking to do this differently?

I can't use any devices for this as the protocol is proprietary.

4 REPLIES 4
AScha.3
Chief II

>time it takes to move data from CPU to GPIO

surprise, surprise : the H7 is a super fast core - but not fast on port access.

this is because the ports are "far away" from the core on a "slow" bus .

look at an F4, i tried the F411 at 100MHz core clk, producing a 10ns pulse on port pin (BSRR...) ; with optimizer on speed (-Ofast) , without optimizer get about 50ns .

here ports are "close to core" on AHB1 :

0693W00000aIeGOQA0.png0693W00000aIouEQAS.png 

or on a new M0+ core , ports direct to core (but cannot accessed by DMA here ! )

0693W00000aIouxQAC.png0693W00000aIovRQAS.png 

but if you want faster port access, the RP2040 would be perfect: has a "PIO" , programmable state machine, that can output 360 Mb/s ! and dual 133MHz cores, DMA ..etc.

and a pi pico board is about 4 € !

Post edited to adhere community guidelines.

If you feel a post has answered your question, please click "Accept as Solution".

I am aware of RP2040, but my application uses the FMC with 512Mb of SDRAM, which is not possible with the RP2040.

I need to know about whether I can invoke a DMARequestsGenerator from SW on the STM32H750.

FBL
ST Employee

Hello @VN.2​ 

First, the maximum GPIO port output speed is 100 MHz, which is way below the maximum CPU clock frequency which may be a bottleneck for your application.

STM32CubeH7/Projects/STM32H750B-DK/Examples/DMA/DMAMUX_RequestGen at master · STMicroelectronics/STM32CubeH7 (github.com)

Have you checked this example?

@AScha.3​, please, would you consider attaching references for your screenshots for better visibility?

Thank you,

Firas

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

AScha.3
Chief II

@F.Belaid​  i add diagram title...ok?

If you feel a post has answered your question, please click "Accept as Solution".