Hi,
I am trying to program a custom board containing an nRF9151-LACA using the external programming interface (P20) on an nRF9151 DK. The board has never been programmed before and came back from assembly blank.
When attempting to flash or recover the device I get the following error:
Error: One or more batch tasks failed:
* 1051282951: Device error: Setting the debug port SELECT register failed while powering up sys and debug regions (Unknown Error in J-Link DLL (error code =-1)).
This might indicate that the debug port is unavailable. Please double-check device power supply and SWD lines, and that SWD isn't disabled (Generic)
FATAL ERROR: command exited with status 1
I also get similar errors from nrfjprog:
[error] [SeggerBackend] - JLinkARM.dll reported error -256
ERROR: Unable to connect to a debugger.
Hardware setup
I am following the Nordic guide for using the nRF9151 DK as an external programmer/debugger through connector P20.
The custom target is an nRF9151-LACA.
Connections made:
-
VTG
-
GND
-
SWDIO
-
SWDCLK
-
RESET
Checks already performed
nRF9151 DK operation
The DK can successfully connect to its onboard nRF9151.
Running J-Link Commander with nothing connected to P20 gives:
Found SW-DP with ID 0x6BA02477
DPIDR: 0x6BA02477
Found Cortex-M33 r0p2
...
So the DK, J-Link and software installation appear to be working correctly.
P20 selection
-
VTG measured at 1.8 V on P20.
-
SEL pin tied low.
-
Nothing connected to P19.
Power rails
-
VDD = 1.8 V
-
VDD_GPIO = 1.8 V
-
The device consumes approximately 4.5 mA when powered.
RESET
-
RESET sits at 1.8 V normally.
-
During programming attempts RESET is driven low briefly and then released.
SWD signals
Using an oscilloscope:
-
SWDCLK shows bursts during programming attempts.
-
SWDIO shows activity during programming attempts.
Wiring verification
-
SWDIO, SWDCLK and RESET have continuity from the programming connector to test pads located near the nRF9151.
-
The PCB layout has been checked and SWDIO/SWDCLK are not swapped.
-
Two separate assembled boards exhibit exactly the same behaviour.
J-Link test against custom board
Connecting with:
connect
NRF9151_XXCA
SWD
100
results in:
Connecting to target via SWD
...
Error occurred: Could not connect to the target device.
Unlike the onboard DK target, no SW-DP ID is ever detected.
Questions
-
Is there anything specific to the nRF9151-LACA that would prevent SWD access on a factory-blank device?
-
Are there any additional power rails or startup requirements that could prevent the SW-DP from responding while still allowing the device to draw current and show SWD activity?
-
Is there a recommended way to verify that the DK is definitely communicating through P20 and not attempting to access the onboard target?
-
Has anyone seen this specific "Setting the debug port SELECT register failed while powering up sys and debug regions" error caused by anything other than wiring or assembly issues?
Any suggestions for additional measurements or checks would be appreciated.
Thanks.