Adalink unable to detect nrf1822 on Gateway Shield


#1

Hello everyone,

I’m using stlink v2 with a Cortex SWD Adapter to talk to my gateway shield via SWD. I followed the bluz-cli documentation and have all my dependencies installed.

Pin-Connection:

Cortex SWD Adapter <–> ST-Link V2

  • Vref --> 3.3V
  • Gnd --> Gnd
  • TMS --> SWDIO
  • TCK --> SWCLK

The SWD adapter is connected to the SWD on the gateway shield. When I plug in the st-link and execute the following command to verify dependencies and the connection:

adalink nrf51822 --programmer stlink --info

I get the following error:

    Traceback (most recent call last):
  File "/usr/local/bin/adalink", line 9, in <module>
    load_entry_point('adalink', 'console_scripts', 'adalink')()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/user_main/system_installations/Adafruit_Adalink/adalink/core.py", line 78, in _callback
    raise AdaLinkError('Could not find {0}, is it connected?'.format(self.name))
adalink.errors.AdaLinkError: Could not find nrf51822, is it connected?

Am I missing something…? Are there any connections I am missing/ misunderstood?

Any and all help is much appreciated. Thank you.


#2

Did you independently power the DK?

The Vref pin on the STLink is for sensing power, not providing it. The DK needs its own power source. While the STLink may provide a small amount of current to the DK, enough that it even looks powered on, it isn’t enough for debugging.