Copying stm32 chip

Post here first, or if you can't find a relevant section!
Jateu01
Posts: 8
Joined: Sun Mar 05, 2017 2:09 pm

Copying stm32 chip

Postby Jateu01 » Sun Mar 05, 2017 2:34 pm

Hi All,

Silly question for everyone. I'm not a developer or a coder. I have a damaged brushless motor controller and I have found the fault to be the stm32 chip. I have removed it and replaced it with a new one. My problem is that I need to copy the data from a working chip to this new one. Can anyone offer advice or point me in the right direction.

Many thanks

James

User avatar
RogerClark
Posts: 5577
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Copying stm32 chip

Postby RogerClark » Sun Mar 05, 2017 8:28 pm

See this acrive thread

viewtopic.php?f=35&t=1854

Basically, if the stm32 is read protected, which its likely to be, then you will probably not be able to read the program inside it

You may be able to send it away to get it unlocked at a laboratory, ( for a large fee )

Jateu01
Posts: 8
Joined: Sun Mar 05, 2017 2:09 pm

Re: Copying stm32 chip

Postby Jateu01 » Sun Mar 05, 2017 8:38 pm

I don't think it is protected. The esc can be upgraded with new firmware at any time. The thing is I have limited knowledge of this but whst I do know is the that the esc's board has 5 desitict areas where links have been made. I have back tracked and here are a list of pins on the stm32f051k6t6.

Reset pad links to pin 4 reset.
DIO pad links to pin 23 SWDIO.
TX pad links to pin 24 SWCLK.
RX pad links to pin 25
BT pad links to pin 31 Boot.
TLM pad links to pin 24 SWCLK.
PWM pad links to pin 26 SPI1_SCK.

Which of these do I need to read the chip. Because this is what looks like the manufacturer us to program with.

Many thanks again

James

User avatar
BennehBoy
Posts: 418
Joined: Thu Jan 05, 2017 8:21 pm
Location: Yorkshire
Contact:

Re: Copying stm32 chip

Postby BennehBoy » Sun Mar 05, 2017 9:08 pm

Do you need to read it? Or can you not just load the firmware from the manufacturer?
-------------------------------------
https://github.com/BennehBoy

Jateu01
Posts: 8
Joined: Sun Mar 05, 2017 2:09 pm

Re: Copying stm32 chip

Postby Jateu01 » Sun Mar 05, 2017 9:16 pm

Problem is the original chip is totaled and the new chip from electronics supplier is clean. So getting it to talk between demo software and ftdi is difficult because there is no bootloader on chip to begin with. So Im looking to see if I can just copy a good chips contents to put on a fresh clean chip.

James

User avatar
RogerClark
Posts: 5577
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Copying stm32 chip

Postby RogerClark » Sun Mar 05, 2017 11:30 pm

Jateu01 wrote:Problem is the original chip is totaled and the new chip from electronics supplier is clean. So getting it to talk between demo software and ftdi is difficult because there is no bootloader on chip to begin with. So Im looking to see if I can just copy a good chips contents to put on a fresh clean chip.

James



Most STM32's have a Serial Bootloader as part of the chip, which you can access using a USB to Serial adaptor.

Its well documented how you do that, on this forum and elsewhere.

Jateu01
Posts: 8
Joined: Sun Mar 05, 2017 2:09 pm

Re: Copying stm32 chip

Postby Jateu01 » Sun Mar 05, 2017 11:47 pm

Thank you Roger. Apologies very new to this but my chips have been supplied as component level there have nothing on them from what I can see. I have looked for documentation and youtube videos but clearly looking in the wrong place!

James

zmemw16
Posts: 1098
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: Copying stm32 chip

Postby zmemw16 » Mon Mar 06, 2017 1:42 am

what sort of package?
how many pins?
can you post pictures of the board top & bottom ?
identify any connections? to the pcb and to components within the pcb
identify the power pins, 3v3, 5v & 0v
peruse a lot of data sheets

there are blc motor control app notes on st.com, sometime the sample circuits are used almost as is.

not sure if that helps at all, that's the problem with a lack of info ;)

stephen

Jateu01
Posts: 8
Joined: Sun Mar 05, 2017 2:09 pm

Re: Copying stm32 chip

Postby Jateu01 » Mon Mar 06, 2017 1:50 am

Stephen,

I have specified the pins above and the exact chip I'm using. It look like they used pins 14 and 15 for uart communication. I have connected wires as per usb converter instruction but I can't get demo software to see chip! 3v3 power to chip. Am I meant to power the chip while programming or is it powered via converter. Again sorry to be vague but very new to this.

James

User avatar
ddrown
Posts: 124
Joined: Sat Jan 09, 2016 4:49 am

Re: Copying stm32 chip

Postby ddrown » Mon Mar 06, 2017 2:21 am

Jateu01 wrote:I don't think it is protected. The esc can be upgraded with new firmware at any time. The thing is I have limited knowledge of this but whst I do know is the that the esc's board has 5 desitict areas where links have been made. I have back tracked and here are a list of pins on the stm32f051k6t6.

Reset pad links to pin 4 reset.
DIO pad links to pin 23 SWDIO.
TX pad links to pin 24 SWCLK.
RX pad links to pin 25
BT pad links to pin 31 Boot.
TLM pad links to pin 24 SWCLK.
PWM pad links to pin 26 SPI1_SCK.

Which of these do I need to read the chip. Because this is what looks like the manufacturer us to program with.

Many thanks again

James


Do you have a stlink or something that can speak swd? Swclk+swdio are the swd pins, and you'd be able to read the flash through that if it isn't copy protected.

Writing the flash can either be done via swd or uart. Does the board manufacturer have documentation on how to do a firmware update?


Return to “General discussion”

Who is online

Users browsing this forum: No registered users and 1 guest