How are the four RAM banks divided up in the nRF51822? Is it an even split of the 16K total RAM (i.e. 4K per block)?
Furthermore, can I expect strange results if I turn on RAM-retention for the 8K of RAM the SoftDevice uses?
Thanks :)
How are the four RAM banks divided up in the nRF51822? Is it an even split of the 16K total RAM (i.e. 4K per block)?
Furthermore, can I expect strange results if I turn on RAM-retention for the 8K of RAM the SoftDevice uses?
Thanks :)
Thanks for the hints. Unfortunately I am not using Keil but instead gcc-arm.
This is how you do it for GCC for those who are interested:
1. Add the following to the linker script (in SECTIONS, before bss):
.noinit (NOLOAD) :
{
*(.noinit*)
} > RAM
2. In your source code for each variable you want retained:
static uint8_t varName __attribute__ ((section(".noinit")));
That's it! Working perfectly :)
Thanks for the hints. Unfortunately I am not using Keil but instead gcc-arm.
This is how you do it for GCC for those who are interested:
1. Add the following to the linker script (in SECTIONS, before bss):
.noinit (NOLOAD) :
{
*(.noinit*)
} > RAM
2. In your source code for each variable you want retained:
static uint8_t varName __attribute__ ((section(".noinit")));
That's it! Working perfectly :)