Atmel ATSTK600 500 Starter Kit and Development System. ATSTK600 ATSTK600 Data Sheet

Product codes
ATSTK600
Page of 61
 
22 
AVR079 
8133A-AVR-04/08 
Table 6-5. Command format. 
Field Size 
Values 
Description 
Command ID 
1 byte 
CMD_CHIP_ERASE_HVSP Command 
id 
pollTimeout 
1 byte 
XML: pollTimeout 
Timeout period (in ms) to wait for RDY/BSY flag 
to rise. If 0, RDY/BSY flag is NOT used. 
eraseTime 
1 byte 
XML: eraseTime 
Delay (in ms) to ensure that the erase of the 
device is finished. If 0, polling will be used. 
 
Table 6-6. Answer format. 
Field Size 
Values 
Description 
Answer ID 
1 byte 
CMD_CHIP_ERASE_HVSP 
Answer id 
Status 
1 byte 
STATUS_CMD_OK or 
STATUS_RDY_BSY_TOUT 
Result Value indicating the result of the 
operation.  
 
6.4 CMD_PROGRAM_FLASH_HVSP 
This command will program data into the FLASH memory of the target device if it 
succeeds. For devices with the FLASH organized in pages, the data address and size 
used with this command must confirm to that of the device. I.e. one ProgramFlash 
command is used to program one page in the target device. 
XML path: /AVRPART/ICE_SETTINGS/STK600/HvspProgramFlash/ 
Table 6-7. Command format. 
Field Size 
Values 
Description 
Command ID 
1 byte 
CMD_PROGRAM_FLASH_HVS
Command id 
NumBytes 
2 byte 
XML: blockSize 
Total number of bytes to program, MSB first 
Mode
(1)
 
1 byte 
XML: mode 
Mode byte, *see description below 
pollTimeout 
1 byte 
XML: pollTimeout 
pollTimeout (in ms) 
Data 1 
1 byte 
 
Data 1 
… ..... 
..... 
...... 
Data N 
1 byte 
 
Data N 
Notes: 
1.  See details in table below. 
 
Mode byte description 
•  Bit 0: This bit indicates whether to use byte ‘0’ or page ‘1’ programming.  
•  Bit 1-3 are the pagesize bits, pagesize are given in bytes not words, see table 
below. 
•  Bit 4-5 are not in use.  
•  Bit 6 must be set to ‘1’ when it is the very last page to be programmed, otherwise 
‘0’ 
•  Bit 7 indicates if a page write should be issued (Transfer data to flash). Normally it 
should always be set ‘1’. However, if the page size of the target device is too large 
to be covered by one Program Flash command (because the amount of available 
SRAM in STK600 is limited) this can be used to let 2 or more commands fill the