Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 1 > memory addressing

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



memory addressing
Moderator:
ARVI

Post Reply
Follow this topic



memory addressing

Gee posted on 06 Jul 2012 5:54 AM PST
Top Contributor
21 Forum Posts

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.




Re: memory addressing

Bob Marlowe posted on 06 Jul 2012 07:17 AM PST
Top Contributor
1768 Forum Posts

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



Re: memory addressing

Gee posted on 09 Jul 2012 10:10 PM PST
Top Contributor
21 Forum Posts

Thanks Bob.



Re: memory addressing

Bob Marlowe posted on 09 Jul 2012 12:51 AM PST
Top Contributor
1768 Forum Posts

You are always welcome!

 

Bob



Re: memory addressing

Gee posted on 09 Jul 2012 04:24 AM PST
Top Contributor
21 Forum Posts

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



Re: memory addressing

Bob Marlowe posted on 09 Jul 2012 06:48 AM PST
Top Contributor
1768 Forum Posts

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






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20