cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate stm32f405rgt6

tyler1993
Associate

Hi, i was wondering if it is possible to make an exact copy of an existing STM32F405RGT6 and write to another. The use case for this is an open source motor controller (VESC). i have a fully functional board, and one that i have replaced the stm32 on due to it having an internal short. (Im not exactly sure what happened, the LDO was getting very hot and there was 5v on both Vin and Vout, removed LDO and Vin and Vout were shorted, removed stm32 and short went away. soldered in new LDO and STM32 and it now powers up). I can relfash it via SWD through VESC tool, which includes the firmware for some of the variations of hardware, using the functional board as the link between my computer and the new board by connecting the CLK,DIO and GND between the 2, but none are the right configuration. The company that sold these has been defunct for years, and i cannot find the firmware anywhere, so i was thinking if this was possible, this would be the easiest route. the alternative being reverse engineering the entire pcb so i know every pin's function learning how to write a hardware configuration file and compiling custom firmware. i have an stlink because i reflashed one of these several years ago and vaguely remember using stmcubeprogrammer to do so. That being said, i was following a step by step guide with files provided. 

 

I tried searching to see if this can be done but everything i find leads to this being done people asking t do this for commercial products, nefarious reasons with legal implications and/or some type of protections being enabled on the chip to prevent this. Being an open source project, i do not think that is an issue here (IIRC it is a violation of the GPL to NOT make available the firmware, which could easily be flashed via their utility with a coupe clicks, but that's neither here nor there as the company no longer exists and the website they used to host it, is offline)

 

Thanks in advance, sorry for being a total noob possibly asking a dumb question. i understand that this will be far more complex than "copy and pasting" the contents like it is a flash drive, but after a several hours of reading i do not even know where to start. 

1 ACCEPTED SOLUTION

Accepted Solutions
Peter BENSCH
ST Employee

Welcome @tyler1993, to the community!

As long as the STM32 used is not protected, you can read out a binary and transfer it to another one.

You could also simply take the source code that is available as open source on Github, recompile it and flash it into your STM32.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Peter BENSCH
ST Employee

Welcome @tyler1993, to the community!

As long as the STM32 used is not protected, you can read out a binary and transfer it to another one.

You could also simply take the source code that is available as open source on Github, recompile it and flash it into your STM32.

Regards
/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

thank you for the response, i will look into doing a binary transfer. Normally i would recompile firmware, but i do not have any of the hardware files, which contain pin assignments, offsets, ect, and with the hardware all being different from one to another it can end badly if set wrong.