aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRick Foos <rfoos@solengtech.com>2016-02-08 15:19:30 -0600
committerFreddie Chopin <freddie.chopin@gmail.com>2016-05-14 12:18:31 +0100
commit060e9c3b36a8cf109011e15e445745bc14396b35 (patch)
tree5731a16fb905bcca6d64476c04d6d8798a18e63a /doc
parent9ef034cb09210513e523e73a93a03f0bb4cad8a8 (diff)
downloadriscv-openocd-060e9c3b36a8cf109011e15e445745bc14396b35.zip
riscv-openocd-060e9c3b36a8cf109011e15e445745bc14396b35.tar.gz
riscv-openocd-060e9c3b36a8cf109011e15e445745bc14396b35.tar.bz2
flash/nor: Add Ambiq Micro Apollo flash driver.
Initial release of Ambiq Micro Apollo flash driver supporting our sub-threshold (low power) Cortex M4F part, and Evaluation Kit. We have been shipping openocd to our customers for about one year. The EVK boards are SWD only using ftdi. We also use two of the other COM instances to display debug information. It takes about 15 seconds to flash 512K, and mass erase is about 5 seconds. Tested by internal verification group, FAE's, and customer sites. Merged commit 'refs/changes/17/3417/1' as suggested. Makefile.am and drivers.c follow the new format to avoid conflicts. Removed unused fault_capture command. Added documentation for flash driver. Change-Id: Iae92d869369c6827244f0071f9cb522d8d91fed8 Signed-off-by: Rick Foos <rfoos@solengtech.com> Reviewed-on: http://openocd.zylin.com/3230 Tested-by: jenkins Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/openocd.texi46
1 files changed, 46 insertions, 0 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi
index ec0e926..3e7fc7f 100644
--- a/doc/openocd.texi
+++ b/doc/openocd.texi
@@ -4960,6 +4960,52 @@ flash bank $_FLASHNAME aduc702x 0 0 0 0 $_TARGETNAME
@end example
@end deffn
+@deffn {Flash Driver} ambiqmicro
+@cindex ambiqmicro
+@cindex apollo
+All members of the Apollo microcontroller family from
+Ambiq Micro include internal flash and use ARM's Cortex-M4 core.
+The host connects over USB to an FTDI interface that communicates
+with the target using SWD.
+
+The @var{ambiqmicro} driver reads the Chip Information Register detect
+the device class of the MCU.
+The Flash and Sram sizes directly follow device class, and are used
+to set up the flash banks.
+If this fails, the driver will use default values set to the minimum
+sizes of an Apollo chip.
+
+All Apollo chips have two flash banks of the same size.
+In all cases the first flash bank starts at location 0,
+and the second bank starts after the first.
+
+@example
+# Flash bank 0
+flash bank $_FLASHNAME ambiqmicro 0 0x00040000 0 0 $_TARGETNAME
+# Flash bank 1 - same size as bank0, starts after bank 0.
+flash bank $_FLASHNAME ambiqmicro 0x00040000 0x00040000 0 0 $_TARGETNAME
+@end example
+
+Flash is programmed using custom entry points into the bootloader.
+This is the only way to program the flash as no flash control registers
+are available to the user.
+
+The @var{ambiqmicro} driver adds some additional commands:
+
+@deffn Command {ambiqmicro mass_erase} <bank>
+Erase entire bank.
+@end deffn
+@deffn Command {ambiqmicro page_erase} <bank> <first> <last>
+Erase device pages.
+@end deffn
+@deffn Command {ambiqmicro program_otp} <bank> <offset> <count>
+Program OTP is a one time operation to create write protected flash.
+The user writes sectors to sram starting at 0x10000010.
+Program OTP will write these sectors from sram to flash, and write protect
+the flash.
+@end deffn
+@end deffn
+
@anchor{at91samd}
@deffn {Flash Driver} at91samd
@cindex at91samd