Hour counter

Started by albe...@yahoo.it April 22, 2010
Hello, I'm tring to store a number in the flash memory but the SetWordFlash() gives me every time error 9 (myTempByte) and the flash is not written.

I've declared a global "const int myContaOre" variable to store the value.
Setwordflash is the function of the bean to reprogram teh internal flash.
where is the prblem? why the procedure does not write the location?

const int myContaOre;
myTempByte = IFsh1_SetWordFlash((unsigned long) &myContaOre, myTempContaOre);
Thank you
Hello Alberto,

unfortunately I don't know the PE beans for this, so just a general hint for the troubleshooting: Flash Cells can be written only in a way that "1"s can be set to "0"s. To set "0"s to "1"s again, you have to erase the whole page.
In general, this means that you can's just write in a way you used to so it with RAM. A writing to a previously written address has to be preceeded by a page erase.

Yours,
Georg

-----Eredeti enet-----
Felad m... meghatalmaz a...@yahoo.it
Kdve: 2010. 04. 21., Sze 12:22
Czett: m...
Tgy: [motoroladsp] Hour counter

Hello, I'm tring to store a number in the flash memory but the SetWordFlash() gives me every time error 9 (myTempByte) and the flash is not written.

I've declared a global "const int myContaOre" variable to store the value.
Setwordflash is the function of the bean to reprogram teh internal flash.
where is the prblem? why the procedure does not write the location?

const int myContaOre;
myTempByte = IFsh1_SetWordFlash((unsigned long) &myContaOre, myTempContaOre);
Thank you

_____________________________________