2019-03-04 08:59 AM
Has anyone got working example code they could share of setting up DMA to transfer from memory to a GPIO port on an H7 (Nucleo-H743). I've read AN4666 and can get the example working on a L476 but none of the many variants I try on the H7 work. The example could use a timer to clock the transfer or just free-run. The application will have an area of memory that is continuously transferred to the GPIO port with the DMA in circular mode.
Many thanks in anticipation
2019-03-06 02:27 AM
Hello @Community member
Did you tried the available DMA example of CubeH7 v1.3.2? Did you followed the instructions in readme file ? Did you enabled the cache? and waht about the MPU configuration?
Kind Regards,
Imen
2019-03-06 02:30 PM
I'm also having trouble with the DMA.
I wanted to send a 8bit array from the SRAM to 8 pin GPIO at 25 MHZ/ 12.5 MHZ speed using the DMA controlled by a timer as an University project.
I bought a STM32H743 (NUCLEO) due to it's power and extra memory.
Since I'm new to the STM32 architecture, I was expecting it to be as easy as the arduino (the only MCU that I worked with in a register level) and I was expecting to find a lot of resources on the internet. That was my mistake.
The only example that I found that addresses this idea was written to the STM32F4 platform (I put it as an attachment) and I don't know how to convert it to the STM32H7 MCU.
Since I can't find any example for this model (after looking for weeks), I'm now regretting buying this board and I think I'm going to change to the arduino Due (unfortunately).
Sorry about getting things off my chest like that but I think I'm going crazy with this project/board.
2019-03-06 03:03 PM
>>I was expecting to find a lot of resources on the internet...
>>Since I can't find any example for this model..
You know that people have to write the stuff that's on the internets and embedded sw engineering is frequently not a task that relies on cutting-n-pasting code Google happens upon, but one that requires connecting a bunch of dots from often vague documentation.
The GPIO banks are on AHB4, use BDMA to copy data from SRAM4 to GPIOx>BSRR or ODR
SRAM4 is 64KB situated at 0x38000000
Should be able to use LPTIM2 or LPTIM3 OUT as a clocking/triggering source
Figure a couple hours of time to code/validate a working proof.
2020-08-30 06:50 AM
This can be done nicely with BDMA, but it works also nicely with DMA.
See my STM32H7 forum post "Parallel transmission using GPIO and DMA (like AN4666)"