cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing STM32F103CBT6(U2) on the STM32F407G-DISC1

SidneyCritic
Associate II

The U2 on my STM32F407G-DISC1 is shorted and needs to be replaced.
Is the STM32F103CBT6(U2) pre-programmed, or can I just replace it with a new blank STM32F103CBT6 and it gets programmed when you DFU firmware the STM32F407G-DISC1 board.
Hardware isn't a problem for me because I'm a Mech Eng, but how all this software works baffles me, ie, I'm assuming U2 is just a micro and needs code before it becomes functional for whatever it does - lol -.

9 REPLIES 9

> Is the STM32F103CBT6(U2) pre-programmed,

Yes. It has its own bootloader, which is not published by ST.

> or can I just replace it with a new blank STM32F103CBT6 and it gets programmed when you DFU firmware the STM32F407G-DISC1 board.

No.

JW

Andrew Neil
Evangelist III

As @waclawek.jan said, ST don't provide the ST-Link code to users.

Probably the easiest way forward is just to use an external ST-Link with the board.

Or get a new board ...


@waclawek.jan wrote:

Yes. It has its own bootloader, which is not published by ST.

I kind-of figured it would be something like that - ouch! -.

The DISC is the controller for a DIY EFI that I completed 4 years ago, but never got running because I found the software side confusing/tedious. Fast forward to today and I thought I would get it actually running with a stimulator(hardware simulator) on the bench, because it wouldn't cost me anything but time - no income -. But since I'm never going to use it it's not worth spending another $50 to buy another DISC just for a whim - a $10 chip change is reasonable -.

Oh well, them's the breaks.
Thanks.

 

 


@Andrew Neil wrote:

As @waclawek.jan said, ST don't provide the ST-Link code to users.

Probably the easiest way forward is just to use an external ST-Link with the board.

Or get a new board ...


I pulled the chip(U2) and the short cleared, but running ST-LINK through a USB from a PC and it doesn't see it. I guess you mean talk to it through the programmer. I can only continue the project if it's on-the-cheap - no income -, so it's probably not worth it if I need to buy a programmer. Plus I don't think the projects software - it's automated now -, would be happy going through a programmer - I had enough problems with virtual serial ports 4 years ago. lol -.


@SidneyCritic wrote:

I don't think the projects software - it's automated now -, would be happy going through a programmer

Not sure what you mean by that?

As far as programming & debugging is concerned, an external ST-Link would look exactly the same as the ST-Link originally built-in to the board.

If you have any other ST Disco or Nucleo boards, their ST-Links can usually be used with external targets ...

A genuine ST-Link/V2 is only ~£20; clones work, and are cheaper ...

I think I get it, ie, the programmer opens a new COM# port, and I just direct the app through that.

I'll have to look into it, and see if it fits in my ECU. Basically it has to be convenient to plugin a laptop in the car so you can adjust fuel mapping and data stream -.

Thanks.


@SidneyCritic wrote:

I think I get it, ie, the programmer opens a new COM# port, and I just direct the app through that.


No:  the Virtual COM Port (VCP) is not used for programming and debugging; that's done over a separate link - called SWD (Serial Wire Debug):

https://developer.arm.com/documentation/ihi0031/a/The-Serial-Wire-Debug-Port--SW-DP-/Introduction-to-the-ARM-Serial-Wire-Debug--SWD--protocol

SWD is a development of JTAG:

https://learn.sparkfun.com/tutorials/arm-programming/jtag-and-swd

 


@SidneyCritic wrote:

Basically it has to be convenient to plugin a laptop in the car so you can adjust fuel mapping and data stream


You'd use a UART/COM port for that - not a debugger.

 

Addendum

This highlights the separate SWD Debug/Programming link (blue) and the UART link (red):

AndrewNeil_0-1712735806055.png

 

But they both go through the one micro-USB connection - in some cases, a mass-storage device also shares that one connection.

#STLinkUSB #STLinkVCP

Andrew Neil
Evangelist III

@SidneyCritic is your issue now resolved?

If so, please mark the solution - to help future readers to find it.

Looks like she's fried - lol -.

I connected a good DISC to one of those cheap ST-Links and it connects fine, but when I connect my blown/removed the (U2) chip DISC, it see the ID, but keeps giving out a "Disable Read Out Protection" error.

I was looking at the DISC manual and it says it has diode protection - looks like it's reverse polarity protection not Zener voltage limiting -, but even then PWR in goes straight to liner regs that can take the 10V overload, so I don't know why it would've blown in the first place.