cancel
Showing results for 
Search instead for 
Did you mean: 

F271 iFlash : Word programming alignement

kay
Associate II
Posted on September 24, 2007 at 05:56

F271 iFlash : Word programming alignement

5 REPLIES 5
kay
Associate II
Posted on September 20, 2007 at 08:00

Is it possible to Flash 0xAAAABBBB in the following way to the Adress 0x10000:

first write 0xAAAAFFFF to 10002 and second write 0xFFFFBBBB to 1000?

[ This message was edited by: Flasher2 on 20-09-2007 11:55 ]

mirco23
Associate II
Posted on September 20, 2007 at 09:17

The data sheet of the ST10F271 relating to flash address register low says(page 33):

''Address 15:2

These bits must be written with the Address of the Flash location to program in the following operations: Word Program (32-bit) and Double Word Program (64-bit). In Double Word Program bit ADD2 must be written to ‘0’.''

For word-programming(32-bit) the address should be a multiple of 4 (because the two lowest bits of FARL are not writeable they are ignored), for double word programming (64-bit) the address must be a multiple of 8.

You can programm 0xAAAABBBB to adress 0x10000 in the following way: first write 0xAAAAFFFF to 0x10000, then write 0xFFFFBBBB to 0x10000. (By the way the way the error flag 10ER in FER will be set at the second write)

I think your approach for programming will also work because the address 0x10002 will be converted into 0x10000.

[ This message was edited by: Mirco on 20-09-2007 12:48 ]

kay
Associate II
Posted on September 21, 2007 at 04:35

Its seems that its is not possible to write again on an already written Address????? I cannot change Data from lets say AAAA FFFF to 0000 0000. The Flash seems to be locked?

mirco23
Associate II
Posted on September 21, 2007 at 15:03

I think it must be possible. I programmed a flashloader in 2005 for the ST10F272 - overwriting already programmed addresses is possible with this controller (overwrite ONES with ZEROS only like your example!).

There is another thread (for the ST10F273M):

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

[ This message was edited by: Mirco on 21-09-2007 18:34 ]

[ This message was edited by: Mirco on 21-09-2007 18:35 ]

kay
Associate II
Posted on September 24, 2007 at 05:56

Yes, now it works.

I had forgotten to reset the flag 10ER in FER after the second writing.