On 18 July 2012 16:33, Laurent Charpentier <[email protected]> wrote:
> Hi Everyone,
>
> I would like to write to the OTP (One Time Programmable) memory of the 
> STM32F2 thru openocd.
>
> The OTP is part of the Flash according to the reference manual (RM0033 
> Reference manual from ST). The OTP_START_ADDR is 0x1FFF7800. However the OTP 
> memory is not considered as a memory bank (memory banks are used to store 
> programs - range is 0x0800 0000-0x080F FFFF).
>
> I tried to write to the OTP memory using:
> set OTP_START_ADD 0x1FFF7800
> set foo [format "%02X%02X%02X%02X" 0 111 111 102 ] # this is string "foo"
> flash fillw $OTP_START_ADD $foo 1
>
> and openocd return the following error:
> "No flash at address 0x1fff7800"
>
> Looking at the source code for "src/flash/nor/core.c" I saw that the "flash 
> fillw" is coded in a way that only addresses within one of program banks can 
> be used (i.e. 0x0800 0000-0x080F FFFF).
>
> Question: how to write to OTP thru openocd?
>

I am afraid it is not currently supported for the stm32f2x driver,
even writing the options is not supported.
If you fancy having a go then have a look at the stm32ff1x driver as a
reference.

Cheers
Spen

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to