We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f86142 commit 12792fdCopy full SHA for 12792fd
targets/TARGET_NUVOTON/TARGET_NANO100/device/StdDriver/nano100_clk.c
@@ -70,7 +70,9 @@ void CLK_EnableCKO(uint32_t u32ClkSrc, uint32_t u32ClkDiv)
70
*/
71
void CLK_PowerDown(void)
72
{
73
- SCB->SCR = SCB_SCR_SLEEPDEEP_Msk;
+ /* Set the processor uses deep sleep as its low power mode */
74
+ SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
75
+
76
CLK->PWRCTL |= (CLK_PWRCTL_PD_EN_Msk | CLK_PWRCTL_WK_DLY_Msk );
77
__WFI();
78
}
@@ -81,6 +83,9 @@ void CLK_PowerDown(void)
81
83
82
84
void CLK_Idle(void)
85
86
+ /* Set the processor uses sleep as its low power mode */
87
+ SCB->SCR &= ~SCB_SCR_SLEEPDEEP_Msk;
88
89
CLK->PWRCTL &= ~(CLK_PWRCTL_PD_EN_Msk );
90
91
0 commit comments