| Details | Message |
|---|
Read-Only Author Samjith Wasim Posted 23-Jan-2010 07:52 GMT Toolset ARM |  Battery RAM Samjith Wasim Controller : LPC2368(ARM 7) Issue : Battery RAM values not storing . Junk values getting stored on it. Hi People , I am using LPC2368 (ARM7) . I am facing the following issue with the Battery backup RAM . My Pclk for Battery backup RAM is Pclk = Cclk / 4 ; And I am storing data as shown below
#define BATTERY_RAM_BASE_ADDRESS 0xE0084000
/* ALLOCATION */
#define BSR_Data1 (*(volatile unsigned
long*)(BATTERY_RAM_BASE_ADDRESS 0x000))
#define BSR_Data2 (*(volatile unsigned long
*)(BATTERY_RAM_BASE_ADDRESS + 0x004))
#define BSR_Data3 (*(volatile unsigned long
*)(BATTERY_RAM_BASE_ADDRESS + 0x008))
As Static Battery RAM can be accessed only word-wise(32bit only) Note : The Battery RAM is a 2 kbyte static RAM residing on the APB bus. The address range is 0xE008 4000 to 0xE008 47FF. The SRAM can be accessed word-wise (32-bit) only. And I store it as ,
Unsigned int Store_Data;
Store_Data = BSR_Data1 ;
And Reading it as
BSR_Data1 = Store_Data ;
Is this the Correct way ? Because after a day all the data that I store is getting erased. Thanks in advance, Pls help me out guys on this issue. Regards, Samjith Wasim . A |
|
Read-Only Author Andy Neil Posted 23-Jan-2010 09:20 GMT Toolset ARM |  all the data that I store is getting erased Andy Neil How are you sure that the data was correctly stored in the first place? |
|
Read-Only Author Samjith Wasim Posted 23-Jan-2010 12:54 GMT Toolset ARM |  RE: all the data that I store is getting erased Samjith Wasim How are you sure that the data was correctly stored in the first place?
Reply Unsigned int Store_Data; Store_Data = BSR_Data1 ; And Reading it as BSR_Data1 = Store_Data ; By doing this I can read/write the first data alone correct ? for consecutive data I will use like this Store_next_data = BSR_Data2; And read it as BSR_Data2 = Store_next_data; is this the correct method ?? |
|
Read-Only Author Samjith Wasim Posted 25-Jan-2010 08:03 GMT Toolset ARM |  RE: all the data that I store is getting erased Samjith Wasim Is this the correct way of pointing data to Battery RAM . How do I write/read a complete structure of each 32 bit data on to the Battery RAM ? Regards, Samjith Wasim . A Thanks in advance |
|
Read-Only Author Samjith Wasim Posted 26-Jan-2010 10:33 GMT Toolset ARM |  RE: all the data that I store is getting erased Samjith Wasim How to check whether variables stored in first place ?? The method of storing/reading my word-wise data is this correct ? |
|
Read-Only Author Samjith Wasim Posted 1-Feb-2010 12:31 GMT Toolset ARM |  RE: all the data that I store is getting erased Samjith Wasim Guys can you Please help me on this issue as soon as possible. Regards, Samjith |
|
Read-Only Author Per Westermark Posted 1-Feb-2010 18:30 GMT Toolset ARM |  RE: all the data that I store is getting erased Per Westermark If BSR_Data1 is a variable in the battery-backed memory, then this is a write, and not a read:
And Reading it as
BSR_Data1 = Store_Data ;
To test if the memory works, you should write a significant amount of data - together with a checksum, CRC or similar, and then power off the unit and wait for a while. Then power up and read out the values - the checksum should still be correct. Have you remembered to connect the VBAT signal to a battery or super-cap? |
|
Read-Only Author erik malund Posted 1-Feb-2010 21:41 GMT Toolset ARM |  you do not give the specifics and .. erik malund since you do not state clock speed or type if BBRAM, is the write/read timing slow enough to satisfy the requirements of the BBRAM? This has come up before in other contexts. Erik |
|
Read-Only Author Per Westermark Posted 2-Feb-2010 08:15 GMT Toolset ARM |  RE: you do not give the specifics and .. Per Westermark Note that the NXP LPC2368 has internal 2kB battery-backed RAM (if external power is applied to the dedicated supply pin) |
|
Read-Only Author Monsignor Tapit Posted 2-Feb-2010 09:13 GMT Toolset ARM |  Don't miss the obvious Monsignor Tapit Have you checked the voltage of the battery? |
|
Read-Only Author Samjith Wasim Posted 3-Feb-2010 04:20 GMT Toolset ARM |  RE: Don't miss the obvious Samjith Wasim Guys Thanks a ton , I just checked by Bat Voltage and found to be drained .. I will come back after checking it with in a day or two. Regards, Samjith |
|