| Newsgroups |
gmane.comp.hardware.rabbit-semiconductor |
| Message-ID |
<[email protected]> |
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.
--- In [email protected], "petermcs" <petermcs@...> wrote:
>
> 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
>
> --- In [email protected], "dynamic_c@" <dynamic_c@> wrote:
> >
> > 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.
> >
> > #use "rcm56xxw.lib"
> >
> > #define dataADDR 0x1B28BUL // physical address of nonvolatile memory
> > #define dataLength 12
> >
> > char *const data = "this is data";
> > char *temp;
> >
> > void main(){
> >
> > brdInit();
> >
> > // close this line and remove power supply
> > // for testing nonvolatile memory
> > // write data to nonvolatile memory
> > //root2xmem(dataADDR, &data, dataLength);
> >
> > // read data from nonvolatile memory and store to temp array
> > xmem2root(&temp, dataADDR, dataLength);
> >
> > if(memcmp(&temp, &data, dataLength)==0){
> > printf("data is equal with temp\n");
> > }
> > else {
> > printf("data isn't equal with temp\n");
> > printf("%s\n", temp);
> > }
> > }
> >
>