Unable to connect to chip using SEGGER JLink after flashing firmware

We're currently developing a zephyr firmware on zephyr 4.2 and we got a custom board for our hardware powered by an nrf52840-ckaa-R 

the first time I connected the board I was able to flash it using west, 
after flashing the board I am unable to flash it agian  

and I get this error 

Error: One or more batch tasks failed: * 53001714: Device error: Failed to read from memory address 0x10000130: Failed to write DebugPort register 0x08: Unknown Error in J-Link DLL (error code =-1) (Generic)

nrfjprog --recover , nrfjprog --eraseall and nrfuitl device recover all fail to recover the device 

eventually I was able to recover the device by manually issuing the ERASEALL command 

JLinkExe -if SWD -device nRF52840_xxAA -speed 4000

r

w4 4001e504 2
w4 4001e50c 1
w4 4001e514 1
qc

after flashing a few times I started getting failed to power up DAP error whenever I try to connect to the device 

J-Link>con
Device "NRF52840_XXAA" selected.


Connecting to target via SWD
InitTarget() start
InitTarget() end - Took 1.43ms
Found SW-DP with ID 0x2BA01477
DAP: Could not power-up system power domain.
DPIDR: 0x2BA01477
CoreSight SoC-400 or earlier
Scanning AP map to find all available APs
AP[0]: Stopped AP scan as end of AP map has been reached
Iterating through AP map to find AHB-AP to use
Attach to CPU failed. Executing connect under reset.
Failed to power up DAP
InitTarget() start
InitTarget() end - Took 1.24ms
Found SW-DP with ID 0x2BA01477
Failed to power up DAP
Error occurred: Could not connect to the target device.
For troubleshooting steps visit: https://kb.segger.com/J-Link_Troubleshooting

what's weird is one time I got to actually do the eraseall command despite the Failed to power up DAP showing up 

I tried getting the nrf into bootloader mode by holding reset and powering the device up 
I tried lowering speed for JLink 
I tried powering the device and connecting the device, as well as running nrfjprog --recover/--eraseall in a loop while connecting and disconnecting the device 
nothing works out 

hardwarewise the DC/DC converter seems to be working so the nrf is functional (at least to an extent I guess) 
 
Is there any way to debug this or is my device just bricked?



Parents Reply Children
No Data
Related