0

nRF52 memory not working

nenik gravatar image

asked 2015-06-23 07:19:03 +0100

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....

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
1
hkn gravatar image

answered 2015-06-23 08:22:17 +0100

Hi,

This is an errata entry for the nRF52-series at this moment: http://infocenter.nordicsemi.com/topi...

Code and data RAM shall ideally be mirrored (up to 64K), but instead it's one 32k block located at each address-start.

Cheers, Håkon

edit flag offensive delete publish link more

Comments

Ah, now I fully understand that errata 34. Do you have a linker script handy that would let the linker use both and pick the placement automatically? Or perhaps this is a good incentive to play more with code in RAM, for faster execution and lower power anyway, any template for this?

Thanks, Petr

Nenik ( 2015-06-23 17:25:04 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower

Stats

Asked: 2015-06-23 07:19:03 +0100

Seen: 557 times

Last updated: juni 23 '15