mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-09-06 04:54:38 +00:00
Merge pull request #464 from ADVANSEE/cc2538-pm2-sram
cc2538: lpm: Give access to the SRAM non-retention area for PM2
This commit is contained in:
commit
97cdf39b95
@ -34,6 +34,8 @@
|
|||||||
* ld script, which is called cc2538.ld and will be in the project directory
|
* ld script, which is called cc2538.ld and will be in the project directory
|
||||||
*/
|
*/
|
||||||
#if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0)
|
#if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0)
|
||||||
|
#define NRSRAM_START 0x20000000
|
||||||
|
#define NRSRAM_LEN 0x00004000
|
||||||
#define SRAM_START 0x20004000
|
#define SRAM_START 0x20004000
|
||||||
#define SRAM_LEN 0x00004000
|
#define SRAM_LEN 0x00004000
|
||||||
#else
|
#else
|
||||||
@ -45,6 +47,9 @@ MEMORY
|
|||||||
{
|
{
|
||||||
FLASH (rx) : ORIGIN = 0x200000, LENGTH = 0x0007FFD4
|
FLASH (rx) : ORIGIN = 0x200000, LENGTH = 0x0007FFD4
|
||||||
FLASH_CCA (RX) : ORIGIN = 0x0027FFD4, LENGTH = 12
|
FLASH_CCA (RX) : ORIGIN = 0x0027FFD4, LENGTH = 12
|
||||||
|
#if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0)
|
||||||
|
NRSRAM (RWX) : ORIGIN = NRSRAM_START, LENGTH = NRSRAM_LEN
|
||||||
|
#endif
|
||||||
SRAM (RWX) : ORIGIN = SRAM_START, LENGTH = SRAM_LEN
|
SRAM (RWX) : ORIGIN = SRAM_START, LENGTH = SRAM_LEN
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,6 +85,15 @@ SECTIONS
|
|||||||
_ebss = .;
|
_ebss = .;
|
||||||
} > SRAM
|
} > SRAM
|
||||||
|
|
||||||
|
#if (LPM_CONF_MAX_PM==2) && (LPM_CONF_ENABLE != 0)
|
||||||
|
.nrdata :
|
||||||
|
{
|
||||||
|
_nrdata = .;
|
||||||
|
*(.nrdata*)
|
||||||
|
_enrdata = .;
|
||||||
|
} > NRSRAM
|
||||||
|
#endif
|
||||||
|
|
||||||
.flashcca :
|
.flashcca :
|
||||||
{
|
{
|
||||||
KEEP(*(.flashcca))
|
KEEP(*(.flashcca))
|
||||||
|
@ -126,6 +126,12 @@ void lpm_init(void);
|
|||||||
* lpm_exit(), which will always be called from within the Sleep Timer ISR
|
* lpm_exit(), which will always be called from within the Sleep Timer ISR
|
||||||
* context.
|
* context.
|
||||||
*
|
*
|
||||||
|
* \note Dropping to PM2 means that data in the SRAM non-retention area will
|
||||||
|
* be lost. It is recommended to disable PM2 if the total RAM footprint is
|
||||||
|
* larger than what will fit in the retention area.
|
||||||
|
* .nrdata* sections can be used to place uninitialized data in the SRAM
|
||||||
|
* non-retention area.
|
||||||
|
*
|
||||||
* \sa main(), rtimer_arch_next_trigger(), lpm_exit(), lpm_set_max_pm()
|
* \sa main(), rtimer_arch_next_trigger(), lpm_exit(), lpm_set_max_pm()
|
||||||
*/
|
*/
|
||||||
void lpm_enter(void);
|
void lpm_enter(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user