| Details | Message |
|---|
Read-Only Author Walter Gazdzik Posted 15-Jun-2009 19:16 GMT Toolset ARM |  Battery RAM not saving data Walter Gazdzik Having problem with Battery RAM area 0xE0084000 - 0xE00847FF. Have 32 data stored there, but it is lost when power is removed. Vbat is connected and battery voltage is good. RTC retains date & time data just fine. Made sure the Linker Scatter file does not have zero-init applied. Not sure what I'm missing? Any help would be appreciated. Thanks, Walt |
|
Read-Only Author tamir michael Posted 15-Jun-2009 20:13 GMT Toolset ARM |  RE: Battery RAM not saving data tamir michael this zone is only word-wise (32-bit) addressable. have you taken that into account? |
|
Read-Only Author Walter Gazdzik Posted 15-Jun-2009 20:28 GMT Toolset ARM |  RE: Battery RAM not saving data Walter Gazdzik Yes, I set the data on 32 bit boundry. I can read the data in a memory window when debug and it is OK. It seems the data is being zero'd when the processor is reset, not just when power is turned off. Somehow this memory area is being zero-initialized. |
|
Read-Only Author Per Westermark Posted 15-Jun-2009 22:38 GMT Toolset ARM |  RE: Battery RAM not saving data Per Westermark For some reason you seem to have missed mentioning what chip, but it seems to be a NXP LPC23xx chip. I haven't had any problems with memory retention. I have never bothered to add this memory area in the project or scatter file. I just set a struct pointer to this address and take everything from there. A bit of validation with CRC etc to decide if the memory is valid or not. |
|
Read-Only Author Walter Gazdzik Posted 16-Jun-2009 13:40 GMT Toolset ARM |  RE: Battery RAM not saving data Walter Gazdzik Yes its a LPC2378 device. Sounds simple enough. I'm just stumped on this one. When processor is reset the memory vars are set to zero. Any thoughts are appreciated. Can you show me how you allocate your struct to this memory area? Thanks, My linker map looks as follows: kw_hr 0xe0084000 Data 4 batsram.o(.data) kw_sec 0xe0084004 Data 4 batsram.o(.data) Execution Region RW_IRAM4 (Base: 0xe0084000, Size: 0x00000008, Max: 0x000007ff, ABSOLUTE, UNINIT) Base Addr Size Type Attr Idx E Section Name Object 0xe0084000 0x00000004 Data RW 708 .data batsram.o 0xe0084004 0x00000004 Data RW 709 .data batsram.o |
|
Read-Only Author Partrened Zeusti Posted 16-Jun-2009 13:55 GMT Toolset ARM |  RE: Battery RAM not saving data Partrened Zeusti Hi, is it clear'd by the startup assembly? so does a reset clear it or just a power down and up? Always yo're freind, Zeusti. (Now in partnership with Laramy Spart) "Writing more software for humans" +745 n203 |
|
Read-Only Author Walter Gazdzik Posted 16-Jun-2009 13:58 GMT Toolset ARM |  RE: Battery RAM not saving data Walter Gazdzik At first i thought it was cleared after powerup, but now I see it cleared after reset. I do not initialize the variable at this memory address. Somehow it looks like this area is zero-init, although I directly specify as UNINIT in the scatter file. Thanks, |
|
Read-Only Author Partrened Zeusti Posted 16-Jun-2009 14:04 GMT Toolset ARM |  RE: Battery RAM not saving data Partrened Zeusti Hi, zero-init section? yes, i think you must check the scatter file. Always yo're freind, Zeusti. (Now in partnership with Laramy Spart) "Writing more software for humans" eges pizza base and fries wi |
|
Read-Only Author Walter Gazdzik Posted 16-Jun-2009 14:28 GMT Toolset ARM |  RE: Battery RAM not saving data Walter Gazdzik Seems that when the Battery RAM area is allocated with linker, the area is set for zero-init (ZI). When I removed all reference for allocation (in scatter file), it now works, but I get a warning on the linker that no algorithm found for the Battery RAM area. ..... go figure? To all, the help is appreciated! W. |
|
Read-Only Author fabrice larat Posted 19-Jun-2009 09:46 GMT Toolset ARM |  RE: Battery RAM not saving data fabrice larat Hi, I have the same problem. But I have found this link: http://www.keil.com/support/docs/3290.htm For me, now it's work. |
|