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:
-
Press and hold Reset
-
While holding reset press and hold Button 14
-
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)
-
Press ‘Upload’ in Arduino
-
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.