We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
uC: STR912
I am having trouble programmatically setting the OTP lock bit (ie not using JTAG/CAPS to set the lock, but by using firmware running on the STR912 itself). I can read and write the OTP fine, but I cannot set the OTP lock bit.
The ST-supplied library does not provide this function, but the FLASH programming manual downloaded from ST shows the following steps:
1. write 0xC0 to any word address in bank 1 (eg FMI_BANK_1) 2. write 0x01 to any word address in bank 1 whose LSB is 0x08 (eg FMI_BANK_1 | 0x08) 3. poll PECS until operation complete 4. read status 5. write 0x50 to any word address in bank 1 to clear status 6. write 0xff to any word address in bank 1 to return to READ mode
This procedure does not seem to set the LOCK in that I can still further program OTP after doing this. The really odd thing is that the sequence above is exactly the same sequence of operations as to program the value 0x0001 into OTP locations 0x08 and 0x09 (and I do indeed seem to have 0x0001 in locations 0x08 and 0x09) so this documented procedure must be wrong (or I have misinterpreted it).
Can anyone tell me the correct procedure?
Christopher Hicks ==
My understanding to the issue is that for the extended features you need the ICP mode (direct access to the Flash ROM). Maybe you post this question to an ST forum.
Yes, I have done already. If I get an answer I'll copy it here in case it is useful for anyone else.
Christopher Hicks
This sounds like a question to send to an ST support engineer.