cancel
Showing results for 
Search instead for 
Did you mean: 

programing throw USART

khaled3310
Associate II
Posted on April 10, 2012 at 12:18

hi 

i'm wondering how can i program the stmf4discovery using the usart??
6 REPLIES 6
Posted on April 10, 2012 at 15:29

You can use the flash loader in the System ROM

http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/SW_DEMO/stm32-stm8_flash_loader_demo.zip

Or you can write an IAP (In Application Programmer), which is described in an application note, and uses Y-Modem.

You should also review the flash Programming Manual, and consider your options of writing your own.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
khaled3310
Associate II
Posted on April 10, 2012 at 17:40

I read it and it seems that I should  preprogram  the board before I can use USART to download my programs ???? 

Posted on April 10, 2012 at 17:46

I'm not sure I understand.

The System Loader is on a ROM, and supplied with all devices, you can boot into it by pulling the BOOT0 pin High.

New devices can be programmed via JTAG/SWD, USART or USB

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
khaled3310
Associate II
Posted on April 10, 2012 at 18:03

 i m trying now all possibilities .look there is the situation I'm supposed to send a program for The F4 throw another board a in my case an stmF100 an the only why that i found is to send it from usart to usart so im wondering if i should preprogram the F4 Discovery before that it can receive the i don’t know ''the needed program''

sorry for my English :(

Posted on April 10, 2012 at 18:30

No problem, the word you're looking for is ''through''

The protocol used by the system loader is quite simple, I believe it's been described with varying degrees of detail over the years. The previous cited application contains source code for the host side code, this could be ported to a micro processor too, but the amount of data might be too high. You could always tunnel the serial data from another source, or PC, ie read from one serial port, and forward that data to the one connected to your F4 devices, and also route the data back.

There is also an open-source project out there for programming the STM32's

To get the F4 into programming mode, you'll need to assert the BOOT0 pin, and RESET the device.

This is the most recent document related to the system loader

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00167594.pdf

You could try to find some older ones, and review the source code for the demonstrator, and open-source equivalent. This should give you some perspective.

This is the app note for the STM32F1xx IAP, but the premise is the same for other parts.

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00161640.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
khaled3310
Associate II
Posted on April 10, 2012 at 20:06

ok I will try all that i can thank you  very much 🙂 i think i will visit you other times