Skip to content

Commit 8b46e91

Browse files
committed
MIMXRT1050: Update for deep sleep latency
1. Do not disable and enable osillators during deep sleep entry and exit 2. Increase the deep sleep to pass tests Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 0b7c78b commit 8b46e91

File tree

2 files changed

+1
-19
lines changed
  • targets

2 files changed

+1
-19
lines changed

targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/TARGET_EVK/lpm.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -132,32 +132,14 @@ void CLOCK_SET_DIV(clock_div_t divider, uint32_t value)
132132

133133
void ClockSelectXtalOsc(void)
134134
{
135-
/* Enable XTAL 24MHz clock source. */
136-
CLOCK_InitExternalClk(0);
137-
/* Wait CCM operation finishes */
138-
CLOCK_CCM_HANDSHAKE_WAIT();
139-
/* Take some delay */
140-
SDK_DelayAtLeastUs(40);
141135
/* Switch clock source to external OSC. */
142136
CLOCK_SwitchOsc(kCLOCK_XtalOsc);
143-
/* Turn off XTAL-OSC detector */
144-
CCM_ANALOG->MISC0_CLR = CCM_ANALOG_MISC0_OSC_XTALOK_EN_MASK;
145-
/* Power Down internal RC. */
146-
CLOCK_DeinitRcOsc24M();
147137
}
148138

149139
void ClockSelectRcOsc(void)
150140
{
151-
/* Enable internal RC. */
152-
XTALOSC24M->LOWPWR_CTRL |= XTALOSC24M_LOWPWR_CTRL_RC_OSC_EN_MASK;
153-
/* Wait CCM operation finishes */
154-
CLOCK_CCM_HANDSHAKE_WAIT();
155-
/* Take some delay */
156-
SDK_DelayAtLeastUs(4000);
157141
/* Switch clock source to internal RC. */
158142
XTALOSC24M->LOWPWR_CTRL_SET = XTALOSC24M_LOWPWR_CTRL_SET_OSC_SEL_MASK;
159-
/* Disable XTAL 24MHz clock source. */
160-
CCM_ANALOG->MISC0_SET = CCM_ANALOG_MISC0_XTAL_24M_PWD_MASK;
161143
}
162144

163145
void LPM_SetRunModeConfig(void)

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2865,7 +2865,7 @@
28652865
],
28662866
"device_name": "MIMXRT1052",
28672867
"overrides": {
2868-
"deep-sleep-latency": 5,
2868+
"deep-sleep-latency": 10,
28692869
"network-default-interface-type": "ETHERNET"
28702870
}
28712871
},

0 commit comments

Comments
 (0)