cancel
Showing results for 
Search instead for 
Did you mean: 

stm32h7 fastest gpio read using DMA

JLope.11
Associate III

I would like read the gpio lines at fastest speed. 

As example it is possible to read first 4 ports by reading:

uint16_t ports0123=GPIOC->IDR&0x000F; (it is very fast, takes 28 tics)
It is possible to read ports GPIO_PIN_0-15 by connecting GPIOC->IDR to a DMA?

and a fast DMA?

 

2 REPLIES 2
SofLit
ST Employee

Hello

It is possible to read ports GPIO_PIN_0-15 by connecting GPIOC->IDR to a DMA?

Nothing prevents you to do it.

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.

You can do it, but you may be unpleasantly surprised by how slow it is.

While that article talks about toggling (i.e. write), most of what's written there applies to reads, too.

You may try to experiment with the BDMA which in the same clock domain as GPIO, but don't have too high expectations.

JW