Hello Michael,
I have found the problem on your project.
There is still left to enable VLLS modes on SMC_PMPROT register. (On reference manual, see section 15.4.1 Power Mode Protection register) and also, restore peripherals I/O (because there are latched when being in VLLS mode), this is done by clearing ACKISO flag in PMC_REGSC register (section 16.5.3 Regulator Status and Control register).
You should add fsl_pmc_hal and fsl_smc_hal components to your project:

Generate code for being able to use PMC_HAL_GetAckIsolation() and SMC_HAL_SetProtection() functions.
First, you need to recover the I/O peripherals when entering from RESET and after that, you need to allow VLLS mode, it is done just after entering main function:
int main(void)
/*lint -restore Enable MISRA rule (6.3) checking. */
{
/* Write your local variable definition here */
uint32_t timerDly;
if (PMC_HAL_GetAckIsolation(PMC_BASE_PTR) != 0) {
PMC_HAL_ClearAckIsolation(PMC_BASE_PTR);
}
SMC_HAL_SetProtection(SMC_BASE_PTR,kAllowPowerModeVlls);
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
/* For example: for(;;) { } */
for(;;) {
// led blink
GPIO_DRV_ClearPinOutput(GPIOledV); // on
timerDly = timerRef + 500;
while (timerRef < timerDly) ; // wait
GPIO_DRV_SetPinOutput(GPIOledV); // off
// go low power
POWER_SYS_ClearWakeupPinFlag(kPowerManagerWakeupPin4);
POWER_SYS_SetMode(0, kPowerManagerPolicyForcible);
}
After compiling and running your project, I could be able to switch to VLLS0 mode and then return to RUN mode by resetting the board using LLWU_P4.
I attach project that i used to test your code (to test in FRDM-KL03Z board) , it may be helpful for you.
Note: I needed to switch CPU to MKL03Z32VFK4 (and GPIO output) in order to be compatible with FRDM-KL03Z.
Could you please try adding these changes?
Best Regards,
Isaac Avila
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------