WDT: implement interrupt wdt and task wdt for ESP32-C2

ESP32-C2 has a single group timer, thus it will use it for the interrupt watchdog,
which is more critical than the task watchdog. The latter is implement in
software thanks to the `esp_timer`component.
This commit is contained in:
Omar Chebib
2022-07-07 14:54:15 +08:00
parent 5b39159e66
commit 53c7dd4efc
37 changed files with 500 additions and 155 deletions

View File

@@ -173,11 +173,7 @@ typedef union {
*/
typedef union {
struct {
uint32_t reserved_0:12;
/** wdt_appcpu_reset_en : R/W; bitpos: [12]; default: 0;
* WDT reset CPU enable.
*/
uint32_t wdt_appcpu_reset_en:1;
uint32_t reserved_0:13;
/** wdt_procpu_reset_en : R/W; bitpos: [13]; default: 0;
* WDT reset CPU enable.
*/
@@ -239,7 +235,7 @@ typedef union {
uint32_t wdt_divcnt_rst:1;
uint32_t reserved_1:15;
/** wdt_clk_prescale : R/W; bitpos: [31:16]; default: 1;
* MWDT clock prescaler value. MWDT clock period = 12.5 ns *
* MWDT clock prescaler value. MWDT clock period = 25 ns *
* TIMG_WDT_CLK_PRESCALE.
*/
uint32_t wdt_clk_prescale:16;