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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

1,052 次查看
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 项奖励
回复
1 回复

872 次查看
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 项奖励
回复