Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch/esp32s3_wdt: ESP32-S3 WDT1 clock init #15434

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions arch/xtensa/src/esp32s3/esp32s3_tim.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include "soc/periph_defs.h"
#include "esp_private/periph_ctrl.h"
#include "hardware/esp32s3_system.h"

/****************************************************************************
* Private Types
Expand Down Expand Up @@ -937,6 +938,8 @@ struct esp32s3_tim_dev_s *esp32s3_tim_init(int timer)
case ESP32S3_TIMER0:
{
tim = &g_esp32s3_tim0_priv;
modifyreg32(SYSTEM_PERIP_CLK_EN0_REG, 0, SYSTEM_TIMERGROUP_CLK_EN);
modifyreg32(SYSTEM_PERIP_RST_EN0_REG, SYSTEM_TIMERGROUP_RST_M, 0);
break;
}
#endif
Expand All @@ -945,6 +948,9 @@ struct esp32s3_tim_dev_s *esp32s3_tim_init(int timer)
case ESP32S3_TIMER1:
{
tim = &g_esp32s3_tim1_priv;
modifyreg32(SYSTEM_PERIP_CLK_EN0_REG, 0,
SYSTEM_TIMERGROUP1_CLK_EN);
modifyreg32(SYSTEM_PERIP_RST_EN0_REG, SYSTEM_TIMERGROUP1_RST_M, 0);
break;
}
#endif
Expand Down
6 changes: 6 additions & 0 deletions arch/xtensa/src/esp32s3/esp32s3_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "hardware/esp32s3_rtccntl.h"
#include "hardware/esp32s3_tim.h"
#include "hardware/esp32s3_efuse.h"
#include "hardware/esp32s3_system.h"

#include "esp32s3_irq.h"
#include "esp32s3_rtc_gpio.h"
Expand Down Expand Up @@ -990,6 +991,8 @@ struct esp32s3_wdt_dev_s *esp32s3_wdt_init(enum esp32s3_wdt_inst_e wdt_id)
case ESP32S3_WDT_MWDT0:
{
wdt = &g_esp32s3_mwdt0_priv;
modifyreg32(SYSTEM_PERIP_CLK_EN0_REG, 0, SYSTEM_TIMERGROUP_CLK_EN);
modifyreg32(SYSTEM_PERIP_RST_EN0_REG, SYSTEM_TIMERGROUP_RST_M, 0);
break;
}

Expand All @@ -999,6 +1002,9 @@ struct esp32s3_wdt_dev_s *esp32s3_wdt_init(enum esp32s3_wdt_inst_e wdt_id)
case ESP32S3_WDT_MWDT1:
{
wdt = &g_esp32s3_mwdt1_priv;
modifyreg32(SYSTEM_PERIP_CLK_EN0_REG, 0,
SYSTEM_TIMERGROUP1_CLK_EN);
modifyreg32(SYSTEM_PERIP_RST_EN0_REG, SYSTEM_TIMERGROUP1_RST_M, 0);
break;
}
#endif
Expand Down
Loading