nRF51822: Add workaround for PAN-16 where not all RAM blocks reliably enabled on reset

According to Nordic Semiconductor Product Anomaly Notice (document
NRF51822-PAN), item 16, some revisions of nRF51822 sometimes reset
without all RAM blocks enabled. This was noted on NRF51822-QFAA rev
CA/C0, only 8KiB of memory was accessible.

This patch turns on all RAM following a debugger induced reset
(matches specified behaviour.)

Change-Id: I4f8be4ec3d1271da7fe5bc9a084fdcb2968535bb
Signed-off-by: Angus Gratton <gus@projectgus.com>
Reviewed-on: http://openocd.zylin.com/2202
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
Angus Gratton 2014-07-01 10:23:25 +10:00 committed by Andreas Fritiofson
parent 4949757473
commit 6d26e3e768
1 changed files with 8 additions and 0 deletions

View File

@ -50,3 +50,11 @@ flash bank $_CHIPNAME.uicr nrf51 0x10001000 0 1 1 $_TARGETNAME
# clock to 1Mhz should be OK
#
adapter_khz 1000
proc enable_all_ram {} {
# nRF51822 Product Anomaly Notice (PAN) #16 explains that not all RAM banks
# are reliably enabled after reset on some revisions (contrary to spec.) So after
# resetting we enable all banks via the RAMON register
mww 0x40000524 0xF
}
$_TARGETNAME configure -event reset-end { enable_all_ram }