Managing DBGMCU registers AN4989
98/118 AN4989 Rev 3
Figure 73. EWARM C-SPY
®
Macro script setting
A basic sample code of execUserSetup() function used to enable low-power debug on
L0 is provided below:
execUserSetup(){/* Write a message to the debug log */
__message "L0 DBGMCU Setup IAR Macro \n";
__writeMemory32 (0x00400000, 0x40021034, "Memory"); // Enable clock DBG
__writeMemory32 (0x00000007, 0x40015804, "Memory"); // Enable low-power
Debug in DBG_CR
__writeMemory32 (0x00000001, 0x40015808, "Memory"); // DBG_APB1_FZ Timer2
Stop Enable
}
For further information about feature offer by C-SPY
®
macros please refer to C-SPY
®
Debugging Guide available in IAR Help Menu and on www.iar.com.
Note: IAR™ EWARM enables Low-Power debug by default if connected with I-jet™ or cmis-dap
compliant probes.