cancel
Showing results for 
Search instead for 
Did you mean: 

CTU for ST10276

rana
Associate II
Posted on November 14, 2006 at 05:21

CTU for ST10276

5 REPLIES 5
rana
Associate II
Posted on November 13, 2006 at 04:13

Hi all,

I want to use *Access* protection (for all but me), with the update option (for me only).

Can I use CTU (Code Temporary Protection)?

I don't want to use permanent unprotection...

I would like unprotect the whole I-Flash.

Can some one attach an C/ASM code for Temporary Unprotect for I-Flash?

Ran

najoua
Associate II
Posted on November 13, 2006 at 04:36

Hello,

The IFLASH can be temporary unprotected in access by executing the Set Protection operation and writing 1 into ACCP bit in FNVAPR0 (0x0E DFB8), but only if these write instructions are executed from the Flash itself.

Note: It is not necessary to temporary unprotect an access protected Flash in order to update the code: it is, in fact, sufficient to execute the updating instructions from another Flash Bank.

Regards,

Najoua.

[ This message was edited by: Najoua on 13-11-2006 10:31 ]

rana
Associate II
Posted on November 14, 2006 at 04:15

Do You mean, by calling this function which in the I-Flash?

void IF_UnProtect(void)

{

FCR0H |= 0x0100; /* set protection operation */

FARL = 0xDFB8; /* load FNVAPR0 */

FARH = 0x000E;

FDR0L = 0xFFFF; /* DBGP = ACCP = 1 */

FCR0H |= 0x8000; /* operation start */

}

najoua
Associate II
Posted on November 14, 2006 at 05:12

Yes, the Code Temporary Unprotection routine is OK.

Please keep in mind that when both ACCP and DBGP are cleared, there is no possibility to read, erase the IFlash if the user did NOT put INSIDE the Flash itself the unprotection commands.

So the unprotection commands must be put inside the user's application with a special sequence to trigger the unprotection.

Regards,

Najoua.

rana
Associate II
Posted on November 14, 2006 at 05:21

Thank You :)