mirror of
https://github.com/espressif/esp-idf.git
synced 2026-01-19 21:04:48 +00:00
fix(rmt): use memset to clear entire RMT memory block instead of single word
closes https://github.com/espressif/esp-idf/issues/17692
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user