From fc45410dedad2dc2fbcd8255be8b3f29cacdff57 Mon Sep 17 00:00:00 2001 From: Chen Jichang Date: Sat, 11 Oct 2025 11:23:56 +0800 Subject: [PATCH] fix(rmt): use memset to clear entire RMT memory block instead of single word closes https://github.com/espressif/esp-idf/issues/17692 --- components/driver/rmt/rmt_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/driver/rmt/rmt_tx.c b/components/driver/rmt/rmt_tx.c index 841160a69e..9ae9869542 100644 --- a/components/driver/rmt/rmt_tx.c +++ b/components/driver/rmt/rmt_tx.c @@ -787,7 +787,7 @@ static esp_err_t rmt_tx_disable(rmt_channel_handle_t channel) #if !SOC_RMT_SUPPORT_ASYNC_STOP // we do a trick to stop the undergoing transmission // stop interrupt, insert EOF marker to the RMT memory, polling the trans_done event - channel->hw_mem_base[0].val = 0; + memset(channel->hw_mem_base, 0, channel->mem_block_num * SOC_RMT_MEM_WORDS_PER_CHANNEL * sizeof(rmt_symbol_word_t)); while (!(rmt_ll_tx_get_interrupt_status_raw(hal->regs, channel_id) & RMT_LL_EVENT_TX_DONE(channel_id))) {} #endif rmt_ll_clear_interrupt_status(hal->regs, RMT_LL_EVENT_TX_MASK(channel_id));