Datasheet

AVR079
11
8133A-AVR-04/08
devices with page size bigger than what can be transferred to STK600 in one
command, several CMD_PROGRAM_FLASH_ISP commands must be issued. In
such a case, only the last command should have the Write Page mode bit set.
NOTE: Only bit 0-6 are set in the XML file, because bit 7 is not constant and must be
controlled by the PC software.
When value polling is used to determine when a programming operation is complete,
poll1 must be supplied. This value indicates which value will be read from the device
until the programmed value is read. This indicates end of programming. poll2 is used
only for EEPROM programming.
Table 4-9. Answer format.
Field Size Values Description
Answer ID 1 byte CMD_PROGRAM_FLASH_ISP Answer id
Status 1 byte
STATUS_CMD_OK,
STATUS_CMD_TOUT,
STATUS_RDY_BSY_TOUT
A status value indicating the result of the
operation
4.5 CMD_READ_FLASH_ISP
This command will read data from the FLASH memory of the target device if it
succeeds.
XML path: /AVRPART/ICE_SETTINGS/ STK600/IspReadFlash/
Table 4-10. Command format.
Field Size Values Description
Command ID 1 byte CMD_READ_FLASH_ISP Command id
NumBytes 2 byte XML: blockSize Total number of bytes to read, MSB first
cmd1 1 byte
Read Program Memory command byte #1.
Low/High byte selection bit (3
rd
bit) is handled in
the FIRMWARE.
Table 4-11. Answer format if the command was executed.
Field Size Values Description
Answer ID 1 byte CMD_PROGRAM_FLASH_ISP Answer id
Status1 1 byte STATUS_CMD_OK Indicates success. Will always read OK
Data N bytes The data read from the device
Status2 1 byte STATUS_CMD_OK
A status value indicating the result of the
operation. Will always read OK
Table 4-12. Answer format if the command was executed.
Field Size Values Description
Answer ID 1 byte CMD_PROGRAM_FLASH_ISP Answer id
Status 1 byte STATUS_CMD_FAILED Indicates failure