Topic : 80C51 - Flash ScratchPad

Forum : 8051

Original Post
Post Information Post
August 11, 2008 - 2:09pm
Guest

Hi,

In our application we need to store some configuration settings which have to be available at all times, even after power-down / up, but also have to be in-field changable.

For this I am using the Flash ScratchPad area of our 80C51F022 (SiLabs) processor. And the principle works.

However, when I make some software changes using RIDE6 and upload the software through the USB-debugger, the area is filled with 0xFF. The configuration is lost. I wonder why the debugger clears the scratchpad.

Is there a solution to this?

Thanks,
Michael

Replies
Post Information Post
+1
0
-1
August 13, 2008 - 1:02am
Guest

Hi Michael,
iam using the IDE from SiLabs and the MA51/RC51 from Raisonace. The IDE doesn't touch data stored in codemem except he needs to. I've made a lot of flash/bootloaders and had not this kind of problem.
But, what you could try is to move your storage from the scrachpad into the code memory to location (0xFC00-0xFDFD) or better (0xFA00-0xFBFF). Better 0xFA00-0xFBFF because I am unsure about the handling if 0xFDFF is set to 0x00 (read/write/erase lock) and you erase the page at runtime. I think that RIDE is that smart to leave pages untouched if they don't need to be updated.

Kind regards,
Sören

+1
0
-1
August 13, 2008 - 9:00am
Guest

We have to add some new Silabs devices for the next release of RIDE. We will take this opportunity to solve this issue too.

+1
0
-1
August 27, 2008 - 9:22pm
Guest

Hi Soeren,
Thanks for the tip. I just came back from my holiday so I will give it a try soon! I'm sure that it will work, since you are using it already :-)

Hi Francis,
Do you mean that it is a bug in RIDE that the scratchpad is erased?

Regards,
Michael

+1
0
-1
September 2, 2008 - 9:02am
Guest

By default RIDE erases the whole FLASH. It's not a bug but a feature. However, if the programmers need to make the erase operation 'scalable', we should adapt RIDE in that way...

+1
0
-1
September 2, 2008 - 9:39am
Guest

Dear Francis, thank you for your answer.
Clearing the whole flash should be an optional feature (default on for the beginning programmers) in my opinion.
The scratchpad should be kept his function (store info by the software) and not be cleared at all.

I understand that I cannot use RIDE for our program and am forced to use the SiLabs IDE.
How can we solve this?

(RIDE: 06.10.22 - build number BN746-51)