Skip to content

Commit 107016d

Browse files
committed
soc: nxp: rt5xx: Improve poweroff for rt5xx
This commit introduced the following changes: 1. MIMXRT595 poweroff corresponds to its full deep power down mode not deep power down mode. 2. Enable OSC32K before poweroff, the OSC32K is the clock source of the wakeup source RTC. 3. Enable RTC wake-up function. Signed-off-by: Zhaoxiang Jin <[email protected]>
1 parent 6816946 commit 107016d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

soc/nxp/imxrt/imxrt5xx/cm33/poweroff.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@
44
*/
55

66
#include <zephyr/sys/poweroff.h>
7-
#include <zephyr/toolchain.h>
8-
97
#include <fsl_power.h>
108

119
static const uint32_t exclude_from_pd[] = {0, 0, 0, 0};
1210

1311
void z_sys_poweroff(void)
1412
{
13+
CLOCK_EnableOsc32K(true);
14+
SYSCTL0->STARTEN1 |= SYSCTL0_STARTEN1_RTC_LITE0_WAKEUP_MASK;
15+
1516
/* Disable ISP Pin pull-ups and input buffers to avoid current leakage */
1617
IOPCTL->PIO[1][15] = 0;
1718
IOPCTL->PIO[3][28] = 0;
1819
IOPCTL->PIO[3][29] = 0;
1920

20-
POWER_EnterDeepPowerDown(exclude_from_pd);
21+
POWER_EnterFullDeepPowerDown(exclude_from_pd);
2122

2223
CODE_UNREACHABLE;
2324
}

0 commit comments

Comments
 (0)