- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to aggressively use a hibernate mode and a WDT is intended to pull the CPU out of hibernation.
However, I need to preserve some data through the WDT reset.
Is there a keyword declaration to place certain RAM variables in an area of memory that does not get initialized immediately after a reset?
I'm aware of the .bss section of RAM. However after multiple searches among the compiler .h files, I could not find a declarative keyword that would force RAM variables to this area of memory.
I suspect I'm missing something obvious. Help would be appreciated.
"Engineering is an Art. The Art of Compromise."
Solved! Go to Solution.
- Labels:
-
PSOC5 LP MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
pacr,
Excellent question. Thanks for your interest in this question.
I'm new to low-power operation.
I just found two pieces of information related to my original post.
Info #1 - Using the WDT in Hibernation mode.
The WDT is disabled in Hibernation mode. This is because the Hibernation regulator that is only available in Hibernation mode removes the power from the ILO. Since the ILO drives the CTW of the WDT, the WDT is automatically disabled.
Therefore my attempt to use the WDT in hibernation mode is IMPOSSIBLE!!! (Need to rethink this design direction.)
Info #2 - Placing variables in noinit .bss memory.
I believe I have found my answer to my original post.
If I add a CY_NOINIT as a keyword to my RAM variable, it appears to survive any nonvoltage-related Resets.
Voltage-related resets could affect the reliability of the RAM data contents. A well set LVD threshold could preserve the RAM contents if the SW is designed properly.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why are you using WDT to pull CPU out of hibernation ? Can't you use another wakeup event (some other timer) ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
pacr,
Excellent question. Thanks for your interest in this question.
I'm new to low-power operation.
I just found two pieces of information related to my original post.
Info #1 - Using the WDT in Hibernation mode.
The WDT is disabled in Hibernation mode. This is because the Hibernation regulator that is only available in Hibernation mode removes the power from the ILO. Since the ILO drives the CTW of the WDT, the WDT is automatically disabled.
Therefore my attempt to use the WDT in hibernation mode is IMPOSSIBLE!!! (Need to rethink this design direction.)
Info #2 - Placing variables in noinit .bss memory.
I believe I have found my answer to my original post.
If I add a CY_NOINIT as a keyword to my RAM variable, it appears to survive any nonvoltage-related Resets.
Voltage-related resets could affect the reliability of the RAM data contents. A well set LVD threshold could preserve the RAM contents if the SW is designed properly.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Len.
This thread may provide the clues you need.
Solved: Reading the correct reset status from a bootloadbl... - Infineon Developer Community
I know the thread discusses sharing memory between bootloader and bootloadable, but the key take away is, not allowing the RAM memory section to get changed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BiBi,
Thanks for your reply. I will look into it.
However I found a keyword CY_NOINIT appears to work under multiple tests.
A quick perusal of the link you supplied may be more valuable to share data between two applications (bootloader/bootloadable) without init when transferring operation between the two apps.
It is more complicated since there is a special section declaration that is shared across the apps.
In my specific case, the data is only used in the same App therefore the CY_NOINIT simplifies the C code and linker definitions.
"Engineering is an Art. The Art of Compromise."