Hi All..I am using TWRK70F120M Tower Board and IAR Compiler. I want to write WORD and INT values to Flash and read them , but unable to do so. I am able to write string values into flash.Please let me know how to write WORD and INT values

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Hi All..I am using TWRK70F120M Tower Board and IAR Compiler. I want to write WORD and INT values to Flash and read them , but unable to do so. I am able to write string values into flash.Please let me know how to write WORD and INT values

537 Views
snehahegde
Contributor I

Hi All..I am using TWRK70F120M Tower Board and IAR Compiler. I want to write WORD and INT values to Flash and read them , but unable to do so. I am able to write string values into flash.Please let me know how to write WORD and INT values

0 Kudos
1 Reply

357 Views
mjbcswitzerland
Specialist V

Hi

The K70 can write only phrases to Flash (that is, 8 byes on an 8 bye boundary).

If you want to write 8, 16 or 32 bit values you need to write them to a RAM buffer (phrase buffer) of the same size as the phrase to be programmed and always program a complete phrase. You can only program a phrase once and not reprogram a part of it so you can chose to either prepare multiple 8, 16 or 32 bit values in the phrase buffer until full and then write to Flash, or you can chose to write the value that you are interested in to occupy always a complete phrase buffer of its own.

Regards

Mark

0 Kudos