cancel
Showing results for 
Search instead for 
Did you mean: 

Extraction of bin file from microcontroller

BTay.1
Associate II

Hey, sorry, I am pretty new to this. I have a rather basic question. I took apart a module that I have, within which there is STM32 microcontroller (part marking: STM32F103T8U77BA7E93PHL739). I want to know if it's possible to use the IDE to extract the existing bin file in the microcontroller, via JTAG or some other method? Reason being I have my own bin file that I'd like to test, but in case I screw things up, I'd like to be able to restore the module back to its original condition by reinstating the original bin file into the microcontroller. So my plan is to extract the current contents of the microcontroller by reading back, store the bin file safely before i do any kind of experimentation so that at least the original condition can be restored. Hope my question is clear.

30 REPLIES 30

It's a QFN36 with a longer soldering traces. It has sharp corners like QFN parts, not rounded ones like LQFP. And even in that blurry image it can be seen that all four VSSx/VSSA pins of a QFN36 package are connected to the larger GND plane.

BTay.1
Associate II

Thank you for the responses!

  1. I work with classified information, which is why there are a lot of things about this board that I have to be deliberately vague about. This is also why the image I've furnished is heavily cropped, and therefore of a lower quality. Still, I appreciate the responses so far, and I apologize for my vagueness which I imagine only serves to hinder your ability to help me figure things out. Since this board I have acquired isn't a widely and commercially available product, a Google Image Search would be futile. When we acquired this board it came with zero design information, so our attempt is to try and figure out if extraction of the current program within the microcontroller is possible, and if so via what means. The assumption of the 4-socket header being a way to connect to the microcontroller is a pure conjecture, and I have nothing to back up this conjecture. There was no design information given to describe the 4-socket header's function.
  2. I was laboring under the false assumption that the "legs" were physical pins, but as mentioned above, it is likely that they are just long solder traces instead. Therefore, the VQFPN36 package seems highly plausible. Now I just need to figure out how to connect to it, to read out the program - any ideas? It might well be the case that I need to manually solder wires to the tiny 36 solder traces in order to access the microcontroller, since probing the 36 pins yielded no connection to the 4-socket header.
  3. Again I'd like to thank everyone for the keen detective work and at the very least, pointing out the mistake that this wasn't a LQFP package as I had previously thought.
  4. I will try and provide more information as much as I am authorized to, but please understand my constraints if I am not able to do so.

Thank you again for all your responses!

BTay.1
Associate II

An update. Turns out I made the rookie mistake of using a faulty probe. After changing the probe, I was able to deduce the following:

0693W00000QKF2fQAH.jpgSocket 1 = Pin 18 of microcontroller

Socket 2 = Pin 25 of microcontroller

Socket 3 = Pin 28 of microcontroller

Socket 4 = Pin 1 of microcontroller

Again the solder traces were tiny so there might be a mistake, but this corresponds to:

VDD_1, VSS_1, PA13, PA14. (ie, power, ground, SWDIO, SWCLK)

Would that make sense?

@BTay.1​  "the solder traces were tiny"

LOL - those traces are huge by modern standards! 😂 😅

"(ie, power, ground, SWDIO, SWCLK) Would that make sense?"

Yes, that's exactly what you'd need for an SWD programming/debug connection

(it'd be nice to also have Reset, but not essential).

@BTay.1​  "I work with classified information"

and you really don't have any colleagues or supervisors in your organisation who can assist you with this?

"Thank you again for all your responses!"

I hope you will be giving due credit in your report/whatever ...

BTay.1
Associate II

what is the part number of the programmer I have to buy in order to connect my microcontroller to the PC, using this SWD socket?

Regards

Ben

It's a non-standard socket, so you won't find anything "plug-and-go".

But any SWD program/debug probe (which supports your Target voltage) will work - you just need to make an appropriate adaptor.

Since you're on the ST forum, an ST-Link must be the obvious suggestion.

Tools are listed on the Product Page for the microcontroller:

https://www.st.com/en/microcontrollers-microprocessors/stm32f103t8.html#tools-software

In addition every Nucleo-64/144 board has an onboard ST-LINK that can be used as a debugger probe for other boards.

Another popular choice is SEGGER J-Link devices.

BTay.1
Associate II

Thank you for the suggestion, I am looking at:

this programmer

So I can connect this to the STM32CubeProgrammer, using that?

I have to manufacture a cable linking:

Socket 1 = Pin 18 of microcontroller = VSS_1 = GND (pins 4,6,8,10,12 of ribbon cable)

Socket 2 = Pin 25 of microcontroller = SWDIO = Pin 7 of ribbon cable

Socket 3 = Pin 28 of microcontroller = SWDCLK = pin 9 of ribbon cable

Socket 4 = Pin 1 of microcontroller = VDD = pin 1 of ribbon cable

That would work, I hope.0693W00000QKWDzQAP.jpg0693W00000QKWDuQAP.jpg

Piranha
Chief II

> So I can connect this to the STM32CubeProgrammer, using that?

No. More detailed answer:

https://community.st.com/s/question/0D53W00001SdsrCSAR/cubeprogrammer-with-jlink

In addition to CubeIDE supporting J-Link, you will have these:

https://wiki.segger.com/UM08001_J-Link_/_J-Trace_User_Guide#J-Link_Software_and_Documentation_Pack

As far as I understand, CubeIDE has an integrated J-Link GDB Server. I don't understand why they don't just call the normally installed J-Link GDB Server like some other IDEs do, but hey - we're talking about ST's software...