The programming sequence is identical when using
the EBC units, regardless of whether the debug software or the application is
programing the units. A typical programming sequence for a unit is:
- Read and make sure the
ownership is set as expected; if not, acquire the ownership before
proceeding further if required.
- Make sure the unit is in IDLE
mode.
- Set up the address reference,
mask, bus select and stop bits.
- Enable the corresponding
module bit in the global enable register.
- Once the usage is completed,
write 1 to clear the EVENT_FIRED sticky bit. This takes the module back to
the enabled state.
The example programming sequences for hardware
breakpoints and hardware watch points are:
Set a hardware breakpoint on address 0x201000:
- Read OWNER to confirm
ownership.
- Read EBC_STATUS to confirm
the module is in IDLE state.
- Write 0x0 to
EBC_MASKH/MASKL.
- Write 0x201000 to
EBC_REFH/REFL.
- Enable the corresponding
module bit in the EBC enable register.
Set a hardware watch point on read of addresses
from 0x121010 to 0x12101F:
- Read OWNER to confirm
ownership.
- Read EBC_STATUS to confirm
the module is in IDLE state.
- Write 0xF to
EBC_MASKH/MASKL.
- Write 0x121010 to
EBC_REFH/REFL.
- Enable the corresponding
module bit in the global enable register.
Set a hardware watch point on write to address
0xFF10101A:
- Read OWNER to confirm
ownership
- Read EBC_STATUS to confirm
the module is in IDLE state
- Write 0x0 to
EBC_MASKH/MASKL
- Write 0xFF10101A to
EBC_REFH/REFL
- Enable the corresponding
module bit in the global enable register.