From 46d1d7a43fb436132e24d11481bb1bb623b25436 Mon Sep 17 00:00:00 2001 From: morris Date: Tue, 18 Feb 2025 13:37:01 +0800 Subject: [PATCH] fix(gdma): relax alignment constraint for internal memory external memory encryption should not affect internal memory alignment Closes https://github.com/espressif/esp-idf/issues/15228 --- components/esp_hw_support/dma/gdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/esp_hw_support/dma/gdma.c b/components/esp_hw_support/dma/gdma.c index 9d847dd9e4..9dd760792a 100644 --- a/components/esp_hw_support/dma/gdma.c +++ b/components/esp_hw_support/dma/gdma.c @@ -392,10 +392,9 @@ esp_err_t gdma_config_transfer(gdma_channel_handle_t dma_chan, const gdma_transf // if MSPI encryption is enabled, and DMA wants to read/write external memory if (esp_flash_encryption_enabled()) { gdma_hal_enable_access_encrypt_mem(hal, pair->pair_id, dma_chan->direction, config->access_ext_mem); - // when DMA access the encrypted memory, extra alignment is needed, for both internal and external memory + // when DMA access the encrypted memory, extra alignment is needed for external memory if (config->access_ext_mem) { ext_mem_alignment = MAX(ext_mem_alignment, GDMA_ACCESS_ENCRYPTION_MEM_ALIGNMENT); - int_mem_alignment = MAX(int_mem_alignment, GDMA_ACCESS_ENCRYPTION_MEM_ALIGNMENT); } } else { gdma_hal_enable_access_encrypt_mem(hal, pair->pair_id, dma_chan->direction, false);