esp-rs / esp-hal

no_std Hardware Abstraction Layers for ESP32 microcontrollers
https://docs.esp-rs.org/esp-hal/
Apache License 2.0
737 stars 206 forks source link

ESP32S2: `dma_mem2mem` support #2313

Open SergioGasquez opened 2 weeks ago

SergioGasquez commented 2 weeks ago

Issue created from #1524

Dominaezzz commented 2 weeks ago

Looks like the PAC is missing the registers for Copy DMA. It's also missing the registers for AES/SHA/ADC DMA.

It's also worth noting that AES/SHA (Crypto DMA), SPI2 and I2S can also be used for memcpy operations. I was planning to only add support for the dedicated copy DMA channel but it seems it doesn't support accessing external ram, but the non-dedicated ones do support external ram access :smile:, so supporting using those channels as well may be handier than I anticipated. (The only complication is it doesn't play nice with DMA channel erasure, maybe this driver can be special, since it kinda is :slightly_smiling_face:).

bugadani commented 2 weeks ago

The only complication is it doesn't play nice with DMA channel erasure, maybe this driver can be special, since it kinda is

Not everything needs to be erased, and I think we can even transform channels into diferent types for m2m if we want to. Don't worry about this part.

There is some investigation going on internally whether ESP32 peripheral DMAs support m2m as they do on the S2. Probably not, but it's not obvious at this point I think.

Dominaezzz commented 2 weeks ago

Unassigned myself, not sure I'm too keen on learning how to update the PACs right now.