avr/modules/flash: make protocol more robust
- wait for ATTN high after error receiving a packet - use different wait times when waiting for FLASH_START and FLASH_DATA
This commit is contained in:
@@ -135,6 +135,11 @@ ioRawWaitForValidMsg_attnLow:
|
||||
ldi r17, FLASH_RECVBUFFER_MAXLEN-3
|
||||
rcall ioRawReceivePacketIntoBuffer
|
||||
brcs ioRawWaitForValidMsg_packetReceived
|
||||
; wait until ATTN is high (up to 10s)
|
||||
ldi r16, 0xff ; expect ATTN high
|
||||
ldi r17, 100
|
||||
rcall ioWaitForAttnState100ms ; wait for up to 10s
|
||||
clc
|
||||
ret
|
||||
ioRawWaitForValidMsg_packetReceived:
|
||||
ldi r16, 0xff ; expect ATTN high
|
||||
|
||||
Reference in New Issue
Block a user