Nordic not reflashable suddenly

Nordic,

We've been using the nRF52832 for many years now.  We have a custom board that uses SWCLK and SWDIO to flash our NRF52.  We're getting set for production and I am working on our automated manufacturing rig.  We have a python script that flashes a nordic with a soft device, bootloader, and then application.  Some of the GPIO go to LEDs, so I can see what state the chip is in after programming.  It had been working great then I started getting this problem where the LEDs didn't show up in the right state.  I'd go to reflash the device, and then the SWD won't connect, and I could not erase the chip.  I can hit our reset button, tied to the RESET pin on the IC, and nothing happens.  Normally this button does a hard reset, where the LED goes away and (I believe) the chip loses power.  Upon release of the reset, the board should initialize into the bootloader and the LED blinks red marking as such.  But for these 'bricked' boards, the LED stays on throughout the reset button press.   These two things: not able to reset the chip, and not being able to reflash the chip, these are quite alarming.

One piece of good news is the current drawn seems to be about 1 mA like when the Nordic is in low power state.  

I've spent most all day going through devzone forums trying things, hoping to recover or at least explain my freeze-up.  

When I go back into J Flash Lite, I can no longer ERASE the chip.  Now it says

Connecting to J-Link...
Connecting to target...
ERROR: Could not connect to target.
Done.

Fine, I can try from the command utility.  I use the jlink.exe tool, and go through the regular steps to connect and then try to erase.  This also doesn't work:

J-Link>connect
Device "NRF52832_XXAA" selected.


Connecting to target via JTAG
InitTarget() start
InitTarget() end
TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
InitTarget() start
InitTarget() end
TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
InitTarget() start
InitTarget() end
TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
InitTarget() start
InitTarget() end
TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
Cannot connect to target.

Ok, now I try to use the nrfjprog tool.  For reference I look up the version as 

nrfjprog version: 10.15.1 external
JLinkARM.dll version: 7.58b

Then I do all kinds of commands to try and talk to my board.  Here are some

>nrfjprog --recover --log
ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: [ nRFXX] - Device does not have an ARM debug port.
ERROR: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".
ERROR: nrfjprog could not identify the target device. This may be due to an
ERROR: invalid family argument, a problem with your device, or nrfjprog may
ERROR: not yet support your device.
ERROR: Please check the family argument passed, or upgrade nrfjprog to a more
ERROR: recent version.

>nrfjprog -e
ERROR: nrfjprog could not identify the target device. This may be due to an
ERROR: invalid family argument, a problem with your device, or nrfjprog may
ERROR: not yet support your device.
ERROR: Please check the family argument passed, or upgrade nrfjprog to a more
ERROR: recent version.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.

>nrfjprog -d --family nrf52 --log
ERROR: Unable to connect to a debugger.
ERROR: [ nRF52] - Debug probe is not connected to an NRF52 series device.
ERROR: The --family option given with the command (or the default from
ERROR: nrfjprog.ini) does not match the device connected.

I know the segger and cables and everything are correct, I HAD been able to program this and other boards.  But during development of the python script, I've 'bricked' 5 of my boards.  I only have 2 left.  So I need to get to the bottom of this.

I don't understand how something could ever make the SWCLK SWDIO not able to erase the chip.  What am I missing, please help.

environment:  windows 10

  • It would be good to confirm that this is a HW issue,

    If you are using --recover command to reset the device then the RESET pin functionality should not be enabled. In this state the device should not need to have the pin P0.21 pulled high.
    (you could flash empty program or a simple blinky where reset is not enabled, to test)


    Could it be that there is some HW differences on the boards you have compared to the others that work, has there been a HW revision or update?

    Can the issue be with the reset switch? Is it mounted correctly? Maybe try to remove the switch on one of the “defective” boards and se if that fixes the issue.

    Regards,
    Jonathan

  • I did INFO.VARIANT suggestion and we have AAB0 0x41414230 AAB0, which seems fine and not a Gx style.

  • That simplifies things; looks like the reset simply isn't functional as if it were the LED would go out as you surmised, even if a broken reset switch was stuck low.

    for these 'bricked' boards, the LED stays on throughout the reset button press

    If I were testing this I would now try the recover steps you used with a VCC of 2.4 volts and again at 3.4 volts.

  • Jonathan,

    We are not using the --recover command to reset the board.  I did try that and it erased user code and UICR flash.  No improvement.

    I do not think it is a hardware issue. It might be, but this has happened to boards from this round and the previous build cycle.  

    I also tried to remove the reset button, with no success.  You can see from that part of the circuit that shouldn't help, the only thing pulling down is when the switch is closed.

    The confusing thing is, even after all erasing methods, the chip still needs the 3V on the reset pin to be connectable.  As in, we give it 3V in order to connect and do --recover, or -e, or 'erase chip' in Jflash Lite, all of these will fail unless we have the 3V external power applied to P0.21.  Then after we do the erase, if the reset pin setting were truly removed from memory, I'd think I could turn off the external supply.  Wrong, the chip goes to brick mode if that 3V is removed.  The board still can't function without the external 3V.

    I have confirmed the reset pin UICR is unset, by doing the 

    nrfjprog --memrd 0x10001204 --family nrf52
    0x10001204: FFFFFFFF                              |....|

    It sure feels like there's something broken inside the chip.  

    My main concern is figuring out HOW I broke the chip and ensuring it never happens again.  I'm ok if we lose 5 chips, but I can't go to production with an unknown bricking bug.

  • hmolesworth,

    In response to your comment about the LED.  Here is that section of the schematic.  I'm not sure the LED staying on after a reset is the problem.  The LED are connected to GPIO and then programmed for funcationality in our program.  So, with an empty memory, I think the datasheet shows these are reset as input pins.  My guess is that this causes the LED to be HIGH when the board is bricked, and even while the P0.21 pin reset is toggled.  

    The fact that even after the erase command, where the system clears the settings of the reset (I think) and does a system reset to 'enact' the new UICR values, even after this I still need the 3V external in order for the chip connect.  That is suspicious.  As a side note, after this erase, the LEDs are all off so long as the 3V external is applied.  When I take off the external, the LEDS go back on and the board cannot connect to nrfjprog.

     

    nrfjprog -f nrf52 -e
    Erasing user available code and UICR flash areas.
    Applying system reset.

    Can you please explain more what you would suggest we do with the supply current to further debug?

    Thanks,

    Darren

Related