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

SWD with Tag-Connect on Thingy: 52

Hello,

i've made a custom shield plugged into the thingy: 52. 

There is a tag connect connector on it. I have short SWD signal from thingy debug connector.

When i try to flash the code i have the following error:

2020-05-18T11:28:26.450Z DEBUG App path: C:\Users\arnau\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer
2020-05-18T11:28:26.450Z DEBUG nRFConnect 3.3.3 is supported by the app (^3.3.0)
2020-05-18T11:28:26.450Z DEBUG nRFConnect path: C:\Users\arnau\AppData\Local\Programs\nrfconnect\resources\app.asar
2020-05-18T11:28:26.450Z DEBUG HomeDir: C:\Users\arnau
2020-05-18T11:28:26.450Z DEBUG TmpDir: C:\Users\arnau\AppData\Local\Temp
2020-05-18T11:28:26.464Z INFO Using nrfjprog library 10.8.0, pc-nrfjprog-js 1.7.2
2020-05-18T11:28:26.465Z VERBOSE Could not fetch serial number for serial port at COM3
2020-05-18T11:28:26.465Z VERBOSE Could not fetch serial number for serial port at COM8
2020-05-18T11:28:28.283Z INFO Using nrfjprog to communicate with target
2020-05-18T11:28:28.614Z INFO Using J-Link Software version 6.70
2020-05-18T11:28:30.264Z INFO Segger serial: 260115611
2020-05-18T11:28:30.264Z INFO Segger speed: 2000 kHz
2020-05-18T11:28:30.264Z INFO Segger version: J-Link V10 compiled Apr 16 2020 17:17:24
2020-05-18T11:28:30.274Z INFO Core probed: 260115611.
2020-05-18T11:28:30.274Z INFO Core RAM: 64KiB.
2020-05-18T11:28:30.274Z INFO Core ROM: 512KiB in pages of 4KiB.
2020-05-18T11:28:32.899Z ERROR Error when closing nrfjprog: Error: Error occured when close opened device. Errorcode: CouldNotResetDevice (0x5)
Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a)

2020-05-18T11:28:32.899Z INFO Model: NRF52832_xxAA_REV1.
2020-05-18T11:28:32.905Z ERROR Error when getting device info: Error: Error: Error occured when open device long term. Errorcode: CouldNotOpenDevice (0x4)
Lowlevel error: INVALID_OPERATION (fffffffe)

2020-05-18T11:28:32.906Z DEBUG getDeviceMemMap: r is not iterable
2020-05-18T11:28:32.908Z ERROR Error when closing nrfjprog: Error: Error occured when close opened device. Errorcode: CouldNotOpenDevice (0x4)
Lowlevel error: INVALID_OPERATION (fffffffe)

Do you have an idea of what happened?

