diff --git a/components/driver/rmt.c b/components/driver/rmt.c index 634f45880f..656f605f31 100644 --- a/components/driver/rmt.c +++ b/components/driver/rmt.c @@ -156,7 +156,7 @@ esp_err_t rmt_set_tx_carrier(rmt_channel_t channel, bool carrier_en, uint16_t hi RMT_ENTER_CRITICAL(); rmt_ll_set_carrier_high_low_ticks(p_rmt_obj[channel]->hal.regs, channel, high_level, low_level); rmt_ll_set_carrier_to_level(p_rmt_obj[channel]->hal.regs, channel, carrier_level); - rmt_ll_enable_tx_carrier(p_rmt_obj[channel]->hal.regs, channel, carrier_en); + rmt_ll_enable_carrier(p_rmt_obj[channel]->hal.regs, channel, carrier_en); RMT_EXIT_CRITICAL(); return ESP_OK; } @@ -447,6 +447,7 @@ static esp_err_t rmt_internal_config(rmt_dev_t *dev, const rmt_config_t *rmt_par } rmt_ll_set_mem_blocks(dev, channel, mem_cnt); rmt_ll_set_mem_owner(dev, channel, RMT_MEM_OWNER_HW); + rmt_ll_enable_carrier(dev, channel, false); // disable carrier feature by default RMT_EXIT_CRITICAL(); s_rmt_src_clock_hz[channel] = rmt_source_clk_hz; @@ -463,7 +464,7 @@ static esp_err_t rmt_internal_config(rmt_dev_t *dev, const rmt_config_t *rmt_par rmt_ll_enable_tx_idle(dev, channel, rmt_param->tx_config.idle_output_en); rmt_ll_set_tx_idle_level(dev, channel, idle_level); /*Set carrier*/ - rmt_ll_enable_tx_carrier(dev, channel, carrier_en); + rmt_ll_enable_carrier(dev, channel, carrier_en); if (carrier_en) { uint32_t duty_div, duty_h, duty_l; duty_div = rmt_source_clk_hz / carrier_freq_hz; diff --git a/components/soc/src/esp32/include/hal/rmt_ll.h b/components/soc/src/esp32/include/hal/rmt_ll.h index 1749b2be37..64820e2de1 100644 --- a/components/soc/src/esp32/include/hal/rmt_ll.h +++ b/components/soc/src/esp32/include/hal/rmt_ll.h @@ -260,7 +260,7 @@ static inline void rmt_ll_get_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t ch *low_ticks = dev->carrier_duty_ch[channel].low; } -static inline void rmt_ll_enable_tx_carrier(rmt_dev_t *dev, uint32_t channel, bool enable) +static inline void rmt_ll_enable_carrier(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf0.carrier_en = enable; } diff --git a/components/soc/src/esp32s2/include/hal/rmt_ll.h b/components/soc/src/esp32s2/include/hal/rmt_ll.h index 46dcac68b7..434b6c4243 100644 --- a/components/soc/src/esp32s2/include/hal/rmt_ll.h +++ b/components/soc/src/esp32s2/include/hal/rmt_ll.h @@ -253,7 +253,7 @@ static inline void rmt_ll_get_carrier_high_low_ticks(rmt_dev_t *dev, uint32_t ch *low_ticks = dev->carrier_duty_ch[channel].low; } -static inline void rmt_ll_enable_tx_carrier(rmt_dev_t *dev, uint32_t channel, bool enable) +static inline void rmt_ll_enable_carrier(rmt_dev_t *dev, uint32_t channel, bool enable) { dev->conf_ch[channel].conf0.carrier_en = enable; } diff --git a/tools/unit-test-app/components/test_utils/ref_clock.c b/tools/unit-test-app/components/test_utils/ref_clock.c index 21de24ad91..3e912e3544 100644 --- a/tools/unit-test-app/components/test_utils/ref_clock.c +++ b/tools/unit-test-app/components/test_utils/ref_clock.c @@ -97,7 +97,7 @@ void ref_clock_init() rmt_ll_start_tx(s_rmt.regs, REF_CLOCK_RMT_CHANNEL); rmt_ll_set_mem_owner(s_rmt.regs, REF_CLOCK_RMT_CHANNEL, 0); rmt_ll_reset_tx_pointer(s_rmt.regs, REF_CLOCK_RMT_CHANNEL); - rmt_ll_enable_tx_carrier(s_rmt.regs, REF_CLOCK_RMT_CHANNEL, false); + rmt_ll_enable_carrier(s_rmt.regs, REF_CLOCK_RMT_CHANNEL, false); rmt_ll_set_counter_clock_div(s_rmt.regs, REF_CLOCK_RMT_CHANNEL, 1); rmt_ll_set_mem_blocks(s_rmt.regs, REF_CLOCK_RMT_CHANNEL, 1); rmt_ll_set_counter_clock_src(s_rmt.regs, REF_CLOCK_RMT_CHANNEL, 0);