Техническая Спецификация для Atmel ATSTK500 500 Starter kit and development system. ATSTK500 ATSTK500
Модели
ATSTK500
AVR068
3
2591C-AVR-06/06
The table describes all states, events and conditions for the handling of incoming
data.
data.
Table 4-1. Protocol Layer State Table
Current State
Event
Condition
Action
Next State
Read character from
inbuf
inbuf
Char == ASCII 27
Get Sequence Number
Read character from
inbuf
inbuf
Char != ASCII 27
Update statistics
Start
Start
Total timeout
Exit with error
Read character from
inbuf
inbuf
Received sequence
number == Sent
sequence number
number == Sent
sequence number
Get Message Size
Read character from
inbuf
inbuf
Received sequence
number != Sent
sequence number
number != Sent
sequence number
Update statistics
Start
Get Sequence Number
Total timeout
Exit with error
Read character from
inbuf
inbuf
Get Message Size 2
Get Message Size 1
Total timeout
Exit with error
Read character from
inbuf
inbuf
Calculate message size
Get Token
Get Message Size 2
Total timeout
Exit with error
Read character from
inbuf
inbuf
Char == ASCII 14
Get Data
Read character from
inbuf
inbuf
Char != ASCII 14
Update statistics
Start
Get Token
Total timeout
Exit with error
Read character from
inbuf
inbuf
Nmb char read ==
MESSAGE_SIZE
MESSAGE_SIZE
Get
Checksum
Read character from
inbuf
inbuf
Nmb char read <
MESSAGE_SIZE
MESSAGE_SIZE
Get
Data
Get Data
Total timeout
Exit with error
Read character from
inbuf
inbuf
Checksum OK
Exit successfully and
handle packet
handle packet
Read character from
inbuf
inbuf
Checksum NOT OK
Update statistics
Start
Get Checksum
Total timeout
Exit with error
The state machine on the STK500 side, which receives incoming packets from the
PC, is similar apart from that there is no total timeout in the reception.
PC, is similar apart from that there is no total timeout in the reception.
The total timeout period is from a command is sent to the answer must be completely
received. The total timeout period is 200 ms for the CMD_SIGN_ON command, 5
seconds for the CMD_READ/PROGRAM_FLASH/EEPROM commands, and 1
second for all other commands.
received. The total timeout period is 200 ms for the CMD_SIGN_ON command, 5
seconds for the CMD_READ/PROGRAM_FLASH/EEPROM commands, and 1
second for all other commands.