This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52 memory not working

I've tried a trivial example (blinky-like, compiled by gcc using proper startup and ld scripts) on nRF52 devkit, but I always only get hard fault. Debugging through the reset handler, I have found the ResetHandler calls into SystemInit which goes through few ftpan_'s, but fault on return. I have realized it's because the return addres, written to stack, reads back as zero and further investigation revealed that the whole second half of memory doesn't work - ignores writes, or at least reads as zero.

After I updated my linker script to only use 32kB of RAM (so the stack got into the lower half of 64kB array), it started working.

Is there any known issue regarding RAM that would render half of the memory inoperable? I have verified all my memory was turned on:

J-Link>mem32 0x40000900,20
40000900 = 0000FFFF 00000000 00000000 00000000 
40000910 = 0000FFFF 00000000 00000000 00000000 
40000920 = 0000FFFF 00000000 00000000 00000000 
40000930 = 0000FFFF 00000000 00000000 00000000 
40000940 = 0000FFFF 00000000 00000000 00000000 
40000950 = 0000FFFF 00000000 00000000 00000000 
40000960 = 0000FFFF 00000000 00000000 00000000 
40000970 = 0000FFFF 00000000 00000000 00000000 

but only first 32kB work for me....

Related