diff options
author | Moritz Fischer <moritz.fischer@ettus.com> | 2019-01-21 09:24:12 -0800 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2019-02-27 00:16:50 +0000 |
commit | f21c12abecb9df244f147740166378ede7ea398e (patch) | |
tree | 3b65180eeb7edf795c3a1ca0eb295e8f8984fa3d /doc | |
parent | 2c76f1ac0e27c643539b604e23435f58fa0af016 (diff) |
flash: stm32f2/f4/f7: Add One-Time-Porgrammable (OTP) support
The OTP is part of the flash memory. It has 512 (1024 for F7) bytes
and is organized in 16 sectors with 32 (64 for F7) bytes each.
The OTP is exposed as separate flash bank 1 and can be used
with the usual flash commands.
Writing the OTP can be done as follows:
> stm32f2x otp 1 enable
> flash write bank 1 foo.bin 0
> mdw 0x1fff7800 4
> verify_image foo.bin 0x1fff7800
> stm32f2x otp 1 disable
Note: This patch is largely a rebase/cleanup of a patch
from 2012 by Laurent Charpentier and he did most of the work.
No new Clang-Analyzer warnings.
Change-Id: I5e6371f6a7c7a9929c1d7907d6ba4724f9d20d97
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Reviewed-on: http://openocd.zylin.com/829
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/openocd.texi | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/openocd.texi b/doc/openocd.texi index 9918cee0..8b03b80b 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -6645,6 +6645,17 @@ the chip identification register, and autoconfigures itself. flash bank $_FLASHNAME stm32f2x 0 0 0 0 $_TARGETNAME @end example +If you use OTP (One-Time Programmable) memory define it as a second bank +as per the following example. +@example +flash bank $_FLASHNAME stm32f2x 0x1FFF7800 0 0 0 $_TARGETNAME +@end example + +@deffn Command {stm32f2x otp } num (@option{enable}|@option{disable}|@option{show}) +Enables or disables OTP write commands for bank @var{num}. +The @var{num} parameter is a value shown by @command{flash banks}. +@end deffn + Note that some devices have been found that have a flash size register that contains an invalid value, to workaround this issue you can override the probed value used by the flash driver. |