This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Checking nRF52832 SoC for hardware faults (cannot be flashed)

Dear support,

I am working on some custom boards embedding the nRF52832-CIAA chip using SDK-v11.0 and s132-v2.0.1.

I have got 9 custom units and out of them only 1 cannot be flashed.

Even trying to restart it returns an error: nrfjprog --family nRF52 --log -r

ERROR: The --family option given with the command (or the default from
ERROR: nrfjprog.ini) does not match the device connected.

nrfprog (recover, erase, program, memrd and reset) always return the same error message.

Then I tried Jlink directly.

$ jlink
SEGGER J-Link Commander V6.20 (Compiled Sep  8 2017 18:05:11)
DLL version V6.20, compiled Sep  8 2017 18:04:35

Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 24 2017 17:30:12
Hardware version: V1.00
S/N: 682657161
VTref = 3.300V


Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: NRF52832_XXAA
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>100
Device "NRF52832_XXAA" selected.


Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x02880000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.

**************************
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
**************************

J-Link>w4 0x4001E504, 0x00000002
Writing 00000002 -> 4001E504
J-Link>w4 0x4001E50C, 0x00000001
Writing 00000001 -> 4001E50C
J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.

**************************
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
**************************

J-Link>w4 0x4001E504, 0x00000001
Writing 00000001 -> 4001E504
J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.

**************************
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
**************************

J-Link>loadfile output\SD_BL_APP_valid.hex
Downloading file [output\SD_BL_APP_valid.hex]...
J-Link: Flash download: Restarting flash programming due to program error (possibly skipped erasure of half-way erased sector).
J-Link: Flash download: Skip optimizations disabled for second try.
Error while programming flash: Programming failed.
J-Link>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.

**************************
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
**************************

It looks like there are issues in writing in the FLASH. The warning about T-bit is pretty suspicious as well...

**************************
WARNING: T-bit of XPSR is 0 but should be 1. Changed to 1.
**************************

However, I can read the FICR register:

J-Link>mem 0x10000000 0x120
10000000 = AA 50 AA 55 AA 55 AA 55 FF FF FF FF FF FF FF FF
10000010 = 00 10 00 00 80 00 00 00 FE FF FF FF FF FF FF FF
10000020 = FF FC FE FF FF FF FF FF FF FF FF FF FF FF FF FF
10000030 = FF FC FE FF FF FF FF FF FF FF FF FF FF FF FF FF
10000040 = FF F8 FE FF FF FF FF FF FF FF FF FF FF FF FF FF
10000050 = FF F8 FE FF FF FF FF FF 00 00 00 00 E3 00 FF FF
10000060 = 02 F8 00 07 1B 8C 62 5D FF FF FF FF FF FF FF FF
10000070 = 50 40 4B 46 34 32 02 29 47 FF FF FF FF FF FF FF
10000080 = 89 18 0A DC F8 5B 85 92 57 6A 9F F7 A9 A1 53 AD
10000090 = 0F 40 6A 06 6F CF E6 B7 F7 31 77 EA AE 99 12 61
100000A0 = FF F0 FF FF D9 2B E9 77 55 C4 EE 03 FF FF FF FF
100000B0 = FF FC FF FF FF FF FF FF FF FF FF FF FF FF FF FF
100000C0 = FF 7C FF FF FF FF FF FF FF FF FF FF FF FF FF FF
100000D0 = FF F8 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
100000E0 = FF F8 DF FF FF FF FF FF FF FF FF FF FF FF FF FF
100000F0 = FF FC FF FF FF FF FF FF FF FF FF FF FF FF FF FF
10000100 = 32 28 05 00 30 42 41 41 02 20 00 00 40 00 00 00
10000110 = 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF

I can perform an erase:

J-Link>erase
Erasing device (nRF52832_xxAA)...
J-Link: Flash download: Total time needed: 2.687s (Prepare: 1.046s, Compare: 0.000s, Erase: 0.891s, Program: 0.000s, Verify: 0.000s, Restore: 0.750s)
Erasing done.

I have attached below the output of the following jlink script (manually erase flash and read it all):

connect
r
sleep 500
w4 0x4001E504, 0x00000002
w4 0x4001E50C, 0x00000001
sleep 1000
r
w4 0x4001E504, 0x00000001
r
sleep 1000
mem 0x0 0x80000
qc

I was expecting to find my memory filled with 0xFFFFFFFF, but instead some areas are not (some at the very beginning and others spread around).

FLASH.txt

Thanks,

Marco

Related