Atmel ATSTK500 500 Starter kit and development system. ATSTK500 ATSTK500 Hoja De Datos
Los códigos de productos
ATSTK500
24
AVR068
2591C-AVR-06/06
Table 5-61. Answer format
Field
Size
Values
Description
Answer ID
1 byte
CMD_PROGRAM_FLASH_HVSP
Answer id
Status 1
byte
STATUS_CMD_OK or
STATUS_RDY_BSY_TOUT
A Result Value indicating the
result of the operation.
result of the operation.
5.4.4.1 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
• Bit 1-3 are the pagesize bits, pagesize are given in bytes not words, see table
below:
Table 5-62. Pagesize bit configuration
Pagesize
Bit 3, 2, 1
256
0 0 0
2
0 0 1
4
0 1 0
8
0 1 1
16
1 0 0
32
1 0 1
64
1 1 0
128
1 1 1
• 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
• 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 STK500 is limited) this can be used to let 2 or more commands fill the
page buffer of the target device. The transfer data to flash flag should then only be
set on the last command.
to be covered by one Program Flash command (because the amount of available
SRAM in STK500 is limited) this can be used to let 2 or more commands fill the
page buffer of the target device. The transfer data to flash flag should then only be
set on the last command.
Note:
Only Bit 0-3 are set in the XML file, cause Bit 6-7 are not static and must be
controlled by the PC Frontend.
controlled by the PC Frontend.
5.4.5 CMD_READ_FLASH_HVSP
This command will read data from 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 ReadFlash
command is used to read one page in the target device.
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 ReadFlash
command is used to read one page in the target device.
XML path: /AVRPART/ICE_SETTINGS/STK500_2/HvspReadFlash/
Table 5-63. Command format
Field
Size
Values
Description
Command ID
1 byte
CMD_READ_FLASH_HVSP
Command id
NumBytes
2 byte
XML: blockSize
Total number of bytes to read,
MSB first
MSB first