![SofTec Microsystems PK-HCS12E128 User Manual Download Page 29](http://html1.mh-extra.com/html/softec-microsystems/pk-hcs12e128/pk-hcs12e128_user-manual_1312321029.webp)
4. Debugging Features
Page 28
4
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.
Notes and Tips
Entering Debug Session with CodeWarrior
When entering a debug session, the target microcontroller’s FLASH memory is
automatically erased, unsecured and programmed with the user application.
Note:
when programming the microcontroller with the user application (after having
unsecured the device), CodeWarrior ignores (doesn’t program) the security bits. As a result,
when entering a debug session, the device is always unsecured, regardless of other user
settings.
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.
Breakpoints and 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.