forked from espressif/esp-idf
esp32s2: reset systimer clk on startup
This commit is contained in:
committed by
Marius Vikhammer
parent
cebab7fa7f
commit
b07276265a
@@ -35,6 +35,7 @@
|
|||||||
#include "driver/periph_ctrl.h"
|
#include "driver/periph_ctrl.h"
|
||||||
#include "bootloader_clock.h"
|
#include "bootloader_clock.h"
|
||||||
#include "soc/syscon_reg.h"
|
#include "soc/syscon_reg.h"
|
||||||
|
#include "hal/clk_gate_ll.h"
|
||||||
|
|
||||||
static const char *TAG = "clk";
|
static const char *TAG = "clk";
|
||||||
|
|
||||||
@@ -313,6 +314,8 @@ __attribute__((weak)) void esp_perip_clk_init(void)
|
|||||||
DPORT_CLEAR_PERI_REG_MASK(DPORT_BT_LPCK_DIV_FRAC_REG, DPORT_LPCLK_SEL_8M);
|
DPORT_CLEAR_PERI_REG_MASK(DPORT_BT_LPCK_DIV_FRAC_REG, DPORT_LPCLK_SEL_8M);
|
||||||
DPORT_SET_PERI_REG_MASK(DPORT_BT_LPCK_DIV_FRAC_REG, DPORT_LPCLK_SEL_RTC_SLOW);
|
DPORT_SET_PERI_REG_MASK(DPORT_BT_LPCK_DIV_FRAC_REG, DPORT_LPCLK_SEL_RTC_SLOW);
|
||||||
|
|
||||||
|
periph_ll_reset(PERIPH_SYSTIMER_MODULE);
|
||||||
|
|
||||||
/* Enable RNG clock. */
|
/* Enable RNG clock. */
|
||||||
periph_module_enable(PERIPH_RNG_MODULE);
|
periph_module_enable(PERIPH_RNG_MODULE);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user