# Atmel EDBG-based Tools Protocols
Hints and tips:

### Activate and deactivate physical

Once configuration is complete, the host requests that the tool makes a connection to the target by calling the “activate physical” command. In many interfaces, the physical can be disabled by default or overridden by user code, which implies that the external reset must be applied in order to gain access. In other cases, the external reset may not be used, for example when attaching to a running process. The use of external reset must be specified in the command parameter.

Activating the physical must be followed by device ID validation, to ensure that the session is capable of starting with the device that is expected. For this reason, the activation command returns a DATA packet containing the device ID of the target, as read directly from the target. If no valid device is detected, the command will return FAILED. Device ID return format is given here:

Table 138. ID formats

Interface | Format | Example
--- | --- | ---
debugWire | 00 1E xx yy | 00 1E 94 05
JTAG | JTAG ID | 09 74 C0 3F
PDI | JTAG ID equivalent | 09 74 C0 3F

The Get ID command can also be used to retrieve this value at any stage during the session. It is read out on demand and not cached, so be aware that the IR value will be altered during this process when using JTAG.

On completion of a session, the physical must be deactivated. The tool disconnects from the target at this point. In order to re-connect, the physical must be activated again.

Commands for leaving programming mode or detaching from a debug session may implicitly require that the physical is deactivated. If this is the case, the deactivation should be performed as usual. To start a new session, the physical should be activated again.

Prev | Up | Next
| Home |