From: Andreas F. <and...@gm...> - 2012-07-19 17:36:08
|
On Thu, Jul 19, 2012 at 6:09 PM, Laurent Charpentier <lau...@ya...> wrote: > Hi Spencer, > >> > If you fancy having a go then have a look at the stm32ff1x >> > driver as a reference. >> Yes sure I can add this feature to the project. >> >> Should I consider the OTP bank as an additional bank (bank #12 for >> stm32f2)? > > I found out that I can't simply add a new OTP sector to the existing flash bank: a flash bank is defined as a set of successive sectors (it is not the case for the stm32f2 OTP). I think from a user's perspective it's most suited as a separate (small) flash bank, but I haven't read up on how the write procedure differs from the regular flash bank. I think it would be good to be able to program a single file (elf, or discontinuous hex) into both areas in one step, rather that to have to issue separate flash writes or needing a completely different set of commands. To avoid ruining chips by mistake, I'd think it would be best to have to explicitly write-enable the OTP area via a special command and ignore writes while printing a warning unless it's been enabled. I mean in addition to the hardware unlock procedure that I assume will have to be made as part of the flash write routine. Like stm32f2x otp enable flash write flash_and_otp.elf stm32f2x otp disable /Andreas |