cancel
Showing results for 
Search instead for 
Did you mean: 

Custom board SWD Programming

Lu�s Magalh�es
Associate II
Posted on January 18, 2018 at 09:42

Hi there,

We're designing a custom board for a customer with the STM32F746 DSP and we wanted to remove the external programmer so it would be easier for them to upload and debug their own code. In order to do this, we copied the schematic from the Disco board using the SWD connection.

When connected through USB, the PC detects the board as the ST-LINK programmer, but it's version 2/0 which only works with JTAG. Is there a way to change it to V2/1 to support SWD ? Or how can we do this?

Best regards,

Luis

#programmer #stm32f746 #st-link-v2-1
10 REPLIES 10
Posted on January 18, 2018 at 11:34

Which disco version you copied the st-link from?

The st-link v2 vs v2-1 have different MCU with different flash sizes so having the hw for st lijk 2 you probably cannot upgrade the firmware to v2.1 because the flash size limit.

Not sure why the st-link v2 does not suport the SWD - I use both st-links (have non upgradeable disco boards) and both support swd. Please share more details.

Posted on January 18, 2018 at 17:23

The external ST-LINK and DISCO/NUCLEO board versions have always supported SWD

Something else is wrong with your implementation.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on January 18, 2018 at 17:35

Can't you program or debug? If you can program but you cannot debug the problem might be related to not enabled SWD pins. It's typical error

Posted on January 18, 2018 at 22:07

We can neither program nor debug. We copied the implementation done here:

0690X00000609Q7QAI.png

And used the same parts, so the flash size isn't a question here.

This is the dialog window when using the STLink Utility:

0690X00000609QRQAY.png

As you can see, we can't even detect the target MCU (STM32F746). Also, when we try to program it using SW4STM32, this is the output:

0690X00000609QMQAY.png

It seems like it's trying to use the JTAG connection to program, but we're using the exact same options as when we program the STM32F746G-Disco board. And that is always successful:

0690X00000609R0QAI.png

Any idea of what's going on?

Posted on January 18, 2018 at 22:16

I would try different software e.g. Keil (free versions is available)

Posted on January 18, 2018 at 22:38

Could you give a look at the screenshots posted below and try and see what's wrong please?

T J
Lead
Posted on January 19, 2018 at 00:36

You should be able to upgrade it to 2.1.

I am not sure this will help...:

I have this running on my old terminal board. I used a 10k resistor on Boot0,

do you know if its the F103 chip problem or a F746 problem ?

can you hold the 746 in reset and try to program, it may be the 746 is upset.

I think your GDB screen will be the same.

Posted on January 19, 2018 at 00:46

You created a bootleg ST-LINK, I'm not sure what you've built.

What is the ST-LINK connectivity to the F7? Can you try with a stand alone ST-LINK? 

OCD is always kind of sketchy, test with the ST Utilities or Keil

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Lu�s Magalh�es
Associate II
Posted on January 19, 2018 at 10:22

Holding the reset low gives the following message:

Info : accepting 'gdb' connection on tcp/3333

Error: auto_probe failed

Error: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.

Error: attempted 'gdb' connection rejected