mirror of
https://github.com/apache/nuttx.git
synced 2026-09-08 09:56:33 +00:00
xtensa/esp32: initialize RTC in case PM or RTC configs are not set, but RWDT is.
This commit is contained in:
parent
d7cb4567e6
commit
67d29e7537
1 changed files with 12 additions and 0 deletions
|
|
@ -932,6 +932,18 @@ FAR struct esp32_wdt_dev_s *esp32_wdt_init(uint8_t wdt_id)
|
|||
case 2:
|
||||
{
|
||||
wdt = &g_esp32_rwdt_priv;
|
||||
|
||||
/* If RTC was not initialized in a previous
|
||||
* stage by the PM or by clock_initialize()
|
||||
* Then, init the RTC clock configuration here.
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_PM) && !defined(CONFIG_RTC)
|
||||
/* Initialize RTC controller parameters */
|
||||
|
||||
esp32_rtc_init();
|
||||
esp32_rtc_clk_set();
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue