Page 1 of 1

ESP32-C3 SPI DMA to drive HC595 / port mulitplexer with PWM

Posted: Sun Jan 15, 2023 10:40 am
by MisterPec
Hello guys,

I want to drive some HC595 for several 7segment displays. I used the spi_master code, and it just works fine.
Right now I send 2 bytes, set a global bool in the spi_post_transfer_callback routine and trigger another transfer in a main loop.
I know, not really elegant.

My idea is now to use the GDMA, configured with a circular buffer to get a nice refresh rate without blocking the CPU.
I found another example (VGA), but it seems like it is not working for the C3. It complains about missing includes.

I also can't find any simple example on how to use the GDMA, register description etc.
Can anyone please point me in the right direction?

Thanks!

Alex