Page 1 of 1

SPI DMA

Posted: Wed Jan 18, 2023 11:01 am
by illglu
Hello,
when enabling Async memcpy API:

Code: Select all

async_memcpy_config_t config = ASYNC_MEMCPY_DEFAULT_CONFIG();
async_memcpy_t driver = NULL;
ESP_ERROR_CHECK(esp_async_memcpy_install(&config, &driver));
then SPI with DMA stop working (send garbage).

Re: SPI DMA

Posted: Wed Jan 18, 2023 8:28 pm
by illglu
for test purposes:
ESP32-C3
take "spi_slave/receiver" example, add "esp_async_memcpy_install" and spi doesn't work.

Re: SPI DMA

Posted: Thu Jan 19, 2023 1:47 am
by ESP_Sprite
Thanks for reporting this. Would you mind filing a github issue for this so we can properly triage and fix this?

Re: SPI DMA

Posted: Wed Feb 01, 2023 8:22 am
by ESP_michael
illglu wrote:
Wed Jan 18, 2023 11:01 am
Hello,
when enabling Async memcpy API:

Code: Select all

async_memcpy_config_t config = ASYNC_MEMCPY_DEFAULT_CONFIG();
async_memcpy_t driver = NULL;
ESP_ERROR_CHECK(esp_async_memcpy_install(&config, &driver));
then SPI with DMA stop working (send garbage).
Hi illglu,

I think this is because of a hardware limitation: to enable memcpy of DMA, one of the peripheral ID need to be selected. But this will affect that peripheral. We have a fix for it (currently only on master fd2b9d9, will appear on v5.1, backports are being created.)