Skip to content

Commit 5f2399a

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 5f2399a

File tree

2 files changed

+8
-4
lines changed
  • targets

2 files changed

+8
-4
lines changed

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

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

133133
void ClockSelectXtalOsc(void)
134134
{
135+
#if 0
135136
/* Enable XTAL 24MHz clock source. */
136137
CLOCK_InitExternalClk(0);
137138
/* Wait CCM operation finishes */
138139
CLOCK_CCM_HANDSHAKE_WAIT();
139140
/* Take some delay */
140141
SDK_DelayAtLeastUs(40);
142+
#endif
141143
/* Switch clock source to external OSC. */
142144
CLOCK_SwitchOsc(kCLOCK_XtalOsc);
143145
/* Turn off XTAL-OSC detector */
144-
CCM_ANALOG->MISC0_CLR = CCM_ANALOG_MISC0_OSC_XTALOK_EN_MASK;
146+
//CCM_ANALOG->MISC0_CLR = CCM_ANALOG_MISC0_OSC_XTALOK_EN_MASK;
145147
/* Power Down internal RC. */
146-
CLOCK_DeinitRcOsc24M();
148+
//CLOCK_DeinitRcOsc24M();
147149
}
148150

149151
void ClockSelectRcOsc(void)
150152
{
153+
#if 0
151154
/* Enable internal RC. */
152155
XTALOSC24M->LOWPWR_CTRL |= XTALOSC24M_LOWPWR_CTRL_RC_OSC_EN_MASK;
153156
/* Wait CCM operation finishes */
154157
CLOCK_CCM_HANDSHAKE_WAIT();
155158
/* Take some delay */
156159
SDK_DelayAtLeastUs(4000);
160+
#endif
157161
/* Switch clock source to internal RC. */
158162
XTALOSC24M->LOWPWR_CTRL_SET = XTALOSC24M_LOWPWR_CTRL_SET_OSC_SEL_MASK;
159163
/* Disable XTAL 24MHz clock source. */
160-
CCM_ANALOG->MISC0_SET = CCM_ANALOG_MISC0_XTAL_24M_PWD_MASK;
164+
//CCM_ANALOG->MISC0_SET = CCM_ANALOG_MISC0_XTAL_24M_PWD_MASK;
161165
}
162166

163167
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)