I am flashing a Sparkfun edge board with the SparkFun Serial Basic Breakout - CH340G using some of the examples that the IDE provides in the oficial tutorial.
Although, it has properly worked many times, mainly for the examples example1_edge_test and AI on a microcontroller with TensorFlow Lite and SparkFun Edge, sometimes I get this message when flashing:
Connecting with Corvette over serial port /dev/ttyUSB0...
Sending Hello.
Received response for Hello
Received Unknown Message
msgType = 0x131
Length = 0x5800
['0x80', '0x6', '0xf0', '0xa5', '0x31', '0x1', '0x0', '0x58', '0x0', '0x3', '0x0', '0x0', '0x0', '0xa0', '0xff', '0x4', '0x0', '0x2', '0x0', '0x0', '0x0', '0x7', '0x0', '0x0', '0x0', '0x1', '0x0', '0x0', '0x0', '0xff', '0xa3', '0x2d', '0xff', '0xff', '0x5f', '0x5', '0x0', '0x1', '0x0', '0x0', '0x0', '0x3', '0x0', '0xf4', '0x49', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff', '0xff']
!!!Wired Upgrade Unsuccessful!!!....Terminating the script
It seems to happen when the script AmbiqSuite-Rel2.0.0/AmbiqSuite-Rel2.0.0/boards/SparkFun_Edge_BSP/bsp/tools/uart_wired_update_sparkfun.py establishes the connection with the board, which responses with a different (unknown) message than the one expected for a UART flashing: AM_SECBOOT_WIRED_MSGTYPE_STATUS.
I flash the board holding the button '14', pressing 'reset', and then executing 'make bootload' while holding '14'.
EDIT: WORKAROUND
I've continued troubleshooting this issue and it has to be related to the communication timing since when I change the baud rate (initially set to 921600), the error occurs more often.