- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using cy8c20546A-24pvxi. Is it possible to declare a variable in a specific location of SRAM? The requirement is that after a watchdog reset a variable has to be accessed. Pls reply asap.
Solved! Go to Solution.
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In PSoC designer 5.1 under help -> Documentation -> C Language Compiler User Guide
you'll find in chapter 6.2 two different examples to have absolute memory locations addressed in C.
Happy coding
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In PSoC designer 5.1 under help -> Documentation -> C Language Compiler User Guide
you'll find in chapter 6.2 two different examples to have absolute memory locations addressed in C.
Happy coding
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Bob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are always welcome!
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the cy8C20546A-24pvxi. According to the technical reference manual of the same, the portion of the SRAM between 0x03 to 0xCF doesnt get reset during a watchdog reset(WDR) if the IRAMDIS bit is set. I have declared a variable in this region of the SRAM and set the IRAMDIS bit. But the variable in the SRAM isnt retaining its value after WDR. Kindly let me knw what is wrong. Are there any other register settings to enable the same? Expecting a reply asap.
Thanks
Gee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The mentioned area is used from top (0xff) for the stack growing downwards, the lower area is used for static vars (C-Registers) growing upwards.
If you have access to an ICE-Cube (In-Circuit-Emulator) you might check your data-area for getting changed / Not changed.
Otherwise you have to do that manually. Of help is the .map - file which lists all variables and their addresses.
Bob