Author Topic: Using ST-Linkv2 of nucleo board to flash custom board.  (Read 2550 times)

0 Members and 1 Guest are viewing this topic.

Offline knapikTopic starter

  • Regular Contributor
  • *
  • Posts: 143
  • Country: au
Using ST-Linkv2 of nucleo board to flash custom board.
« on: October 14, 2018, 04:46:27 am »
Currently for a student project which I'm doing (and is due quite soon unfortunately  :'() I'm having difficulties in flashing my custom board with the STM32 microcontroller we're using.

I've been using the GNU MCU plugins for eclipse and openOCD for development and flashing. I've had luck in flashing the microcontroller on the nucleo board itself, but when I take off the ST-Link / Nucleo jumpers (CN2) on the board and jump the header used for connecting an outside ST-Link (CN4) to the board I designed, it doesn't connect. I've been hearing that this is possible to do, but I definitely am having troubles in doing so. Both boards are using the STM32F091RC microcontroller. Would it be possible for anyone more knowledgeable to chime in and help here?

This is the schematic sheet for the microcontroller on my board:

 


This is the schematic sheet for the nucleo board:

 
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Using ST-Linkv2 of nucleo board to flash custom board.
« Reply #1 on: October 14, 2018, 09:31:10 am »
Double/tripple-check for pinout or routing mistakes, also check for soldering shorts/opens. It could be as simple as SWD pins swapped :D You shall pull-down boot pin, never leave it floating. Introduce reset pull-up and reset button so you can manually reset chip when needed w/o doubt about success. Try lowering SWD frequency, like 100KHz, try increasing timeouts (if any) as well. Try every reset option your debugger offers. Obviously manually reset or power cycle before each programming/debug attempt.
 
The following users thanked this post: knapik

Offline dgtl

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ee
Re: Using ST-Linkv2 of nucleo board to flash custom board.
« Reply #2 on: October 14, 2018, 05:05:10 pm »
First, check the power pin voltages.
Then try connecting to the internal bootloader, ie via uart. Pull the boot0,1 pins to bootloader mode, connect uart to pc and launch the software. If it connects, the problem is in jtag side.
The st-link is cheap enough, that you can get the real thing. Check the connections - for connecting up, you need SWDIO, SWCLK, VCC, GND. Usually you need RST too, but having RST not connected would not cause swd connection failures for empty chips (there may be issues when the fw has put the chip in sleep).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf