Always tickle watchdog in main loop
Otherwise during initial setup or wakeup, nothing may happen for long enough to trigger a watchdog reset into the bootloader.
This commit is contained in:
@@ -438,7 +438,8 @@ _mainloop:
|
|||||||
; Tickle watchdog
|
; Tickle watchdog
|
||||||
MOV A, #0x5a
|
MOV A, #0x5a
|
||||||
B0MOV WDTR, A
|
B0MOV WDTR, A
|
||||||
@@:
|
|
||||||
|
; Check for any events that need handling
|
||||||
B0BTS0 FEP0SETUP ; Jump if SETUP packet rx'd
|
B0BTS0 FEP0SETUP ; Jump if SETUP packet rx'd
|
||||||
JMP _usb_setup
|
JMP _usb_setup
|
||||||
B0BTS0 FEP0OUT
|
B0BTS0 FEP0OUT
|
||||||
@@ -451,9 +452,11 @@ _mainloop:
|
|||||||
JMP _usb_sof
|
JMP _usb_sof
|
||||||
B0BTS0 FSUSPEND
|
B0BTS0 FSUSPEND
|
||||||
JMP _usb_suspend
|
JMP _usb_suspend
|
||||||
B0BTS1 tpIRQ
|
B0BTS1 tpIRQ ; Level-triggered, reset by reading data over I2C
|
||||||
JMP _tp_update
|
JMP _tp_update
|
||||||
JMP @B
|
|
||||||
|
; Rinse and repeat
|
||||||
|
JMP _mainloop
|
||||||
|
|
||||||
_usb_suspend:
|
_usb_suspend:
|
||||||
MOV A, #'P'
|
MOV A, #'P'
|
||||||
|
|||||||
Reference in New Issue
Block a user