4.8.2.2 Data Breakpoint Configuration Window for megaAVR®
This window provides configuration options related to the data breakpoint for ATmega devices. Address mask is optional.
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.
Address Mask
Address Mask on Mega Data Breakpoints is optional. Use address mask to break on more than one address or a range of addresses on special access.
- Mask
Mask value to mask the Location address to define more than one address or range of addresses. Bits with value
1
in the mask are significant bits, and0
are don't care bits.In general, for a given address A and mask M, an address B successfully matches when:
(A) & (M) == (B) & (M), where A is the resolved address for the expression entered in Location, M is the mask value entered in Mask and B is any address in RAM.
- Masked Address
This is a read-only field that shows the range of matching addresses on which the program can break. The masked address is shown in the binary format for simplicity. 'X' represents the don't care bits while the remaining bits are expected to match.
E.g., 0b000000010XX000XX means it can break as per access mode, at addresses that have all bits as per this string except X bits. In this case, the 0th, 1st, 5th, and 6th bit (LSb) can be anything since these bits are don't care (X).