hello Riccardo,
SPMSC2: PPDC bit is to control whether stop2 or stop3 selected.
0 Stop3 mode enabled.
1 Stop2, partial power down, mode enabled.
the default value of PPDC is 0, so the default stop mode is stop3. that's the reason I didn't set SPMSC2: PPDC in sample code.
when execute __asm STOP , program goes into stop3 mode.
The code have two interrupt: timer and KBI
- when code is running, it is in stop3 mode, timer can not work
- when KBI happens(KBI #0), it wake up stop3
- go on running code, timer can work now.
===============================================
this answer is for you. if it helps, please click on "correct answer" button. thanks!
Best Regards,
ZhangJun