Техническая Спецификация для Atmel ATSTK600 500 Starter Kit and Development System. ATSTK600 ATSTK600

Модели
ATSTK600
Скачать
Страница из 61
 
AVR079
 
 
7
8133A-AVR-04/08 
3.9 CMD_CHECK_TARGET_CONNECTION 
Table 3-20. Command format. 
Field Size 
Values 
Description 
Command ID 
1 byte 
CMD_CHECK_TARGET_CONNECTION 
Command id 
 
Table 3-21. Answer format. 
Field Size 
Values 
Description 
Answer ID 
1 byte 
CMD_LOAD_EC_ID_TABLE 
Answer id 
Answer value 
1 byte 
Se table below. 
Status of target connection 
Status 
1 byte 
STATUS_CMD_OK  
 
 
This command runs a target connection check and returns the status of the target 
connection. 
The value is 6bits, where bit 0-2 indicates the status of the short circuit protection 
system and bit 4-5 indicates if the ISP is connected correctly to the target system. 
Bit 4-5 will only indicate correct target connection if the target is powered. 
Bit 3 is “Don’t care”. 
Table 3-22. bit descriptions. 
Bit # 
Status 
0 STATUS_CONN_FAIL_MOSI 
 
1 STATUS_CONN_FAIL_RST 
 
2 STATUS_CONN_FAIL_SCK 
 
4 STATUS_ISP_READY 
5 STATUS_TGT_REVERSE_INSERTED 
 
 
The corresponding bit will be set ‘1’ to indicate an error. 
That is, if a line is short circuited, if target is not detected or the plug is inserted with a 
reverse orientation. 
If the value 0x00 is returned it means the connection is ok. 
The parameter should be checked before starting a programming sequence to check 
if target connection is correct (bit 4-5). 
It should also be checked after a programming sequence if the command failed, to 
check if the operation failed because of a short circuit. 
A short circuit can only be detected after the command Enter Progmode has been 
issued, because the control circuits of the STK600 is isolated via switches when the 
STK600 is in idle mode. 
4 ISP Programming Commands 
These commands handles FLASH, EEPROM, fuse bytes, lock bits, signature and 
oscillator calibration programming in ISP mode.