Silicon Laboratories F321DC manual Setting and Running to Breakpoints

Page 10

ToolStick-F321DC

6.6. Setting and Running to Breakpoints

The Silicon Laboratories microcontroller devices support up to four hardware breakpoints. A breakpoint is associated with a specific line of code. When the processor reaches a hardware breakpoint, the code execution stops, and the IDE refreshes all debug and watch windows. The on-chip debug hardware allows for breakpoints to be placed on any line of executable code, including code in Interrupt Service Routines. This section provides steps to set a breakpoint on the line of source code that increments the Num_LED_Flashes variable.

1.If the device is running, stop execution using the "Stop" button or use the DebugStop menu option.

2.Scroll to the ADC0_ISR function and right-click on the variable "Num_LED_Flashes". In the context menu that appears, select "Insert/Remove Breakpoint." On the left side of the line in the editor window, a red circle is added to indicate a breakpoint is placed on the source line.

3.Click the "Go" button or select the DebugGo menu option.

4.After a short time, the IDE will show that the device is halted. A blue line will be placed in the editor window to indicate where the code execution has stopped.

5.Start and stop the processor a few more times. Notice that the LED blinks once for every time the processor is started and the Num_LED_Flashes variable also increments by one.

10

Rev. 0.1

Image 10
Contents ToolStick-F321DC Handling RecommendationsContents ToolStick OverviewSilicon Laboratories IDE Getting StartedSoftware Overview IDE System RequirementsKeil Assembler and Linker Configuration WizardKeil Demonstration Toolset Keil Demonstration C51 C CompilerKeil uVision2 and uVision3 Silicon Laboratories Drivers ToolStick TerminalToolStick C8051F321 Daughter Card Features Demo Hardware SetupIDE, go to Project → Open Project Connecting to the Device and Downloading FirmwareRunning and Stopping Code Execution Go to Debug → ConnectViewing and Modifying Registers Enabling and Using Watch Windows Setting and Running to Breakpoints Single-Stepping Through Firmware Using ToolStick Terminal Go to the ToolStick → Settings menuInformation Locations Using the C8051F321 Daughter Card as a Development PlatformAdditional Demo Example C8051F321 Pin Connections10. C8051F321 Daughter Card Schematic C8051F321 Daughter Card SchematicToolStick-F321DC Contact Information