Question
debugging in STOP mode
Posted on January 07, 2014 at 17:37
I develop a lot of low power applications using STM32 and I'd like the ability to use the debugger while in low power STOP mode. My code works as expected in release mode (i.e. no debugger) but when debugging as soon as the processor enters STOP mode it exits STOP mode. Even if I disable all interrupt sources that could wake it up (RTC alarm and EXTI pin interrupts) it still exits STOP mode immediately. I have added the following at the beginning of main to setup the debug register:
#ifdef DEBUG
DBGMCU->CR = DBGMCU_STOP;
#endif
Processor: STM32F103 (same issue on STM32F101)
Tool chain: Rowley Crossworks for ARM 1.7 build 22
JTAG: ARM-USB-TINY (Olimex)
I would appreciate any ideas.
Regards
Trevor
#dbg_standby #dbg_stop #dbg_sleep