2023-03-09 11:55 AM
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.
2023-03-09 11:38 PM
>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 :
or on a new M0+ core , ports direct to core (but cannot accessed by DMA here ! )
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.
2023-03-10 07:01 AM
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.
2023-03-13 06:48 AM
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.
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.
2023-03-13 07:10 AM
@F.Belaid i add diagram title...ok?