Justin Sheng

Report a bug in S32K144 EAR_0.8.4 SDK function SMC_SetPowerMode

Discussion created by Justin Sheng on Dec 4, 2017

A bug in SDK EAR_0.8.4 has been detected (in power_smc_hw_access.c), which will halt the CPU if DEV_ASSERT is enabled:

 

status_t SMC_SetPowerMode(SMC_Type * const baseAddr,

                          const smc_power_mode_config_t * const powerModeConfig)

{

 

........ 

/* Previous code: */

    /*DEV_ASSERT((((uint16_t)SMC_GetPowerModeStatus(baseAddr)) & transitionTable[powerModeName]) != 0U);*/

/* Should be logic AND, not bit AND */

    DEV_ASSERT((((uint16_t)SMC_GetPowerModeStatus(baseAddr)) && transitionTable[powerModeName]) != 0U);

}

 

Hope NXP can fix it in the next SDK release.

Outcomes