2004-11-30 11:59 AM
ST10F269 block+code temporary unprotection
2003-07-16 11:15 AM
I am using Application Note AN1496.
I have set code protection and block protection on all blocks, so the protection register is set to 7F80. The internal flash contains a small code section that performs temporary code unprotection, then loads and runs some code in internal RAM. Code unprotection seems to be working, because read fetches from internal flash return actual code. Now, the code in internal RAM performs the block temporary unprotection command. But when I try writing to internal flash it does not succeed, and it appears that the code temporary unprotection has been disabled because read fetches from internal flash return 009B. The application note is confusing. For example, on page 10, paragraph 2.6.2 on Code Protection says that code temporary protection is ''reset via the Flash Command Interface, hardware, software, watchdog''. Does this mean that a read-reset command resets code temporary unprotection. If so, I can't see how it is possible to do block temporary unprotection, because that requires a read reset command. Also, on page 11 the application note says that it is possible to erase and reprogram blocks that are not protected when code protection is set. How can this work? When the write/erase polling takes place while code protection is set, won't the code protection return 009B instead of the Flash Status Register? The ST10F269 information manual does not contain the statement that code protection allows erase/reprogram. How do you erase or reprogram an ST10F269 that has both code protection and block protection?2003-07-17 06:27 AM
Hello,
A Read/Reset command performed after the ''Code Temporary Unprotect'' will set back the code protection. So you should check carefully that no Read/Reset command is issued. The 4th cycle of the ''Block Temporary Unprotection'' looks like a Read/Rest but is not interpreted as by the Flash interface. So there should be no problem to write/erase the Flash. Concerning the AN1496, it is true that there is an error on page 11. It is not possible to write/erase to the Flash while Code Protected, whatever the settings of the Block protection. A new version is under review.2003-07-17 10:52 AM
Hello ''Kenshin'',
Thank you for the quick reply. I need code protection with the possbility of software upgrade, so the information you have given me satisfies my concern.2004-11-30 11:59 AM
Good Morning, Sir!
I have problem to turn on the Block protection feature on ST10F269, And I just find out that Block protection feature never turn on. According to the application note. Is there any body can provide me some example which can working to turn on the block protection? Thanks and Regards. Joseph Cheng :-[