@ESP_Sprite,
I decided to replace a flag with a binary semaphore, ie: xSemaphoreCreateBinary(), to guard GDMA busy channel.
When i used the flag(the flag was released on dma end of transfer interrupt), sometimes the flag was not released, and task locked on not released flag, triggered the watchdog after 5 seconds.
So i thought of using a binary semaphore to reset the dma channel crashed and maybe the esp32-s3 lcd module crashed too.
What i noticed is that after the binary semaphore timeout, the hardware recovers itself without me doing anything, ie, after setting a new dma transaction, the new transaction worked.
From time to time the semaphore generates timeout, it works a little, then generates timeout and so on.
So......
I think that dma interrupt are not triggering sometimes and does not release the semaphore inside the interrupt with "xSemaphoreGiveFromISR(hw_lcd_dma_binary_semaphore, NULL)".
I thought the hardware crashed and only resetting the esp32-s3 would make the system work again.
Why interrupt are not firing sometimes ?
Maybe a "outlink descriptor's FSM" bug or some other configuration i need to do in the system.
Thank's.
Code: Select all
__attribute__((always_inline))
inline void hw_lcd_dma_semaphore_take()
{
BaseType_t ret = xSemaphoreTake( hw_lcd_dma_binary_semaphore, ( TickType_t ) hw_lcd_dma_semaphore_block_time );
if( ret == pdFALSE )
{
// reset gdma module allocated channel and maybe esp32-s3 lcd module.
ESP_LOGI(HW_LCD_DMA_TAG, LOG_USER("Bug in get hw_lcd_dma_binary_semaphore, dont take the semaphore after: %u ms\n"), hw_lcd_dma_semaphore_block_time); // hw_lcd_dma_semaphore_block_time = 100ms.
}
}