Artemis Nano Upload Fail

The sketch compiles fine, but when it attempts to upload, I’m getting the “Upload failed” message preceded by “Received Unknown Message”.

I was able to upload several times to the unit, (Blink and other samples for testing) but now it’s failing. The latest sketch I uploaded constantly outputs a lot of data to the serial port, and I can see it fine on the serial monitor, so I suspect that its output may be colliding with messages during the upload attempts. I thought the loader should be able to handle that type of situation, but it’s looking like it might not.

I’ve got the right port and board selected, or it probably wouldn’t get that far. I’m using the Ambiq Secure bootloader, because the SparkFun Variable never successfully loaded for me with the other examples.

The bootloader currently indicates that it sent and received a response for Hello, but fails after that. I’ve experimented with changing baud rates and boot loaders, but no luck. I’ve also tried resetting the device at several points in the process hoping to catch it before the sketch starts streaming serial data.

I’ve attached the upload dialog. Any thoughts for getting it to upload?

Thanks.

Here’s the upload dialog:

Header Size = 0x80

original app_size 0x23f4 ( 9204 )

load_address 0xc000 ( 49152 )

app_size 0x23f4 ( 9204 )

w0 = 0xcb002474

Security Value 0x10

w2 = 0x10008080

addrWord = 0xc000

versionKeyWord = 0x0

child0/feature = 0xffffffff

child1 = 0xffffffff

crc = 0x97c26384

Writing to file /var/folders/xh/krqnlgxx283bbx1vs43g95fr0000gn/T/arduino_build_692960/artemis_nano_microphone.ino_OTA_blob.bin

testing: /var/folders/xh/krqnlgxx283bbx1vs43g95fr0000gn/T/arduino_build_692960/artemis_nano_microphone.ino_OTA_blob.bin

Header Size = 0x60

app_size 0x2474 ( 9332 )

Writing to file /var/folders/xh/krqnlgxx283bbx1vs43g95fr0000gn/T/arduino_build_692960/artemis_nano_microphone.ino_Wired_OTA_blob.bin

Image from 0x0 to 0x2474 will be loaded at 0x20000

Connecting over serial port /dev/cu.wchusbserial1440…

Sending Hello.

Received response for Hello

Received Unknown Message

msgType = 0x0

Length = 0x0

[‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘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’, ‘0xfe’, ‘0x0’, ‘0x0’, ‘0x0’]

Fail

Sending Hello.

Received response for Hello

Received Unknown Message

msgType = 0x0

Length = 0x0

[‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’]

Fail

Sending Hello.

Received response for Hello

Received Unknown Message

msgType = 0x0

Length = 0x0

[‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’, ‘0x0’]

Fail

Tries = 3

Upload failed

Hi David,

First of all I do recall having trouble with the Ambiq SBL when the sketch is pumping out lots of Serial data – way back from March when I started toying with the Ambiq SDK and our first Edge prototypes. My solution was to manually put it into the bootloader mode using Button14. That would keep the serial lines clear. On all the Artemis boards, however, we do not expose the bootloader activation pin directly. Instead it is controlled ‘automatically’ with an RC circuit and it is inherently related to the reset and DTR lines. This may be a good argument for always providing the ‘Button14’ equivalent on future boards in addition to the automatic circuit. You may need to try to get access to the ‘Boot’ pin in another way like scraping off some soldermask and soldering to it directly.

Can you provide more information about your setup? What board are you using? They have been programmed with two variations of the Ambiq SBL.

115200 baud: Edge boards from the TensorFlow conference and all the Artemis boards/modules.

921600 baud: Edge boards bought from SparkFun after the TF conference.

Are you using the correct board definition in Arduino? Can you include the command that was used to start the upload process?

As a note about the SVL we just recently discovered some differences across OS platforms when using PySerial. Those caused the SVL to fail on Mac/Linux. What OS are you using? We recently made some changes to the SVL bootloader that have it working at least on Mac. https://github.com/sparkfun/Arduino_Apo … -512240464

Thanks for the reply. I bought the Artemis Nano board from SparkFun, not from the conference. I’m using the local Arduino IDE 1.9.0 beta, because I’m running it on a Mac with OS X Catalina that requires the 64-bit version of the Arduino studio. I’ll take a look at the link you sent to see about updating the SVL bootloader, and I’ll see what I can do to implement a Button14 on the Nano. I appreciate the help.

Not sure how to proceed from here. I took a look at the link, but didn’t get anything I could use. I tried the Burn Bootloader command from the Arduino IDE, but it failed immediately. I’ve tried all the available baud rates for both the variable and secure loaders, but no luck. I compared the schematic for the Artemis Nano with a larger board that has the Button14 circuitry, but it doesn’t look like it’s an option; at least not without doing some sort of microsurgery on the board.

So it looks like this unit is bricked, simply by loading a sketch. It’s a shame, because I was thinking of using the Artemis Nano for some upcoming design projects. But I need a board design that I can depend on to not fail this way. So I don’t think I’ll be ordering a replacement for now. Let me know if you guys do a redesign or figure out how to fix this thing and I’ll be happy to give it another try.

Thanks.

David, I’ve just released v1.0.4 of the Arduino core which includes a significantly improved bootloader. It was able to recover from a no-delay Serial print while loop on the main bootloading UART. You should check it out. Unfortunately you will need to upload the new bootloader firmware to your board but with this problem doing so will require a SWD programmer.

Also I will ask a Technical Support moderator to get involved regarding your board because I suspect we may be able to help you find a solution.

Hi David,

Sorry to hear about your struggles with your new Artemis Nano. From what I understand, you may be able to recover the board but it is not really going to be a reasonable solution and might require a SWD programmer. Instead, I think the best solution here would be to just get you a replacement Artemis Nano. To start that process and assuming you purchased the board directly from us, please fill out the form on [this page and in the “Why do you want an RMA?” box, fill in a brief description and a link to this topic. We will reply with further instructions on the return/replacement process.](Return Policy - SparkFun Electronics)

Thanks very much for the help. I sent the RMA using the link you provided. I’m hoping changes to the uploader will take care of the issue.