• Place a breakpoint at the call to main();
Breakpoints can be set by double clicking in the column containing the PC arrow next to the line to break at; or selecting the
line and pressing F9; or right click on the line and select ‘Toggle breakpoint’. Alternatively set a eventpoint, by clicking in the
column to the left of the breakpoint column. Only one eventpoint can be set. Eventpoints do not require programming the
flash memory, and thus are faster to use.
• Press ‘Reset Go’ on the Debug Tool Bar.
The code will execute to the breakpoint. At this point all the device initialisation will have been completed.
• Press ‘Step In’ on the Debug Tool Bar.
The code window will open ‘main.c’ and show the new position of the program counter.
• Insert a breakpoint on the call to the ‘TimerADC’
function.
10