connection fail via swd with jlink

We're using nrf52833 and our target board is already running our program well.

Then 

we'd like to flash by using Jlink SWD programmer.

So, we connected vref, gnd, swdio swclk pin between our target and jlink's 20 pin connector by wire.

When we use jlink flasher program, we got the following errors.


Connecting to target via SWD
InitTarget() start
InitTarget()end
RESET (pin15) high, but should be low. Please check target hardware.
RESET (pin15) high, but should be low. Please check target hardware.
RESET (pin15) high, but should be low. Please check target hardware.
RESET (pin15) high, but should be low. Please check target hardware.
RESET (pin15) high, but should be low. Please check target hardware.
RESET (pin15) high, but should be low. Please check target hardware.
RESET (pin15) high, but should be low. Please check target hardware.
InitTarget() start
InitTarget() end
RESET (pin15) high, but should be low. Please check target hardware.
RESET (pin15) high, but should be low. Please check target hardware.
Cannot connect to target.

It seems errors in connection nrf52833 and jlink.

Currently, our target don't use RESET pin (p0.18) after looking into our schematic.

please check and advice us.

  • In addition to above, 

    We also see RESET pin (p0.18) that can be a gpio. We don't use this RESET pin and it seems to not be used in our software too.
    Our software use dfu, currently.

  • Hello,

    Which SDK and version are you using to build your application? Take a look at this old DevZone thread discussing a similar issue. Please see if this discussion has any relevance to your issue.

    How did you program your first software? You mentioned that your program is running well. I assume this is a custom application. Have you tried any applications inside the SDK, and do they produce the same issue?

    Kind Regards,
    Abhijith

  • I don't know which SDK and version. but I used "s113_nrf52_7.2.0_softdevice.hex" in our project starting on 2021.01.27.
    and I cannot open old DevZone thread you suggested before. please check this and again give me a link.


    In addition, our program is a old custom application and already on mass production. However, there are problems on our project so I am involved with it, currently. so I don't know the development history well. a

    Anyway, it's my conditions for this project. 

    Our old project is running well under the DFU for fw update using nRF connect for mobile app.

    Here, apart from DFU, I'd like to debug our target via jlink debugger (swd) and see the RTT logs from our target.

    Then RTT viewer give me the error.

    The error log are as followings, again:

    LOG: J-Link RTT Viewer V7.94e: Logging started.
    LOG: Connecting to J-Link via USB...
    LOG: Device "NRF52833_XXAA" selected.
    LOG: InitTarget() start
    LOG: InitTarget() end - Took 2.52ms
    LOG: RESET (pin 15) high, but should be low. Please check target hardware.
    LOG: Failed to attach to CPU. Trying connect under reset.
    LOG: RESET (pin 15) high, but should be low. Please check target hardware.
    LOG: RESET (pin 15) high, but should be low. Please check target hardware.
    LOG: RESET (pin 15) high, but should be low. Please check target hardware.
    LOG: RESET (pin 15) high, but should be low. Please check target hardware.
    LOG: RESET (pin 15) high, but should be low. Please check target hardware.
    LOG: Connect fallback: Reset via Reset pin & Connect.
    LOG: RESET (pin 15) high, but should be low. Please check target hardware.
    LOG: InitTarget() start
    LOG: InitTarget() end - Took 3.22ms
    LOG: RESET (pin 15) high, but should be low. Please check target hardware.
    ERROR: Could not connect to target device.

    This error seems to be same when not connected with target device with jlink debugger.

    Then please help me how to solve this problem.

  • After seeing the link you suggested, I checked my issue.

    Then No CONFIG_GPIO_AS_PINRESET was defined in my code. we don't use reset (p0.18) pin in our project.

    and then I did it with using "nrfjprog --recover" and "nrfjprog --eraseall"

    but they fails and give us the following errors.

    C:\Program Files\SEGGER\JLink_V794e>nrfjprog --recover
    [error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 316 milliseconds with result -102
    ERROR: Unable to connect to a debugger.
    [error] [ Worker] - An unknown error.
    ERROR: JLinkARM DLL reported an error. Try again. If error condition
    ERROR: persists, run the same command again with argument --log, contact Nordic
    ERROR: Semiconductor and provide the generated log.log file to them.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.

    C:\Program Files\SEGGER\JLink_V794e>nrfjprog --eraseall
    [error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 399 milliseconds with result -102
    ERROR: Unable to connect to a debugger.
    [error] [ Worker] - An unknown error.
    ERROR: JLinkARM DLL reported an error. Try again. If error condition
    ERROR: persists, run the same command again with argument --log, contact Nordic
    ERROR: Semiconductor and provide the generated log.log file to them.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.

    So, any advice for us?

Related