From 0319eb5984f997e4f074e89cd5318f9f60532c4b Mon Sep 17 00:00:00 2001 From: KonstantinKondrashov Date: Tue, 18 Aug 2020 17:43:01 +0800 Subject: [PATCH] esp32s2/soc: Fix periph_ll_periph_enabled Logs, before to go the deepsleep, were not completely flushed. --- components/hal/esp32s2/include/hal/clk_gate_ll.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/hal/esp32s2/include/hal/clk_gate_ll.h b/components/hal/esp32s2/include/hal/clk_gate_ll.h index 868be82b86..9724171163 100644 --- a/components/hal/esp32s2/include/hal/clk_gate_ll.h +++ b/components/hal/esp32s2/include/hal/clk_gate_ll.h @@ -274,7 +274,7 @@ static inline void periph_ll_reset(periph_module_t periph) static inline bool IRAM_ATTR periph_ll_periph_enabled(periph_module_t periph) { - return DPORT_REG_GET_BIT(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false)) != 0 && + return DPORT_REG_GET_BIT(periph_ll_get_rst_en_reg(periph), periph_ll_get_rst_en_mask(periph, false)) == 0 && DPORT_REG_GET_BIT(periph_ll_get_clk_en_reg(periph), periph_ll_get_clk_en_mask(periph)) != 0; }