4
SK/ZK Series User's Manual
Page 31
i
Note: the Single Step command (in a C source code) and the Step
Over and Step Out commands (both in a C and Assembly source
code) use one hardware breakpoint.
4.4 Notes and Tips
4.4.1 Reading Peripheral Status
Care must be taken when reading some peripheral’s status/data registers,
since a reading operation may cause the clearing of flags. This may happen
when the
Memory
window or the
Data
window is open, since these windows
read microcontroller’s resources during refresh operations.
4.4.2 Breakpoints and the “BGND” Instruction
The
“BGND”
Assembly instruction forces the target microcontroller to enter
the Active Background Debug mode, stopping program execution.
CodeWarrior recognizes this event as a breakpoint and updates the contents
of registers, memory, etc. Successive commands (
“Start/Continue”
,
“Single Step”
, etc.) will continue the execution of the program from the next
instruction.
4.4.3 “STOP” Assembly Instruction
The BDM peripheral doesn’t work in STOP mode. If, on the Condition Code
Register (CCR), the S bit is set, the STOP instruction will stop all the
microcontroller’s activities (and therefore the BDM peripheral). If, on the
other hand, the S bit is reset, the STOP instruction will be executed as two
NOP instructions.