initial commit
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
//connect to device
|
||||
device AMA3B1KK-KBR
|
||||
si SWD
|
||||
speed 1000
|
||||
r
|
||||
sleep 10
|
||||
|
||||
//set C runtime environment
|
||||
wreg MSP, 0x10000100
|
||||
|
||||
// erase info0
|
||||
w4 0x10000000 0 // flash info instance
|
||||
w4 0x10000004 0xd894e09e // info 0 key
|
||||
w4 0x10000008 0xFFFFFFFF // clear return value
|
||||
setPC 0x08000085 // call the ROM helper function flash_info_erase_from_sram
|
||||
g
|
||||
sleep 50
|
||||
mem32 0x10000008 1 // dump return value for check
|
||||
|
||||
// program info0
|
||||
w4 0x10000000 0 // flash info instance
|
||||
w4 0x10000004 0 // offset
|
||||
w4 0x10000008 0x800 // length in words
|
||||
w4 0x1000000C 0xd894e09e // info 0 key
|
||||
w4 0x10000010 0xFFFFFFFF // clear return value
|
||||
loadbin info0_artemis_47_115200.bin 0x10001000 //load the info0 binary into sram
|
||||
setPC 0x08000061 // call the ROM helper function flash_program_info_area_from_sram
|
||||
g
|
||||
sleep 50
|
||||
mem32 0x10000010 1 // dump return value for check
|
||||
|
||||
loadbin artemis_svl.bin 0x0000C000 //load SVL into 0xC000 (end of Ambiq bootloader)
|
||||
|
||||
loadbin example1_blink.ino.bin 0x00010000 //load Blink after SVL
|
||||
|
||||
// perform software POI
|
||||
w4 0x40000004 0x1B
|
||||
|
||||
// quit
|
||||
qc
|
||||
@@ -0,0 +1,25 @@
|
||||
Artemis Bootloader
|
||||
==========================
|
||||
|
||||
The Artemis module is loaded with two bootloaders: the ASB and SVL. The Ambiq Secure Boot Loader (ASB) resides from 0x00 to 0xC000. This bootloader is physically part of the IC and is configured using the info0 registers. At power up, if the ASB is not activated, it jumps to 0xC000. The SparkFun Variable Bootloader (SVL) resides at 0xC000 and will wait for an incoming serial character. If a character is received, the baud rate will be auto-detected, the SVL will load new code, then jump to the new user code starting at 0x10000. The SVL times out after 50ms.
|
||||
|
||||
This directory contains the various binaries that are programmed onto each Artemis module:
|
||||
|
||||
* info0_artemis_47_115200.bin - Sets the Ambiq Secure Bootloader (ASB) to 115200bps with boot pin on 47
|
||||
* artemis_svl.bin - the SparkFun Variable Loader (SVL), starts at 0xC000
|
||||
* example1_blink.ino.bin - An example sketch to blink the LED. This shows code has been loaded but will be overwritten with new sketches.
|
||||
|
||||
For more information on the Artemis Bootloader see the Artemis Bootloader in the [Arduino_Apollo3 repo](https://github.com/sparkfun/Arduino_Apollo3/tree/master/bootloaders/artemis/!artemis_svl).
|
||||
|
||||
The ASB is configured based on the documents from Ambiq (Ambiq calls it the secure bootloader or SBL). See \AmbiqSuite-Rel2.x.x\docs\secure_bootloader\ for how to modify the info0 image.
|
||||
|
||||
* Run the bootloader at 921600bps: --u0 0x1C299c0
|
||||
* Currently pin 47 is used for BOOTLOAD: --gpio 0x2f
|
||||
* Bootloader to check if BOOTLOAD pin is high (not low): --gpiolvl 1
|
||||
* Trim timeout to 2500ms: --wTO 2500
|
||||
|
||||
This was used for Artemis v10 module that used pin 47 for boot:
|
||||
|
||||
create_info0.py --valid 1 info0_artemis_47 --pl 1 --u0 0x1C200c0 --u1 0xFFFF3031 --u2 0x2 --u3 0x0 --u4 0x0 --u5 0x0 --main 0xC000 --gpio 0x2f --version 0 --wTO 2500 --gpiolvl 1
|
||||
|
||||
We load a conservative 115200bps image into the Ambiq ASB section so that future updates can be applied. The SparkFun Variable Loader is a variable bootloader capable of operating from 9600bps to 921600bps.
|
||||
Reference in New Issue
Block a user