mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
xtensa/esp32s2: Fix esp32s2 wdt interrupt bug
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
72f9bd142f
commit
de948babbf
@@ -852,6 +852,10 @@ static void wdt_enableint(struct esp32s2_wdt_dev_s *dev)
|
||||
}
|
||||
else if (IS_MWDT(dev))
|
||||
{
|
||||
/* Level Interrupt */
|
||||
|
||||
wdt_modifyreg32(dev, MWDT_CONFIG0_OFFSET, 0, TIMG_WDT_LEVEL_INT_EN);
|
||||
|
||||
wdt_modifyreg32(dev, MWDT_INT_ENA_REG_OFFSET, 0, TIMG_WDT_INT_ENA);
|
||||
}
|
||||
else
|
||||
@@ -882,6 +886,10 @@ static void wdt_disableint(struct esp32s2_wdt_dev_s *dev)
|
||||
}
|
||||
else if (IS_MWDT(dev))
|
||||
{
|
||||
/* Level Interrupt */
|
||||
|
||||
wdt_modifyreg32(dev, MWDT_CONFIG0_OFFSET, TIMG_WDT_LEVEL_INT_EN, 0);
|
||||
|
||||
wdt_modifyreg32(dev, MWDT_INT_ENA_REG_OFFSET, TIMG_WDT_INT_ENA, 0);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#define MWDT_FEED_OFFSET 0x0060
|
||||
#define MWDT_WP_REG 0x0064
|
||||
#define MWDT_INT_ENA_REG_OFFSET 0x0098
|
||||
#define MWDT_INT_CLR_REG_OFFSET 0x00a0
|
||||
#define MWDT_INT_CLR_REG_OFFSET 0x00a4
|
||||
|
||||
/* The value that needs to be written to TIMG_WDT_WKEY to
|
||||
* write-enable the WDT registers.
|
||||
|
||||
Reference in New Issue
Block a user