Skip to content

Commit 3b0d850

Browse files
committed
Merge branch 'fix/fix_esp32_rmt_disable_timeout_in_special_condition' into 'master'
fix(rmt): use memset to clear entire RMT memory block instead of single word Closes IDFGH-16574 See merge request espressif/esp-idf!42510
2 parents 5c3a562 + 9e28a8d commit 3b0d850

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/esp_driver_rmt/src/rmt_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ static esp_err_t rmt_tx_disable(rmt_channel_handle_t channel)
833833
#if !SOC_RMT_SUPPORT_ASYNC_STOP
834834
// we do a trick to stop the undergoing transmission
835835
// stop interrupt, insert EOF marker to the RMT memory, polling the trans_done event
836-
channel->hw_mem_base[0].val = 0;
836+
memset(channel->hw_mem_base, 0, channel->mem_block_num * SOC_RMT_MEM_WORDS_PER_CHANNEL * sizeof(rmt_symbol_word_t));
837837
while (!(rmt_ll_tx_get_interrupt_status_raw(hal->regs, channel_id) & RMT_LL_EVENT_TX_DONE(channel_id))) {}
838838
#endif
839839
rmt_ll_clear_interrupt_status(hal->regs, RMT_LL_EVENT_TX_MASK(channel_id));

0 commit comments

Comments
 (0)