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.
| Step | Host/Debugger | Target/Device |
|---|---|---|
| 1 | Assert RESET pin | Device is held in Reset |
| 2 | Drive at least three pulses on the SWCLK pin; de-assert RESET pin | Cold-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 completed | The 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 Extension | The CPU continues executing from the Boot ROM |
| 5 | Wait for DSU.STATUSB.BCCD1 = 1’b1 | |
| 6 | SW: Read DSU.BCC1 for the response code to check if any errors were logged | CPU 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.
| Step | Host/Debugger/Tester | Target/Device |
|---|---|---|
| 7 | SW: Write DSU.BCC0 with CMD_IMODE | The CPU polls DSU.STATUSB.BCCD0 = 1’b1 (continued from Step 6 in Table 6-5) |
| 8 | Wait for DSU.STATUSB.BCCD1 = 1’b1 | The 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 mode | Device enters Interactive debug mode |
| Step | Host/Debugger/Tester | Target/Device |
|---|---|---|
| 7 | SW: Write DSU.BCC0 with CMD_EXIT | The CPU polls DSU.STATUSB.BCCD0 for the command code (continued from Step 6 in Table 6-5) |
| 8 | Wait for DSU.STATUSB.BCCD1 = 1’b1 | The CPU reads DSU.BCC0 for the command code and acknowledges CMD_EXIT by writing STATUS_BOOTOK to DSU.BCC1 |
| 9 | SW: Read DSU.BCC1 for the response code to confirm Boot ROM exit | The 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.
