Skip to content

Commit e99e41c

Browse files
author
Nathan Seidle
committed
Increasing wrong character timeout to 30 to fix 'no annoucement' error.
I had a sketch reporting 'No announcement from Artemis bootloader'. This occurs when either 1) no chr(127) is received or 2) too many non-chr(127) characters are received. The sketch I was working on transmits a ton of serial data at 115200 constantly. After the Artemis is reset, the python script has more than 10 bytes sitting in the buffer. 30 seems to work well. With a 0.1s timeout, this is 3s total. Increasing to 50 seems overkill.
1 parent 297d1d4 commit e99e41c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tools/artemis/artemis_svl.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This script was originally written by Ambiq
55
# Modified April 2nd, 2019 by SparkFun to auto-bootloading
66
# Compiled to executable using pyInstaller
7-
# pyinstaller --onefile artemis_uart_loader.py
7+
# pyinstaller --onefile artemis_svl.py
88

99
import argparse
1010
import serial
@@ -86,12 +86,12 @@ def main():
8686

8787
verboseprint("Waiting for command from bootloader")
8888

89-
# Wait for incoming char(5) indicating ability to boot
89+
# Wait for incoming BL_COMMAND_ANNOUNCE
9090
i = 0
9191
response = ''
9292
while len(response) == 0:
9393
i = i + 1
94-
if(i == 10):
94+
if(i == 30):
9595
print("No announcement from Artemis bootloader")
9696
exit()
9797

tools/artemis/windows/artemis_svl.exe

-596 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)