Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

stm32f103 update frimware from spiflash

Status
Not open for further replies.

monjiemegoo

Newbie level 6
Joined
Oct 27, 2018
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
307
hellow guys
i have a stm32f103 microcontroller and i run a bootloader code on it. i wanna know how can i update stm32 frimware with a bin file in to spiflash?
i this possible?
how i can wtite bin file of my project to spi flash ?
how i can update frimware from spi flash?
can some one please help me or intriduc a refrence that explane how to do it
thanks
 

Hi,

when I do an internet search for: "stm32 spi flash bootloader" I get about 250,000 hits.
(Didn´t you do this already on your own?)

There are some application notes and documents directly from STMicroelectronics. I think they describe in detail how to handle it.
There are even "how to " youtube videos...

Klaus
 

Hi,

when I do an internet search for: "stm32 spi flash bootloader" I get about 250,000 hits.
(Didn´t you do this already on your own?)

There are some application notes and documents directly from STMicroelectronics. I think they describe in detail how to handle it.
There are even "how to " youtube videos...

Klaus


i know i can searh. but when i search every one explane how to do that with uart. i didnt find a step by step explnation about how to do that with spi flash. if you now a refrence please introduce to me
 

Hi,

Since we don´t know your circuit and your requirements ... we can only tell you the "usual" way.
(And so do the internet documents)
If your circuit or requirement differs from the usual way, then you need to tell us in which regard. Otherwise helping will be impossible.

*****

The usual way to get/generate the hex file is:
PC --> your source code --> compiler --> HEX file

The usual way of SPI flash connection is:
STM32 --> via SPI --> Flash

Now usually the Flash is an SMD part and directely soldered to the PCB.
If this is not the case with your application then you need to tell us how it is.

Then often the SPI Flash is updated via the STM32.
PC --> UART --> STM32 --> via SPI --> Flash.

If you don´t want it this way, you should tell us why .. and how else you want it.

Klaus
 

Hi,

Since we don´t know your circuit and your requirements ... we can only tell you the "usual" way.
(And so do the internet documents)
If your circuit or requirement differs from the usual way, then you need to tell us in which regard. Otherwise helping will be impossible.

*****

The usual way to get/generate the hex file is:
PC --> your source code --> compiler --> HEX file

The usual way of SPI flash connection is:
STM32 --> via SPI --> Flash

Now usually the Flash is an SMD part and directely soldered to the PCB.
If this is not the case with your application then you need to tell us how it is.

Then often the SPI Flash is updated via the STM32.
PC --> UART --> STM32 --> via SPI --> Flash.

If you don´t want it this way, you should tell us why .. and how else you want it.

Klaus


hi KlausST
thanks for repling

i have a smd spiflash on my stm32f103 borad. right now i can read and write into spi flash.first i wanna write a bin file (output of a blinky project) into spi flash as a frimware. and second i wanna update micro prgoram whit that bin file.

with attention to we cant run a file system on spiflash i wanna know how shoud i write a bin file in to spiflash and how i can update frimware from spiflash. i can update frimware through uart with ymodem protocol but i dont know how shoud i update from spiflash
 

Hi,

Again: We don´t see your system. Please give usueful informations.

Does your system support any other way (to read/write the Flash) than: STM32 --> via SPI --> Flash?


****

If you already can read/write the flash...Where exactly is the problem then?

Klaus

yes my system is support spi and spi flash

the problem is as i say i dont know how to write a file (bin file) to spi flash without file system and i dont know how to update firmware from spi flash. i can write an array to spi flash but i dont know how to write a file in to that.
 

...sorry for the wrong order of posts
***************************

Hi,

Again: We don´t see your system. Please give usueful informations.

Does your system support any other way (to read/write the Flash) than: STM32 --> via SPI --> Flash?


****
i can read and write into spi flash. First i wanna write a bin file (output of a blinky project) into spi flash as a frimware.
If you already can read/write the flash...Where exactly is the problem then?

Klaus

- - - Updated - - - *****************************************************************

Hi,

Difficult to communicate....

I asked about:
Does your system support any other way (to read/write the Flash) than: STM32 --> via SPI --> Flash?
We don´t know whether your FLASH is removable an can be programmed with an external programmer, or whether your SPI bus has a connetor for another SPI MASTER to read/write the Flash ... or maybe there is any other way to read/write the FLASH.

*****
i can write an array to spi flash but i dont know how to write a file in to that.
Any "file" is an array of bytes.
So if you can write an array of bytes ... where is the problem to write the binary file?

*****
But I have to assume you did not read deeply through the bootloader application notes.
Thus please tell us what exact bootloader you use.
And give links to the application notes regarding this bootloader.

To explain your problem, please draw a draft. A picture says more than a lot of words.

***

Without clear informations I see no way to go on.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top