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

nrfjprog (9.4.0) --recover fails on custom board

Hi !

I work for about a year with a nRF52832 custom board without problem and recently I add a bootloader (with success) on the firmware.

Now I can't connect through JLink to the board but the firmware still work. 'nrfjprog -f NRF52 -c 1000 --recover --log' returns errors:

FUNCTION: open_dll.
FUNCTION: open_dll.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_without_snr.
FUNCTION: enum_emu_snr.
Device "NRF52832_XXAA" selected.
FUNCTION: recover.
FUNCTION: recover.
JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.
FUNCTION: close_dll.
FUNCTION: close_dll.

I use the last version of nrfjprog (9.4.0) and I don't lock the nRF52832. The manual write to DP/DA registers fail too:

Select SWD by sending SWD switching sequence.
Write DP register 1 = 0x50000000 ***ERROR
Write DP register 2 = 0x01000000 ***ERROR
Write AP register 1 = 0x00000001 ***ERROR

Other Q&A don't help (nrfjprog < 9.0.0 for them).


Update 1:

The board connection is like in this post but it is powered with external +3.0V (not from the DK).

board connection with external power supply


Update 2:

Here are the answers to @Jørgen Holmefjord's questions :

  • What exactly did you do when the boards became non-responsive?

I was uploading a firmware to do final tests (some JLink 'loadfile' for the firmware, some JLink 'w1/w2/w4' to write configuration in flash). The process had gone well and the tests was successful. After some minor correction, I have wanted to upload a new firmware (JLink loadfile only) but the board didn't respond to JLink (neither response to JLink 'connect' nor to JLink 'SWDSelect'). Still now after many tests, the board continue to work with the latest uploaded firmware (but can't be programmed).

  • Make sure you are not putting the device into system off mode very early in your code[...]

I did a test: as the firmware works, I sent a command to trigger a long BLE communication (2-8 s). The command succeed so the device wasn't in system off. But I can't connect the debug port... I had try multiple times without success.

Here are the answers to @butch's questions :

  • The custom board that doesn't work is the same hw version as the boards that do work?

All the board come from the same production batch.

  • The pullup/down resistor on the SW lines on the custom board? Short wires between DK and target? High resistance/break in the wires?

There is nothing on the SW lines from the programer to the nRF52832. Before the 'fatal event' I have programed the boards with the same hardware environment, 2 times for each.

Oups!!! Significant matter: the board use a BMD300 module from Rigado, I can't be sure about the module content (no info from the doc), but I never have problem with it until now... I asked Rigado about that and they answered there is no component on the SW lines.

  • You are not configuring the SW pins for other purposes?

From the Nordic 'nRF52832 Product Specification' you can't change the SW pins role, so I don't.

  • You have not recently upgraded your OS/dev system/nfjprog/Jlink installation?

I did that some month before for the nfjprog/Jlink tools but I didn't have problem until now. For the OS, I work with Mac OS and I had try under Windows 7 without better success (same version of the tools).

  • Your 3V power supply reads 3V on a voltmeter and is not noisy?

I checked that yesterday and read 2.991VDC without AC component, so a sufficient regulated power supply (I have not check with an oscilloscope).


Can someone help me ? Thanks !

Parents
    • The board is correctly powered and the (already programmed) firmware works as expected.
    • The SWD port of the nRF52832 is connected to the PCA10040 through P20 and an additional GND.
    • I can program other identical boards with the same HW/SW tools.

    With the (two) faulty boards, SWDSelect command dont find the SWD-DP and subsequent commands failed.

    Now, when doing some test, I brick another board! I really need a solution to restore them!

Reply
    • The board is correctly powered and the (already programmed) firmware works as expected.
    • The SWD port of the nRF52832 is connected to the PCA10040 through P20 and an additional GND.
    • I can program other identical boards with the same HW/SW tools.

    With the (two) faulty boards, SWDSelect command dont find the SWD-DP and subsequent commands failed.

    Now, when doing some test, I brick another board! I really need a solution to restore them!

Children
No Data
Related