Picking the right nRF5 chip for you

Robert Massaioli
2 min readDec 1, 2017

--

In an earlier story, I mentioned that the nRF51822 is a fantastic chip. And that is correct, it is! However, it has recently come to my attention that not all of these chips are born equal.

I wrote a program for one nRF51822 chip, that was working great, and tried to flash it to another nRF51822 chip in my possession…and it did not work at all. To my dismay, when I tried to debug the chip, it would hard fault immediately. Even when I ran the nRF SDK 12.3.0 examples I would still get hard faults. I had no idea what was going wrong; but I was convinced that the most recent chips that I bought could not all be broken.

After six hours of painfully trying to eliminate causes of the problem I eventually tried to work out if there was something fundamentally different between the two chips.

Look at these two photos and compare:

Compare the pair, what is different? The left works, the right does not.

Okay, so the first line is the same: “N51822”. Indicating that they are both nRF51822 devices; this is what made me assume that the two devices were the same. However, the second line is different on the left we have the “QFACA1” and on the right we have the “QFAAH1”. What does that even mean?

After some searching I discovered what that means in the docs:

Revision compatibility matrix.

As you can see the QF at the beginning indicates that the chip is in a QFN48 package (QFN = Quad Flat No-leads). That’s straight forwards and the same for both.

But now the difference, the chip on the left has “AC” next vs the right chip which has “AA”. According to the table above, that means that they both have the same amount of flash space 256kB but the AA chip only has 16kB of memory vs the 32kB of memory in the AC chip.

This was the source of the problem. When I updated the RAM settings in the *.ld files from 0x8000 to 0x4000 then the code would run successfully on the QFAAH1 chip:

MEMORY
{
FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x40000
RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x4000
}

I’m hoping that other people that run into this issue are helped by this as well.

--

--