• Support
  • Problem flashing feather via the nRF9160-DK

Is it possible to flash the nRF9160 feather via the nRF9160-DK? I’m following this example which is using the nRF5340-DK however the feather isn’t accessible in either the programmer or cmd line when using an nRF9160-DK.

$ nrfjprog -r
ERROR: Unable to connect to a debugger.
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.

With the feather unplugged/powered off the nRF9160-DK board is reset:

$ nrfjprog -r
Applying system reset.
Run.

I’m using the recommended tag connect cable TC2030-CTX-NL

I’m assuming from this excerpt in the nRF9160-DK hardware guide that the external feather board is automatically connected when powered up and connected to P19.

In the programmer the J-LINK device appears but an error is shown indicating the device is unsupported.

I’m trying to flash the mqtt_simple example from the Nordic nrf samples.

Any help much appreciated!

    Hey tcwjohnson !

    Yes, you should be able to program the nRF9160 Feather using the nRF9160-DK. (It’s the recommended way to do so)

    Can you show how you have it connected? Is the nRF9160 Feather powered via USB when you’re programming? (that’s required here) I personally short SB24 which forces the nRF9160DK to use the external programming port. If SB24 is shorted, you don’t necessarily have to power the nRF9160 Feather externally.

    Otherwise you may find yourself accidentally programming the onboard nRF9160 if the connection is not so great (or if you forget to connect the cable, etc, etc.)

    Hope that helps! 😄

      jaredwolff Thank you for the quick response. Yes the nRF9160 Feather is powered via USB. The nRF9160-DK is also powered via USB. I’ll short the SB24 solder bridge and give that a go without the feather powered.

      Hi jaredwolff with SB24 shorted and without USB power to the feather the nrfjprog response has changed:

      nrfjprog –log -r
      [error]: [ nRFXX] - Device does not have an ARM debug port.

      ERROR: nrfjprog could not identify the target device. This may be due to an
      ERROR: invalid family argument, a problem with your device, or nrfjprog may
      ERROR: not yet support your device.
      ERROR: Please check the family argument passed, or upgrade nrfjprog to a more
      ERROR: recent version.

      This is from the nrf Programmer v3.0.4 console with the JLink device selected:

      20:19:49.796 Using nrf-device-lib-js version: 0.4.15
      20:19:49.796 Using nrf-device-lib version: 0.12.8
      20:19:49.796 Using nrfjprog DLL version: 10.16.0
      20:19:49.796 Using JLink version: JLink_V7.80b
      20:19:49.908 Installed JLink version does not match the provided version (V7.66a)
      20:19:57.687 Unsupported device. The detected device could not be recognized as neither JLink device nor Nordic USB device.
      20:19:57.687 Please make sure J-Link Software is installed. See https://github.com/NordicSemiconductor/pc-nrfconnect-launcher/#macos-and-linux

      Output from jlinkexe:

      jlinkexe
      SEGGER J-Link Commander V7.80b (Compiled Sep 20 2022 17:05:22)
      DLL version V7.80b, compiled Sep 20 2022 17:05:14

      Connecting to J-Link via USB…O.K.
      Firmware: J-Link OB-K22-NordicSemi compiled Dec 3 2021 15:46:55
      Hardware version: V1.00
      J-Link uptime (since boot): N/A (Not supported by this model)
      S/N: 960077407
      License(s): RDI, FlashBP, FlashDL, JFlash, GDB
      VTref=3.300V

      Type “connect” to establish a target connection, ‘?’ for help
      J-Link>connect
      Please specify device / core. <Default>: CORTEX-M4
      Type ‘?’ for selection dialog
      Device>
      Please specify target interface:
      J) JTAG (Default)
      S) SWD
      T) cJTAG
      TIF>s
      Specify target interface speed [kHz]. <Default>: 4000 kHz
      Speed>
      Device “CORTEX-M4” selected.

      Connecting to target via SWD
      Failed to attach to CPU. Trying connect under reset.
      Cannot connect to target.
      J-Link>

      This is the result of west flash –erase

      – west flash: rebuilding
      [0/18] Performing build step for ‘spm_subimage’
      ninja: no work to do.
      [⅕] Performing build step for ‘mcuboot_subimage’
      ninja: no work to do.
      – west flash: using runner nrfjprog
      – runners.nrfjprog: mass erase requested
      Using board 960077407
      – runners.nrfjprog: Flashing file: /Users/tcwjohnson/nRF9160-DEV/nfed/samples/at_client/build/zephyr/merged.hex
      ERROR: Unable to connect to a debugger.
      ERROR: The –family option given with the command (or the default from
      ERROR: nrfjprog.ini) does not match the device connected.
      NOTE: For additional output, try running again with logging enabled (–log).
      NOTE: Any generated log error messages will be displayed.
      FATAL ERROR: command exited with status 18: nrfjprog –program /Users/tcwjohnson/nRF9160-DEV/nfed/samples/at_client/build/zephyr/merged.hex –chiperase -f NRF91 –snr 960077407

      nrfjprog -v
      nrfjprog version: 10.17.3 external
      JLinkARM.dll version: 7.80b

      That’s weird. Can you send a picture of your setup? Do you have a DMM? Curious to see what 3.3V to ground is measured as while the Tag Connect is connected.

      Can you verify that the Tag Connect is good with another board? They can get finicky especially after extended use.

      Also, I’ve never seen these these exact errors. Maybe because nrfjprog is newer? My version is a bit older:

      ❯ nrfjprog -v
      nrfjprog version: 10.15.1 external
      JLinkARM.dll version: 7.52d
      7 months later

      Dear All,

      I have got an NRF9160-DK to program the bootloader.

      I have made the connection as below (VDD-3V)
      NRF9160DK NRF9160-Feather
      VDD(3V) <—-> VDD (3V)
      GND <—-> GND
      SWDIO <—-> SWDIO
      SWDCLK <—-> SWDCLK

      After the connection and powering up…my PROGRAMMER (from Desktop Connect) still shows NRF9160-DK and not the Custom Board.

      What am I doing wrong ?

      DO I have to put SWDSELECT to GND ?

      Cheers
      H. Jain

        A nRf9160-DK is able to switch the I/O voltage via SW9.
        For a Thingy:91 you need 1.8V, for the feather you need 3V.

        See Debug output

        If SW9 is switched to 3V, I’m able to flash a feather with the nRF9160-DK.

        Additional note:
        The reset of the jtag is not connected to the nRF9160 on the feather. After flashing you need to press RST manually.

        jainhemendrah are you manually wiring these connections? I’d highly recommend using a Tag Connect. (TC-CTX-2030NL)

        For all Nordic chips you need to have the SWD lines connected as well as the 3V/GND. You also need to power the feather via battery or 5V unless you’ve modified your nRF91DK to provide power.

        Terms and Conditions | Privacy Policy