File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K82F/TARGET_UBRIDGE Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 19
19
#include "fsl_pmc.h"
20
20
#include "fsl_clock_config.h"
21
21
22
- rcm_reset_source_t wakeupSource ;
22
+ //!< this contains the wakeup source
23
+ rcm_reset_source_t kinetisResetSource ;
23
24
24
25
// called before main
25
26
void mbed_sdk_init () {
27
+ SMC_SetPowerModeProtection (SMC , kSMC_AllowPowerModeAll );
26
28
27
29
// check the power mode source
28
- SMC_SetPowerModeProtection (SMC , kSMC_AllowPowerModeAll );
29
- wakeupSource = (rcm_reset_source_t ) (RCM_GetPreviousResetSources (RCM ));
30
- if (wakeupSource & kRCM_SourceWakeup ) /* Wakeup from VLLS. */
31
- {
30
+ kinetisResetSource = (rcm_reset_source_t ) (RCM_GetPreviousResetSources (RCM ));
31
+ // if waking up from VLLS, do some cleanup
32
+ if (kinetisResetSource & kRCM_SourceWakeup ) {
32
33
PMC_ClearPeriphIOIsolationFlag (PMC );
33
34
NVIC_ClearPendingIRQ (LLWU_IRQn );
34
-
35
- // /* Wait for PLL lock. */
36
- // while (!(kMCG_Pll0LockFlag & CLOCK_GetStatusFlags())) {}
37
- // CLOCK_SetPeeMode();
38
35
}
39
36
40
37
BOARD_BootClockRUN ();
You can’t perform that action at this time.
0 commit comments