6.5.6.4.1 Entering Interactive Mode

The procedure in Table 6-5 must be performed to enter Interactive debug mode unless an integrity check fails. In that case, the device will automatically enter Interactive debug mode. If there is a cold-plug detection of the debugger, the procedure in Table 6-5 must be followed, regardless of whether the user wants to enter Interactive debug mode.

Table 6-5. Debugger Cold Plug Start-Up Procedure
StepHost/DebuggerTarget/Device
1Assert RESET pinDevice is held in Reset
2Drive at least three pulses on the SWCLK pin; de-assert RESET pinCold-plugging: The debugger is detected, and the Boot ROM starts the system start-up sequence
3 Wait enough time to guarantee that system initialization has completedThe CPU performs mandatory integrity checks and, if any fail, carries out error handling as described in the Error Handling section
4 SW: Set DSU.STATUSA.CRSTEXT to 1’b1 to clear the CPU Reset ExtensionThe CPU continues executing from the Boot ROM
5Wait for DSU.STATUSB.BCCD1 = 1’b1
6 SW: Read DSU.BCC1 for the response code to check if any errors were loggedCPU polls DSU.STATUSB.BCCD0 = 1’b1

After this start-up procedure, the device waits for a command from the host. If no errors are reported, there are only two valid procedures to continue the process.. The host can follow the procedure indicated in Table 6-6 to enter Interactive debug mode or follow the procedure in Table 6-7 to skip it. If any other command is written to DSU.BCC0, the Boot ROM will simply ignore it and continue waiting for one of these commands.

Table 6-6. Interactive Debug Mode Entry Procedure
StepHost/Debugger/TesterTarget/Device
7SW: Write DSU.BCC0 with CMD_IMODEThe CPU polls DSU.STATUSB.BCCD0 = 1’b1 (continued from Step 6 in Table 6-5)
8 Wait for DSU.STATUSB.BCCD1 = 1’b1The CPU reads DSU.BCC0 for the command code and acknowledges CMD_IMODE by writing STATUS_CMD_VALID to DSU.BCC1
9 SW: Read DSU.BCC1 for the response code to confirm entry into Interactive debug modeDevice enters Interactive debug mode
Table 6-7. Interactive Debug Mode Skip Procedure
StepHost/Debugger/TesterTarget/Device
7SW: Write DSU.BCC0 with CMD_EXITThe CPU polls DSU.STATUSB.BCCD0 for the command code (continued from Step 6 in Table 6-5)
8Wait for DSU.STATUSB.BCCD1 = 1’b1The CPU reads DSU.BCC0 for the command code and acknowledges CMD_EXIT by writing STATUS_BOOTOK to DSU.BCC1
9SW: Read DSU.BCC1 for the response code to confirm Boot ROM exitThe CPU completes Boot ROM execution and enters Park mode

If Interactive debug mode is skipped, the normal operation of the Boot ROM continues until it enters Park mode. Refer to the CPU Reset Extension section for details on Boot Entry.

Once in Interactive debug mode, an external Reset or the CMD_EXIT command can be used to exit this mode.