ESP32 DMA for GPIO operations
Posted: Mon Nov 20, 2023 10:08 am
Hi,
I am doing an application that involves fast GPIO operations. DMA is just the right thing for me to save a couple of CPU cycles...
I tried to search for examples on github and ask chatgpt (it wrote some DMA code for me, but it used non existant include libraries...), but it did not help. Datasheet does not tell much as well (there are many various register and command names, but there is no chapter on how to configure a proper setup.) Can you please provide a very simple example how to read a GPIO pin and store its value in the memory via DMA (or an information source of such example)? Since I am new to ESP32, having this simple example I hope I can adapt it to my own needs. Thank you in advance.
I am doing an application that involves fast GPIO operations. DMA is just the right thing for me to save a couple of CPU cycles...
I tried to search for examples on github and ask chatgpt (it wrote some DMA code for me, but it used non existant include libraries...), but it did not help. Datasheet does not tell much as well (there are many various register and command names, but there is no chapter on how to configure a proper setup.) Can you please provide a very simple example how to read a GPIO pin and store its value in the memory via DMA (or an information source of such example)? Since I am new to ESP32, having this simple example I hope I can adapt it to my own needs. Thank you in advance.