diff options
author | Jonathan Hogg <me@jonathanhogg.com> | 2020-06-18 12:44:54 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2020-06-19 22:11:14 +1000 |
commit | 3a9d948032e27f690e1fb09084c36bd47b1a75a0 (patch) | |
tree | 9d8c4f50fdd04f8195af7ab49d29ad3a19fee725 | |
parent | 77ed6f69ac35c1663a5633a8ee1d8a2446542204 (diff) |
esp32/esp32_rmt: Call rmt_driver_install before rmt_config.
Otherwise the RMT will repeat pulses when using loop(True). This repeating
is due to a bug in the IDF which will be fixed in an upcoming release, but
for now the accepted workaround is to swap these calls, which should still
work in the fixed version of the IDF.
Fixes issue #6167.
-rw-r--r-- | ports/esp32/esp32_rmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/esp32/esp32_rmt.c b/ports/esp32/esp32_rmt.c index 846c80d47..2ed4c9f69 100644 --- a/ports/esp32/esp32_rmt.c +++ b/ports/esp32/esp32_rmt.c @@ -110,8 +110,8 @@ STATIC mp_obj_t esp32_rmt_make_new(const mp_obj_type_t *type, size_t n_args, siz config.clk_div = self->clock_div; - check_esp_err(rmt_config(&config)); check_esp_err(rmt_driver_install(config.channel, 0, 0)); + check_esp_err(rmt_config(&config)); return MP_OBJ_FROM_PTR(self); } |