Page 1 of 1

ESP32-S3 GDMA descriptor error

Posted: Thu Dec 16, 2021 11:11 pm
by Baldhead
Hi,

I am trying to use gdma in esp32-S3 chip.

I configured the gdma output channel 0.
I enabled the interrupt "out_dscr_err", and that interrupt is being called.

I am allocating the dma descriptor and buffer dynamically ( maybe that's the problem ? ).

Code: Select all

    dma_desc_buf_a = (dma_descriptor_t*) heap_caps_calloc( descriptor_size, sizeof(dma_descriptor_t), MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL );
    p_buffer_a = (uint16_t*) heap_caps_malloc( 19200 * sizeof(uint16_t), MALLOC_CAP_8BIT | MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL );
edit:
I tested it with static allocation and same problem.

Code: Select all

    static DMA_ATTR dma_descriptor_t dma_desc_a[descriptor_size];                          
    dma_desc_buf_a = &dma_desc_a[0];
    
    static DMA_ATTR uint16_t buffer_a[pixels_size];                          
    p_buffer_a = &buffer_a[0];
What are the possible causes of GDMA out descriptor error ?

Thank's.

Re: ESP32-S3 GDMA descriptor error

Posted: Fri Dec 17, 2021 4:55 am
by ESP_Sprite
Both should work. Can you post more code, e.g. how you fill in the descriptors?

Re: ESP32-S3 GDMA descriptor error

Posted: Fri Dec 17, 2021 5:58 am
by ESP_krzychb
Another tip is to check "2.4.6 Linked List Reading Process" in https://www.espressif.com/sites/default ... ual_en.pdf for a description of what kind of errors trigger this interrupt.

Re: ESP32-S3 GDMA descriptor error

Posted: Fri Dec 17, 2021 11:45 pm
by Baldhead
Sorry,

I was measuring gpio 20 (always 1, usb D+ signal) instead of gpio 13 in ESP32-S3-DevKitC-1.

I tested it and dma is not firing LCD_CAM peripheral io and gdma interrupt is not being called(none of the avaiable interrupts, i enabled all to test).

So i assume that descriptor are ok.
I'm using the same approach i used in esp32 to fill the descriptors.

Some suggestion why dma are not firing ?
Any very specific configuration on LCD_CAM peripheral or GDMA peripheral ?

Thank's.