diff options
Diffstat (limited to 'examples/imx7_colibri_m4/demo_apps/low_power_imx7d')
3 files changed, 14 insertions, 6 deletions
diff --git a/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/common/lpm_mcore.c b/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/common/lpm_mcore.c index c9a5084..dd3e27b 100644 --- a/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/common/lpm_mcore.c +++ b/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/common/lpm_mcore.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Freescale Semiconductor, Inc. + * Copyright (c) 2015-2016, Freescale Semiconductor, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, @@ -412,11 +412,15 @@ const char* LPM_MCORE_GetPowerStatusString(void) } /* - * Check if A7 LPM Driver is ready + * Check if A7 LPM Driver is ready, an "Once Ready, Always Ready" logic is used */ uint32_t LPM_MCORE_CheckPeerReady(void) { - return (MU_GetFlags(MUB) & MU_SR_Fn(1)); + static uint32_t a7_ready = 0; + if (!a7_ready) { + a7_ready = MU_GetFlags(MUB) & MU_SR_Fn(1); + } + return a7_ready; } /* diff --git a/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/rand_wfi/hardware_init.c b/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/rand_wfi/hardware_init.c index d36d4f8..87a693d 100644 --- a/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/rand_wfi/hardware_init.c +++ b/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/rand_wfi/hardware_init.c @@ -56,6 +56,10 @@ void hardware_init(void) CCM_BASE_PTR->PLL_CTRL[i].PLL_CTRL = ccmClockNeededRun; } + + /* Enable clock gate for wakeup mix*/ + CCM_ControlGate(CCM, BOARD_SIM_WAKEUP_CCGR, ccmClockNeededAll); + /* initialize debug uart */ dbg_uart_init(); diff --git a/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/rand_wfi/main.c b/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/rand_wfi/main.c index 3c75c46..e53d08b 100644 --- a/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/rand_wfi/main.c +++ b/examples/imx7_colibri_m4/demo_apps/low_power_imx7d/rand_wfi/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, Freescale Semiconductor, Inc. + * Copyright (c) 2015-2016, Freescale Semiconductor, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, @@ -46,8 +46,8 @@ /////////////////////////////////////////////////////////////////////////////// // Macros /////////////////////////////////////////////////////////////////////////////// -#define PERIOD_MIN 5 -#define PERIOD_MAX 10 +#define PERIOD_MIN 15 +#define PERIOD_MAX 20 //////////////////////////////////////////////////////////////////////////////// // Code |