Arnaud

  • Hi, 

    i've made a custom shield plugged into the thingy: 52. 

    How does the custom shield connect to the thingy:52? Will it affect the voltage?

    Have you tried recovering the device using nrfjprog directly?  This can be done by issuing "nrfjprog --recover -f nrf52" with nRF-Command-Line-Tools.

    -Amanda H. 

  • The shield isn't supposed to affect the voltage...

    Everythings works fine when i flash/debugg from the thingy connector.

    If i try recovering the device using nrfjprog, i have this error:

    Recovering device. This operation might take 30s.
    ERROR: Recover failed. Please make sure that the correct device family is given
    ERROR: and try again.

    After, that Vdd is about 0,8 Volts.

  • Hi Cazale, 

    Are you able to use J-Link Commander to connect the thingy 52?

    What is the VTref value showed in the J-Link Commander? Is it 3.3V? If not, please use the USB power supply.  

    -Amanda H.

  • Yes, i'm able to connect via J-Link Commander:

    Connecting to target via SWD
    InitTarget() start
    InitTarget() end
    Found SW-DP with ID 0x2BA01477
    DPIDR: 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-M7
    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.

    But, after that, i'm unable to programm via Segger Embedded Systems:

    Preparing target for download
    Executing Reset script TargetInterface.resetAndStop()
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Reset: SYSRESETREQ has confused core.
    Failed to power up DAP
    Reset: Using fallback: VECTRESET.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.VECTRESET.
    Reset: VECTRESET has confused core.
    Reset: Using fallback: Reset pin.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via reset pin
    Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
    Reset: Reconnecting and manually halting CPU.
    Failed to power up DAP
    CPU could not be halted
    Reset: Core did not halt after reset, trying to disable WDT.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via reset pin
    Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
    Reset: Reconnecting and manually halting CPU.
    Failed to power up DAP
    CPU could not be halted
    Reset: Failed. Toggling reset pin and trying reset strategy again.
    Failed to power up DAP
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    Reset: SYSRESETREQ has confused core.
    Failed to power up DAP
    Reset: Using fallback: VECTRESET.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.VECTRESET.
    Reset: VECTRESET has confused core.
    Reset: Using fallback: Reset pin.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via reset pin
    Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
    Reset: Reconnecting and manually halting CPU.
    Failed to power up DAP
    CPU could not be halted
    Reset: Core did not halt after reset, trying to disable WDT.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via reset pin
    Reset: VC_CORERESET did not halt CPU. (Debug logic also reset by reset pin?).
    Reset: Reconnecting and manually halting CPU.
    Failed to power up DAP
    CPU could not be halted
    CPU could not be halted
    Failed to halt CPU.
    Can not read register 0 (R0) while CPU is running
    Can not read register 1 (R1) while CPU is running
    Can not read register 2 (R2) while CPU is running
    Can not read register 3 (R3) while CPU is running
    Can not read register 4 (R4) while CPU is running
    Can not read register 5 (R5) while CPU is running
    Can not read register 6 (R6) while CPU is running
    Can not read register 7 (R7) while CPU is running
    Can not read register 8 (R8) while CPU is running
    Can not read register 9 (R9) while CPU is running
    Can not read register 10 (R10) while CPU is running
    Can not read register 11 (R11) while CPU is running
    Can not read register 12 (R12) while CPU is running
    Can not read register 13 (R13) while CPU is running
    Can not read register 14 (R14) while CPU is running
    Can not read register 15 (R15) while CPU is running
    Can not read register 16 (XPSR) while CPU is running
    Can not read register 17 (MSP) while CPU is running
    Can not read register 18 (PSP) while CPU is running
    Can not read register 20 (CFBP) while CPU is running
    Downloading ‘s132_nrf52_4.0.2_softdevice.hex’ to J-Link
    Programming 2.3 KB of addresses 00000000 — 00000963
    Programming 117.9 KB of addresses 00001000 — 0001e7bf
    CPU could not be halted
    Failed to download RAMCode.
    Failed to prepare for programming.
    Failed to download RAMCode!
    Can not read register 16 (XPSR) while CPU is running
    Can not read register 20 (CFBP) while CPU is running
    Can not read register 0 (R0) while CPU is running
    Can not read register 1 (R1) while CPU is running
    Can not read register 2 (R2) while CPU is running
    Can not read register 3 (R3) while CPU is running
    Can not read register 4 (R4) while CPU is running
    Can not read register 5 (R5) while CPU is running
    Can not read register 6 (R6) while CPU is running
    Can not read register 7 (R7) while CPU is running
    Can not read register 8 (R8) while CPU is running
    Can not read register 9 (R9) while CPU is running
    Can not read register 10 (R10) while CPU is running
    Can not read register 11 (R11) while CPU is running
    Can not read register 12 (R12) while CPU is running
    Can not read register 14 (R14) while CPU is running
    Can not read register 15 (R15) while CPU is running
    Can not read register 17 (MSP) while CPU is running
    Can not read r

  • Hi Cazale

    What is the VTref value showed in the J-Link Commander? Is it 3.3V?

    -Amanda H.

Related