2007-09-23 08:56 PM
F271 iFlash : Word programming alignement
2007-09-19 11:00 PM
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 ]2007-09-20 12:17 AM
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 ]2007-09-20 07:35 PM
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?
2007-09-21 06:03 AM
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 ]2007-09-23 08:56 PM
Yes, now it works.
I had forgotten to reset the flag 10ER in FER after the second writing.