2004-12-17 03:19 AM
Problem of Code Temporary Unprotected for ST10F269
2004-12-14 12:01 PM
Good Morning, Everybody!
Now I have a problem for update the internal flash of st10F269 after I have activated code protection and block protection features. But if I activate the only the code protection or block protection, I can update the code without any problem. I only have problem when I update the code after activate both by setting the Flash protection Register to 7FF8H. And I have following question need some persons have experience to provide me some ideas how to solve the problem: 1. When I just turn on block protection function, if I want to reprogram the code inside the internal flash, what I have to do is to copy a small routine of code (i.e. function is erase and copy the program from external flash to the internal flash) to the internal ram first. And then jump to that location and run the program from there. In that routine I have to temporary unprotect that block (like in the instruction table from the manual) and then reprogramming the internal flash. And it is working fine. 2. When I just turn on code protection function, if I want to reprogram the code inside the internal flash, what I have to do is to copy a small routine of code (i.e. function erase and copy the program from external flash to the internal flash) to the internal ram first. And then I have to code temporary unprotected first. And then jump to that location and run the program from there. In that routine I have to reprogramming the internal flash. And it is working fine. 3. When I turn on both code protection function and code protection function, I have try the following way but it do not working. 3.1 I first unprotect the block, unprotected the code, and then copy the routine to external ram and run from there. 3.2 I first unprotect the code, copy the routine to external ram, and run from there, and in the routine unprotect the block. 3.3 I first unprotect the code, unprotect the block, and then copy the routine to external ram and run from there. I have now damage already 5 pieces of ST10F269, Please Help! Many Thanks!!!!! :-[2004-12-15 01:49 AM
Hello,
The following sequence is working. 1- Copy in RAM: # the program and erase functions # the code for Block Temp Unprotect (BTU) 2- Jump to RAM and execute the BTU 3- Jump to Flash and execute the Code Temp Unprotect (CTU) 4- Go back to RAM and do your erase and program operations Attached some assembly code for the CTU and BTU commands. ________________ Attachments : ST10F269_protection.txt : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Nv&d=%2Fa%2F0X0000000bYI%2F5lsZVAnBCCnrN9Lfrf0C.wEn5DlZAe0FfkN_Cj2trKw&asPdf=false2004-12-17 03:19 AM
Good Morning, KenShin!
According to your suggestion, the problem has solved now. Many Thanks! :)