From d75a85a2aa021e98ac5001861f70ce562f6dd434 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Fri, 19 Sep 2014 12:31:49 +0200 Subject: [PATCH] cpu/nrf51822: fixed issue with disabled RAM - on certain devices the second RAM bank might be disabled after reset, this fix makes sure its enabled --- cpu/nrf51822/startup.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cpu/nrf51822/startup.c b/cpu/nrf51822/startup.c index f229ba5073..b0189c5bdf 100644 --- a/cpu/nrf51822/startup.c +++ b/cpu/nrf51822/startup.c @@ -20,6 +20,7 @@ #include #include "board.h" +#include "cpu.h" /** * memory markers as defined in the linker script @@ -57,6 +58,11 @@ void reset_handler(void) uint32_t *dst; uint32_t *src = &_etext; + /* make sure all RAM blocks are turned on + * -> see NRF51822 Product Anomaly Notice (PAN) #16 for more details + */ + NRF_POWER->RAMON = 0xf; + /* load data section from flash to ram */ for (dst = &_srelocate; dst < &_erelocate; ) { *(dst++) = *(src++);