Datasheet

34
AVR079
8133A-AVR-04/08
The XPROG commands are described in the following section. The offsets indicated
are offsets in the XPROG part of the CMD_XPROG command. To find the absolute
offset in the STK600 command, add one.
9.2.1 XPRG_ENTER_PROGMODE
This command enables programming mode in the device by enabling the
programming interface hardware and sending the programming key.
Note: Before using this instruction, the programming interface (PDI or JTAG) must
have been set by the programmer specific ‘set mode’ command.
Table 9-5. Command format.
Offset Field Size Values
0 Command ID
(1)
1 byte XPRG_ENTER_PROGMODE
Notes: 1. The command identifier
Table 9-6. Answer format.
Offset Field Size Values
0 Command ID
(1)
1 byte XPRG_ENTER_PROGMODE
1 Status
(2)
1 byte
Notes: 1. The command identifier.
2. One of the defined error codes.
9.2.2 XPRG_LEAVE_PROGMODE
This command leaves the device’s programming mode by clearing the reset flags and
disabling the programming interface in hardware.
Table 9-7. Command format.
Offset Field Size Values
0 Command ID
(1)
1 byte XPRG_LEAVE_PROGMODE
Notes: 1. The command identifier
Table 9-8. Answer format.
Offset Field Size Values
0 Command ID
(1)
1 byte XPRG_ LEAVE _PROGMODE
1 Status
(2)
1 byte
Notes: 1. The command identifier.
2. XPRG_ERR_OK indicates success.
9.2.3 XPRG_SET_PARAMETER
In order to work correctly, some parameters must be set in the programmer. Use the
following command to initialize the XPROG interface: