4.8.2.4 Data Breakpoint Configuration Window for UC3
This window provides configuration options related to data breakpoint for UC3 devices.
Location
Enter a specific address in RAM (e.g., 0x8004
) directly or an expression that evaluates to an address in RAM (e.g., &x
). Make sure the expression you enter represents the address of the data to monitor.
Access Mode
Configure the breakpoint to break on a specific Access Mode. Three types of access modes are supported:
- Read - Program breaks on read at a specified location.
- Write (Default) - Program breaks on write at a specified location.
- Read/Write - Program breaks on read or write at a specified location.
Access Size
Configure the breakpoint to break on a specific Access Size. Four types of access size are supported:
- Any Access (Default) - Program breaks on any access size at a specified location.
- Byte Access - Program breaks on Byte access at a specified location.
- HalfWord Access - Program breaks on HalfWord access at a specified location.
- Word Access - Program breaks on Word access at a specified location.
Example of Setting Access Size
Configuration:
Code:
1: int word = 0; 2: short *halfWord = (short*)&word; 3: 4: int main(void) 5: { 6: word = 0xAABBCCFF; 7: *halfWord = 0xDDEE; 8: }
For the above configuration and code, program breaks at line eight after halfWord
access.
Data Match
Use the Data Match option to configure Data Breakpoint to compare the data at a specified location with a 32-bit value. A successful match triggers a break event.
- Value
Value is a 32-bit (4-byte) value to compare with data at the Location address. The value can be decimal or hexadecimal (e.g.,
100
or0x64
). Based on Access Size, respectively bytes are used for data comparison. For example, if you select 'HalfWord Access' as Access Size and enter0xAABBCCDD
as Value. Then only the last two bytes (0xCCDD
) are used for data comparison. Further, you could refine the Value by specifying Mask.- Mask (Byte)
Each check box controls the significance of the respective byte in the Value field. Select the appropriate checkbox to mask a specific byte in the Value field. The number of check boxes displayed is decided based on Access Size. Four check boxes (one per byte) are displayed for 'Any' and 'Word Access', two check boxes for 'HalfWord Access', and one check box for 'Byte Access'.
- Match Value
A read-only field, which displays masked value based on Access Size, Value, and Mask (Byte) field. A masked byte is represented as
'XX'
, which means that the byte is insignificant in data comparison.