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

MisterPec
Posts: 1
Joined: Sun Jan 15, 2023 8:28 am

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

Postby MisterPec » Sun Jan 15, 2023 10:40 am

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

Who is online

Users browsing this forum: kimsoo02 and 109 guests