mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
xtensa/esp32: initialize RTC in case PM or RTC configs are not set, but RWDT is.
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
d7cb4567e6
commit
67d29e7537
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user