ToolSt ic k- E K
Changing the values of registers does not require recompiling the code or redownloading the firmware. At any
time, the device can be halted and the values of the registers can be changed. The firmware will continue execu-
tion using the new values. This capability greatly speeds up the debugging process.
The debug windows for the other sets of registers are found in the View → Debug Windows → SFR’s menu.
5.4. Enabling and Using Watch Windows
The Debug Windows in the View menu are used to view and modify hardware registers. To view and modify vari-
ables in code, the IDE provides watch windows. Just as with register debug windows, variables in the watch win-
dows are updated each time the device is halted. This section of the User ’s Guide explains how to add a variable
to the watch window and modify the variable. The variable T2_Overflow_Count is a counter that stores the number
of times the LEDs blink.
1. If the device is running, stop execution using the “Stop” button or use the Debug → Stop menu option.
2. In the File View on the left-hand side of the IDE, double-click on BLINK_LED.c to open the source file. The
source file might already be open.
3. Scroll to the bottom of the source file and right-click on the variable “T2_Overflow_Count”. In the context
menu that appears, select “Add T2_Overflow_Count to Watch” and then choose “Default.” On the right-
hand portion of the IDE, the watch window appears and the T2_Overflow_Count variable is added. The
current value of the variable is shown to the right of the name.
4. Start and stop the device a few times. See that the value of the T2_Overflow_Count is incremented each
time the LEDs blink.
5. When the device is halted, click on the value field in the watch window and change the value to 0. Then
click the Refresh button or select Debug → Refresh to write the new value to the device.
6. Start and stop the device a few times to watch the variable increment starting from 0.
Changing the values of variables does not require recompiling the code or redownloading the firmware. At any
time, the device can be halted and the values of the variables can be changed. The firmware will continue execu-
tion using the new values.
5.5. Setting and Running to Breakpoints
The Silicon Laboratories microcontroller devices support up to four hardware breakpoints. A breakpoint is associ-
ated 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 T2_Overflow_Count variable.
1. If the device is running, stop execution using the “Stop” button or use the Debug → Stop menu option.
2. Scroll to the bottom of the source file and right-click on the variable “T2_Overflow_Count”. 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 Debug → Go 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 the processor a few more times. Notice that the LEDs blink once for every time the processor is
started and the T2_Overflow_Counter also increments by one.
4
Rev. 0.2
相关PDF资料
TPS23757EVM EVALUATION MODULE FOR TPS23757
TPS62230EVM-370 EVAL MODULE FOR TPS62230-370
TRAVELCUBE SURGE SUP 1OUT W/RJ11 DIRECTPLUG
TRAVELER100BT SURGE SUP 2OUT W/RJ11 DIRECTPLUG
TRAVELER3USB SURGE SUPP USB CHARGE TRAVEL SZ
TRAVELERC6 SURGE SUPPRESSOR 120/240V RJ11
TRAVELERC8 SURGE SUPPRESSOR 120/240V RJ11
TRAVELER SURGE SUP 2OUT W/RJ11 DIRECTPLUG
相关代理商/技术参数
TOOLSTICKLINDC 功能描述:子卡和OEM板 ToolStick LIN Daughter Card RoHS:否 制造商:BeagleBoard by CircuitCo 产品:BeagleBone LCD4 Boards 用于:BeagleBone - BB-Bone - Open Source Development Kit
TOOLSTICKSK 功能描述:开发板和工具包 - 8051 Toolstick StarterKIT ToolstickBA+TlS330DC RoHS:否 制造商:Silicon Labs 产品:Development Kits 工具用于评估:C8051F960, Si7005 核心: 接口类型:USB 工作电源电压:
TOOLSTICKUNIDC 功能描述:子卡和OEM板 Toolstick University Daughter Card RoHS:否 制造商:BeagleBoard by CircuitCo 产品:BeagleBone LCD4 Boards 用于:BeagleBone - BB-Bone - Open Source Development Kit
TOOLSTICKUNISK 功能描述:开发板和工具包 - 8051 Toolstick University Starter Kit RoHS:否 制造商:Silicon Labs 产品:Development Kits 工具用于评估:C8051F960, Si7005 核心: 接口类型:USB 工作电源电压:
TOOL-WING 制造商:Thomas & Betts 功能描述:MARR
TOOTHPIC 制造商:RF Solutions LTD 功能描述:MODULE BLUETOOTH DATA ACQUISITION 制造商:RF Solutions LTD 功能描述:BLUETOOTH MODULE, 2.48GHZ, 90KBPS 制造商:RF Solutions LTD 功能描述:BLUETOOTH MOD, 2.48GHZ, 90KBPS, DATA ACQUISITION; Supply Voltage Min:4.5V; Supply Voltage Max:5.5V; Signal Range Max:100m; Data Rate:92.16Kbps; Bluetooth Version:Bluetooth 1.1; Bluetooth Class:Class 1; Operating Temperature Min:-20C
TOOTHPICK 制造商:RF Solutions LTD 功能描述:MODULE BLUETOOTH DATA ACQUISITION 制造商:RF Solutions LTD 功能描述:BLUETOOTH MODULE, 2.48GHZ, 90KBPS 制造商:RF Solutions LTD 功能描述:BLUETOOTH MOD, 2.48GHZ, 90KBPS, DATA ACQUISITION; Bluetooth Version:Bluetooth 2.0; Operating Temperature Min:-40C; Operating Temperature Max:85C; Kit Contents:Module Board Docs; Operating Frequency Range:2.402GHz to 2.48GHz ;RoHS Compliant: Yes
TOP 04 制造商:GT LINE 功能描述:TOOL BAG TEAR-RESISTANT 制造商:GT LINE 功能描述:TOOL BAG, TEAR-RESISTANT 制造商:GT LINE 功能描述:TOOL BAG, TEAR-RESISTANT, Carrying Case Material:Tear-proof Fabric, External Wid 制造商:GT LINE 功能描述:TOOL BAG, TEAR-RESISTANT, Carrying Case Material:Tear-proof Fabric, External Width:320mm, External Depth:210mm, SVHC:No SVHC (20-Jun-2013), Colour:Black, External Depth - Metric:210mm, External Width - Metric:320mm, Height:240mm, , RoHS Compliant: NA