4.8.2.5 Data Breakpoint Configuration Window for SAM

Above is a data breakpoint window with configuration options for SAM devices.

Location

Enter a specific address (e.g., 0x8004) directly or an expression that evaluates to an address (e.g., &x). Make sure the expression you enter represents the address of the data to monitor.

Note: Data breakpoints on local variables can result in false hits due to the reuse of stack memory. Suggest to declare it as static for debugging purposes.

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.

Address Mask

Use this setting to define the range of addresses to monitor for access.

Byte Count

Enter several address locations to monitor starting at the Location address. The actual range of monitored addresses can be wider than the expected range. E.g., if the Location is 0x23FA and the Byte Count is 5, then the actual range of the monitored addresses is [0x23F8 to 0x23FF]. The way the actual range is computed is by calculating the number of least significant bits that have to be masked in the Location address (0x23FA) to cover the expected range [0x23FA to 0x23FA + 5]. In this case, the number of bits to be masked is three. As a result, the actual range [0x23F8 to 0x23FF] is wider than the expected range [0x23FA to 0x23FF].

Mask Size

The Mask Size is a read-only field, which displays the number of least significant bits masked in the Location address. Mask Size is calculated based on the Byte Count and Location addresses.

Address Range

The Address Range is a read-only field, which displays the actual address range monitored for access. The assortment is a closed interval, including both minimum and maximum addresses.

Data Match

Use the Data Match option to configure Data Breakpoint to compare the data at a specified location with a 32-bit value. The 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 or 0x64). Refine the Value by specifying Mask.

Mask

Use Mask to extract the appropriate bytes from Value to use for data comparison. E.g., if the Value is 0xAABBCCDD and Mask is HalfWord, then the last two bytes (0xCCDD) are extracted from Value and used for data comparison, which means data comparison would succeed for the following matches 0xXXXXCCDD, 0xXXCCDDXX, and 0xCCDDXXXX, where X is a don't care hexadecimal digit (0 to F). Three types of Mask's are supported:

  • Byte - Use the last byte extracted from Value for data comparison.
  • HalfWord - Use the last two bytes extracted from Value for data comparison.
  • Word (Default) - Use the four whole bytes from Value for data comparison.
Match Value

Match Value is a read-only field that displays match values.