cancel
Showing results for 
Search instead for 
Did you mean: 

Problem to turn on the Block Protection on F269

jkscheng
Associate II
Posted on December 13, 2004 at 07:03

Problem to turn on the Block Protection on F269

4 REPLIES 4
jkscheng
Associate II
Posted on November 30, 2004 at 21:17

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 examples in assmebly which is working to turn on the block protection?

Thanks and Regards.

Jospeh Cheng :-[

najoua
Associate II
Posted on December 01, 2004 at 04:43

Hello,

Find two files flash.c and flash.h in the following link:

http://mcu.st.com/modules.php?mop=modload&name=Splatt_Forums&file=viewtopic&topic=788&forum=5

They contain programming/erasing routines for ST10F269. There is a routine (but in C and not in assembler) named '' FlashProtectBlock(unsigned short Block) '' enabling the protection of the block that you want.

I hope this helps you.

jkscheng
Associate II
Posted on December 02, 2004 at 04:35

Good Morning, Sir!

I have try to used the link you provided and I have download it from the web, but Actually, I can not get it working.

MOV R5,#FCI3 ;Command address

MOV R6,#FCI4 ;Command address

%WRFCI (#RPS)

MOV R13,#6 ;Odd word address

MOV R7,[R13]

%*DEFINE (WRFCI (EPCcmd)) (

MOV R7,#CIE1

MOV [R5],R7

MOV R7,#CIE2

MOV [R6],R7

MOV R7,%EPCcmd

MOV [R5],R7

)

And I just find that When I expect I can read the Protection Regsiter, It is actually the data which I store inside the Flash. And I find something in the manual that i have to reset the Protection interface after I have read protection register for one times.

Please somebody have some workable assembly to turn on the flash protection. Many Thanks for all !!!! I have work on this problem for three whole day already. :-[

jkscheng
Associate II
Posted on December 13, 2004 at 07:03

Good Morning, EveryBody!

I have finally found out that the problem is casued by I have not write a Read/Reset command after I have Read protection status.

Thanks for all who have help to solve the problem.

Joseph Cheng