SPI DMA

illglu
Posts: 6
Joined: Wed Jan 18, 2023 10:58 am

SPI DMA

Postby illglu » 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).

illglu
Posts: 6
Joined: Wed Jan 18, 2023 10:58 am

Re: SPI DMA

Postby illglu » Wed Jan 18, 2023 8:28 pm

for test purposes:
ESP32-C3
take "spi_slave/receiver" example, add "esp_async_memcpy_install" and spi doesn't work.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: SPI DMA

Postby ESP_Sprite » Thu Jan 19, 2023 1:47 am

Thanks for reporting this. Would you mind filing a github issue for this so we can properly triage and fix this?

ESP_michael
Posts: 37
Joined: Mon Aug 28, 2017 10:25 am

Re: SPI DMA

Postby ESP_michael » Wed Feb 01, 2023 8:22 am

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.)

Who is online

Users browsing this forum: Bing [Bot] and 213 guests