code cannot be uploaded via Arduino IDE to Apollo Edge 1

Hi,

I am using a SparkFun FTDI Basic Breakout - 3.3V (DEV-09873) to connect the Sparkfun Edge board to a Windows 10 laptop. FTDI drivers are installed.

I have the 1.8.10 version of Arduino IDE. The Board is the Sparkfun Edge and the bootloader is the Sparkfun variable loader. I have tried different baud rates including 115200.

I have tried this upload button sequence with no luck:

  • Press and hold the Reset button

    While still holding down the Reset button, press and hold the 14 button

    Release the Reset Button

    Release the 14 button

    Hit Upload in the Arduino IDE (or use your keyboard shortcut

  • The micro_speech sample does compile but it does NOT get uploaded. Unknow Error results. Please see log below:

    Sketch uses 87308 bytes (9%) of program storage space. Maximum is 960000 bytes.
    Artemis SVL Bootloader
    [
    	error receiving packet
    {'len': 0, 'cmd': 0, 'data': 0, 'crc': 1, 'timeout': 1}
    
    unknown error
    Upload failed
    [
    	error receiving packet
    {'len': 0, 'cmd': 0, 'data': 0, 'crc': 1, 'timeout': 1}
    
    unknown error
    Upload failed
    [
    	error receiving packet
    {'len': 0, 'cmd': 0, 'data': 0, 'crc': 1, 'timeout': 1}
    
    unknown error
    Upload failed
    

    1>> Is the upload button-press sequence needed?

    2>> Any suggestions on how to upload the code?

    Thanks,

    Guss H.

    press 14 button

    press reset and while holding 14 button

    while holding the 14 button hit upload on the IDE

    Once it starts uploading you can release 14 button

    Hi Guss - thanks for reaching out. I think we can help.

    This sentence set up a flag:

    The Board is the Sparkfun Edge and the bootloader is the Sparkfun variable loader.

    The Edge board does not come with the SparkFun Variable Loader by default. Have you been able to program the board in the past? That would have been required (using the ‘burn bootloader’ command w/ Ambiq Secure Bootloader selected as the ‘programmer’ option in order to enable the SVL.)

    Assuming that you have an Edge board that you purchased from our website it should come from the factory with the Ambiq Secure Bootloader configured for 921600 baud. These should be the default settings in Arduino IDE when you select the Edge board.

    To use the Ambiq Secure Bootloader you want to understand what the ‘boot’ pin (button 14) does. This button is sampled the the MCU immediately when the MCU comes out of reset state. If the button is pressed down when coming out of reset then the MCU will not go to application code and will instead go to the built-in (permanent) Ambiq Secure Bootloader.

    It is also important to know that most USB-serial converters/terminals will toggle special control lines when a connection is established. These lines are connected to the reset pin of the MCU via an RC circuit on the Edge board. So when a new terminal connection is established the board is reset. (This is a convention stemming from Arduino boards like the Uno)

    Our recommended process to bootload on the Edge board using the Ambiq Secure Bootloader is this:

    1. Press and hold Reset

    2. While holding reset press and hold Button 14

    3. While holding Button 14 release reset

    (intermission: at this point the MCU should be in the bootloader mode but we are not done - because the Serial connection opening will cause another reset cycle and if the bootloader pin (button 14) is not held down at that point the board will go out of bootloader mode. So keep holding Button 14)

    1. Press ‘Upload’ in Arduino

    2. Keep holding button 14 while the sketch compiles and uploads.

    The motion can be very quick - I think of a rocking motion from reset to button 14 where they are both depressed at once before reset is released and you keep actuating button 14.

    That’s the most foolproof method. It is, admittedly, quite a long time to hold Button 14. As you get more experienced and comfortable you will be able to delay your button pressing pattern until just before the Serial connection gets opened (which happens after compilation). You can also let go of button 14 once the connection is established and data is being transferred.

    You can use that process with the ‘burn bootloader’ option (after selecting ‘Ambiq Secure Bootloader’ as your 'Programmer) to upload the SparkFun Variable Loader. This will allow your Edge board to bootload hands-free and with improved reliability.