This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Openocd promgram NRF51822 with ST link v2 mini

Hi, I got a nrf51822 board and a st link v2 mini as shown below. I have been trying to connect the nrf51822 board so that i can upload code to the board by following this post link text. However, i got no luck till now. the openocd showed an error cannot connect to the target board. Anyone has experience with all these. where may i possibly go wrong?

Error from Openocd

Error: init mode failed (unable to connect to the target) in procedure 'init' in procedure 'ocd_bouncer'

  • St link nrf51822
  • SWCLK <-> SCLK (swclk),pin below p19
  • SWDIO <-> SDO (Swdio), pin below p17
  • GND <-> GND
  • 3.3 <-> VCC

nrf51822 chip : QFAAHQ 1517DE

Thanks for your kind advice

image description

image description

Parents
  • You can use ST-Link probes to program the nRF51 using OpenOCD. You probably have a wrong connection to the nRF51 board. You have to connect the following 4 lines: SWDIO, SWCLK, VCC and GND.

    Have a look at the schematic of the Core51822 board:

    image description

    You must connect SWDIO and SWDCLK and not P0.17 and P0.19. The full schematic is available here: www.waveshare.com/.../Core51822-Schematic.pdf

    It is hard to help you. Please provide more details on the environment you use (OS, IDE, tools, etc.). The article you mention use openocd 0.8.0. This is an old version, you should use openocd 0.9.0 or 0.10.0-dev.

    They are many posts about OpenOCD and nrf51 programming, please have a look at these posts.

Reply
  • You can use ST-Link probes to program the nRF51 using OpenOCD. You probably have a wrong connection to the nRF51 board. You have to connect the following 4 lines: SWDIO, SWCLK, VCC and GND.

    Have a look at the schematic of the Core51822 board:

    image description

    You must connect SWDIO and SWDCLK and not P0.17 and P0.19. The full schematic is available here: www.waveshare.com/.../Core51822-Schematic.pdf

    It is hard to help you. Please provide more details on the environment you use (OS, IDE, tools, etc.). The article you mention use openocd 0.8.0. This is an old version, you should use openocd 0.9.0 or 0.10.0-dev.

    They are many posts about OpenOCD and nrf51 programming, please have a look at these posts.

Children
Related