I was testing sensor data handling code (just moving data from one array to other and totally not associated with the main issue), so I commented out whole while(1) loop and turned off LPTMR. After entering debug and terminating debug session I was not able to enter it again. Every time I'm trying to enter debug session I getting an error [No connection could be made because the target is actively refused it].
While(1) is empty and consists only with low power mode -> SMC_SetPowerModeVlps(SMC);
Could it be the case that processor bricks (I am not able to program, debug or erase program) after entering low power mode, and not using any wake up routine as LPTMR or LLWU?
Hello TomTamTom,
It seems that you are entering VLPS while debugging, which would send the system to stop mode. Please see section 9.6 (Debug in low-power modes) from the KL17 Reference Manual as it could be that the power mode transition is causing this symptoms.
I hope that this information helps.
Regards,
Gustavo