EmbeddedRelated.com
Forums

Non volatile memory problems

Started by "dyn...@ymail.com" June 24, 2013
I'm used rcm5600w with DC 10.56. I try to store data in nonvolatile memory with the following code, the problem arise when I tried unplugging the power supply for a few minutes and turn on the power supply to read the data I stored, I lost the data. Is there any wrong with this program? Thanks.
The first question to ask is have you got a battery connected to the battery voltage pins on the RCM5600W?

Second question is why not use the bbram qualifier on the variable definitions to position the data in BBRAM? This makes life much simpler.

Looking at the .org file for the RCM5600 build of my BACnet stack demo, the RCM5600 by default has 20K of the 32K BBRAM allocated for a special buffer for FAT file operation and 12K allocated in extended memory. As far as I can recall you can actually recover the 20K for your own use if you are not using any of the FAT libraries but off the top of by head I'm not sure exactly what you have to do.

Regards,
Peter
I don't have a battery connected to the battery backup. RCM5600w only have power supply from usb download cable.

After knowing the advantages bbram compared to storage nonvolatile data in flash, I interested to use it, thanks pater for the advice.

Is't true when data store in flashed will be lost if the battery backup and the power supply is removed? Thanks.
On 6/25/2013 1:04 PM, d...@ymail.com wrote:
> I don't have a battery connected to the battery backup. RCM5600w only have power supply from usb download cable.
>
> After knowing the advantages bbram compared to storage nonvolatile data in flash, I interested to use it, thanks pater for the advice.

The 5600W has no battery-backed RAM. So, even if you attached a battery,
all RAM data will be lost if power is lost.

>
> Is't true when data store in flashed will be lost if the battery backup and the power supply is removed? Thanks.

Flash is non volatile. The 5600W has serial flash, you'll have to see if
DC has a way to use part of it for data. I think DC uses it for the user
block functions. You'll have to look at those functions in the docs.
--
------
Scott G. Henion, Consultant
Web site: http://SHDesigns.org
------
Oops, my mistake. It is the RCM6700 which has the internal 32K of BBRAM in the Rabbit 6000 CPU. The battery backup on the RCM5600W is only for the RTC.
Oo.. rcm5600w has no battery-backed RAM :(. Btw, Thanks Scott.. for the suggestions and explanations. I now understand.