From: Laurent C. <lau...@ya...> - 2012-07-18 15:33:37
|
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? Thank you. Laurent |