File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ void board_early_init_hook(void)
36
36
{
37
37
frdm_rw612_power_init_config ();
38
38
39
+ /* If this is a wakeup from PM3 then return after configuring
40
+ * the power supplies.
41
+ */
42
+ if (PMU -> PWR_MODE_STATUS == 2U ) {
43
+ return ;
44
+ }
45
+
39
46
#if CONFIG_PM
40
47
static struct pm_notifier frdm_rw612_pm_notifier = {
41
48
.state_exit = frdm_rw612_pm_state_exit ,
Original file line number Diff line number Diff line change @@ -36,6 +36,13 @@ void board_early_init_hook(void)
36
36
{
37
37
rdrw61x_power_init_config ();
38
38
39
+ /* If this is a wakeup from PM3 then return after configuring
40
+ * the power supplies.
41
+ */
42
+ if (PMU -> PWR_MODE_STATUS == 2U ) {
43
+ return ;
44
+ }
45
+
39
46
#if CONFIG_PM
40
47
static struct pm_notifier rdrw61x_pm_notifier = {
41
48
.state_exit = rdrw61x_pm_state_exit ,
Original file line number Diff line number Diff line change 17
17
#endif
18
18
#include <zephyr/drivers/timer/system_timer.h>
19
19
#include <zephyr/drivers/timer/nxp_os_timer.h>
20
-
20
+ #include <zephyr/platform/hooks.h>
21
21
#include "fsl_power.h"
22
22
23
23
#include <zephyr/logging/log.h>
@@ -228,6 +228,14 @@ __weak void pm_state_set(enum pm_state state, uint8_t substate_id)
228
228
NVIC_ClearPendingIRQ (DT_IRQN (DT_NODELABEL (rtc )));
229
229
sys_clock_idle_exit ();
230
230
sys_clock_set_timeout (0 , true);
231
+ /* GDET got enabled when exiting PM3, disable it
232
+ * again before re-entering PM3.
233
+ */
234
+ POWER_DisableGDetVSensors ();
235
+
236
+ /* Reinitialize the board specific power rails */
237
+ board_early_init_hook ();
238
+
231
239
if (!(POWER_EnterPowerMode (POWER_MODE3 , & slp_cfg ))) {
232
240
break ;
233
241
}
You can’t perform that action at this time.
0 commit comments