fix(wdt): changed ESP32-C3 WDT to use XTAL as clock

This clock is unchanged even when CPU/APB frequency changes (e.g. due to esp_pm),
which means timeout period is correct even after such a change.
This commit is contained in:
Marius Vikhammer
2023-09-08 12:23:18 +08:00
parent 111779db5a
commit c192ea478e
11 changed files with 67 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ extern "C" {
#include "hal/misc.h"
/* Pre-calculated prescaler to achieve 500 ticks/us (MWDT1_TICKS_PER_US) when using default clock (MWDT_CLK_SRC_DEFAULT ) */
#define MWDT_LL_DEFAULT_CLK_PRESCALER 40000
#define MWDT_LL_DEFAULT_CLK_PRESCALER 20000
//Type check wdt_stage_action_t
ESP_STATIC_ASSERT(WDT_STAGE_ACTION_OFF == TIMG_WDT_STG_SEL_OFF, "Add mapping to LL watchdog timeout behavior, since it's no longer naturally compatible with wdt_stage_action_t");