/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / STM32 bootloading with UART1

Username:     
Password:     
             

Forum

# 1   2008-01-07 11:26:57 STM32 bootloading with UART1

ThomasScherrer
Member
From: Denmark
Registered: 2007-10-29
Posts: 64
Website

STM32 bootloading with UART1

download the PC software application UM0462 and documentation 13916

the BOOT0 and BOOT1 pins are normally pulled low for normal run.

To activate uart1 bootloader, pull BOOT0 HI, press reset,
now the PC sw will connect as discribed,
to make your STM32 run the uploaded program, pull BOOT0 low again and press reset.

I would be happy if the PC program could remember all settings, like comport, device type and file names,
but it can not at this moment.


Thomas Scherrer Denmark webx.dk

Offline

 

# 2   2008-01-08 12:17:32 STM32 bootloading with UART1

Stewee
Member
From: Dorset/England
Registered: 2007-10-11
Posts: 47
Website

Re: STM32 bootloading with UART1

Hi Thomas, I experimented with ST Flash Loader Demonstrator 1.0 with the STM32 Primer to investigate possible alternate upload times on a virgin part. Some temporary hardware mods were needed. Here is what I found.

1) The STM32 chip must be a revision B - for the system boot mode code to be present at 1fffff000-1fffff800.
2) Some Primers are fitted with revision A others with revision B.  the chip is marked ARM A  or ARM B.
3) J3 is not a Jtag connector for the STM32.
4) The STM32 JTAG is hard-wired to the rlink DONGLE.
5) I could not get the Flash Loader Demonstrator to run faster than 9600 or 19200 baud, yet UART1 worked fine at 115200 in my circleos Application. See question below?
6) I could not get Flash Loader Demonstrator to work at all on a desktop PC, it only worked on my laptop.
7) ST will not release the source for the system-boot-mode code
8) The System boot mode code memory is not reprogrammable by users.
9) The Flash Loader Demonstator programmed quicker than it read because it had an option to not reprogram ff's

Does the Flash Loader Demonstator work OK at 115200 BAUD on your Keil board???????
(I suspect my RS232 level converter may be the problem - but its more likely a timing problem at the PC end).

This capability could useful in the field as a last resort reprogramming method for devices with a UART1 interface because it does not require the end user to have development tools.

From past experience with other chip makers it is possible ST may change this system boot mode facility. It may be unwise to assume it stays compatible with revision B. Especially since it appears it does not work at 115200 with my hardware.

Last edited by Stewee (2008-01-08 13:01:48)


( Please Give Blood http://www.blood.co.uk >50% can.  5% do. )

Offline

 

# 3   2008-01-15 10:57:15 STM32 bootloading with UART1

ThomasScherrer
Member
From: Denmark
Registered: 2007-10-29
Posts: 64
Website

Re: STM32 bootloading with UART1

yes on my KEIL board MCBSTM32 I always and only run at 115200
did not know it was possible to change it :-)
I was thinking the part was hardwired to 115200 ? in its bootloader ?
it is actually quite slow a few kb pr sec, I am a bit disapointed about the speed,
and also the PC program dont remember ALL settings, like comport and file extension, is a real pain !
I use comport 4 and have to scroll down to select, same with the .hex

The version A or B is only written on 64 pin parts !
I have checked all my 48 and 100 pin parts I just got for new project testings,
they dont have this A or B next to the ARM logo

Last edited by ThomasScherrer (2008-01-15 10:59:56)


Thomas Scherrer Denmark webx.dk

Offline

 

# 4   2008-01-15 18:21:05 STM32 bootloading with UART1

Stewee
Member
From: Dorset/England
Registered: 2007-10-11
Posts: 47
Website

Re: STM32 bootloading with UART1

System Bootloader documentation says the STM32 system boot loader autobauds, the PC starts by sending 0x7F, the STM32 bootloader detects the baud rate from this right at the start after boot.

Its disappointing that 115k does not solve the speed problem.

There probably are no revision A 48pin and 100pin chips because revision A is an early engineering samples release.

References;-
System boot mode specification; http://www.st.com/stonline/products/lit … /13801.pdf
Flash loader demonstrator is listed here;   http://www.st.com/mcu/familiesdocs-110.html
Download the demonstrator here;  http://www.st.com/stonline/products/sup … um0462.zip
Get the documentation here; http://www.st.com/stonline/products/lit … /13916.pdf

Last edited by Stewee (2008-01-15 20:08:06)


( Please Give Blood http://www.blood.co.uk >50% can.  5% do. )

Offline

 

# 5   2008-01-28 04:25:19 STM32 bootloading with UART1

dalewheat
Member
From: Dallas TX USA
Registered: 2007-10-10
Posts: 43
Website

Re: STM32 bootloading with UART1

I, too, am getting tired of the Flash Demonstrator program.  I use it with the STM3210B-EVAL board at 115200 baud.  To speed things up, I connected COM1 instead of COM2 (because the default is COM1) and use a binary format instead of the Intel hex format, again because that is the program default and it saves me some mouse clicks every time I start up the program.

Some brace soul needs to write a new flash downloader!  I'll start the donations with US$1.  smile

Thanks,

Dale  Wheat

Offline

 

# 6   2008-01-28 12:47:06 STM32 bootloading with UART1

Microfun
New member
Registered: 2008-01-28
Posts: 2

Re: STM32 bootloading with UART1

I m using the flash loader with an STM32 eval board and it works fine, the only pain is to activate or desactivate  the read/write protection, and unfortunately the tool don't provide this features, somone can tell me if I can do it manually with the HyperTerminal for example?

Last edited by Microfun (2008-01-28 13:12:59)

Offline

 

# 7   2008-01-28 21:36:04 STM32 bootloading with UART1

Stewee
Member
From: Dorset/England
Registered: 2007-10-11
Posts: 47
Website

Re: STM32 bootloading with UART1

Please specify how many kbytes were transferred, how long it took, what baud rate you used, which direction data was transferred, and how high or low are your expectations.

As a guide, it should be possible to program 128k in under 20s given a baud rate of 115200 and the flash erase write times specified in the data sheet. Some of the delay would be flash erase/write times {[40ms erase + (256 x 40us write)]x 128 blocks of 1k = 6.4s flash delay}, the rest comms: {128 x 1024 x 10bit / 115200} = 11.4s.

The PC software is only a demo. Scope for improvement may lie in the PC software, in which case Dale is right to suggest one of us could do a better job. The specification is available.  Dale has posted some comments about this on the STM32 forum. Post: http://www.st.com/mcu/forums-cat-6284-23.html

Last edited by Stewee (2008-01-28 22:10:10)


( Please Give Blood http://www.blood.co.uk >50% can.  5% do. )

Offline

 

# 8   2008-01-30 14:09:06 STM32 bootloading with UART1

ThomasScherrer
Member
From: Denmark
Registered: 2007-10-29
Posts: 64
Website

Re: STM32 bootloading with UART1

>Please specify how many kbytes were transferred, how long it took,

10kb in 6 sec, using HEX file as input, 115200 baud, but 5 sec to click and select each time :-)
I am too not happy about the speed, and the user must re-select all things all the time,
I suggest you make the PC bootloader program more friendly to be used as development programmer,
this will animate more users to get started with STM32, since they dont even need to purchase Rlinks or other JTAG
devices to get up and running.
more STM32 freaks = more cool projects= more devices sold = ST happy or not ?


Thomas Scherrer Denmark webx.dk

Offline

 

# 9   2008-02-15 11:41:00 STM32 bootloading with UART1

miko
New member
Registered: 2007-11-22
Posts: 3

Re: STM32 bootloading with UART1

can anywan halp me? haw I can program STM32.  I hav Raisonance RLink bat I can`t programing it, the controller dont runing. plese halp me.

Offline

 

# 10   2008-02-15 12:54:08 STM32 bootloading with UART1

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: STM32 bootloading with UART1

If you have a STM32 Primer, there is already a RLink embedded on the Primer, and you don't need any other programmer. If you want to program your own board, you can use the standard Raisonance RLink. You just need to install RIDE7 + the ARM kit (both are on the CD supplied with the Primer).

Offline

 

# 11   2008-02-15 14:13:58 STM32 bootloading with UART1

ThomasScherrer
Member
From: Denmark
Registered: 2007-10-29
Posts: 64
Website

Re: STM32 bootloading with UART1

hello miko, read post #1 and try all I say there,
the PC sw should be able to connect to the STM32 and you should be able to upload your HEX file,
if you can give us a bit more info like: what board to you have, dev board ? or own hardware ?
have you any sw written ? or you want a test hex file from one of us that blinks with all IO pins and say "hello" on all serial ports ? to prove alive ?
in the beginning you have maybe both hardware and software not working ?
so it is not easy to figure out in what direction to look for solutions.


Thomas Scherrer Denmark webx.dk

Offline

 

# 12   2008-02-19 07:04:38 STM32 bootloading with UART1

miko
New member
Registered: 2007-11-22
Posts: 3

Re: STM32 bootloading with UART1

hi, thanks for halp. I have raisonance toolkit for the ARM family,  Ride7 with programmer R-Link. The dev board  make myself. I use capabilitie for the JTAG-ARM, This capabilitie works on STR711FR2 bat don`t works on STM32F103C8T6. mabe need other capabilitie or perhaps all controller STM32 iz damaged (I test alreade 3 contollers).
I writing hex file in the controller bat contoller don`t runing. Halp me please. Sory for grammar error. I am from Georgia is Tbilisi. Thanks for all.

Offline

 

# 13   2008-02-19 09:10:52 STM32 bootloading with UART1

ThomasScherrer
Member
From: Denmark
Registered: 2007-10-29
Posts: 64
Website

Re: STM32 bootloading with UART1

the STM32 device must be connected correctly to the JTAG device !

also you can check the SW with ride7 in the project go into properties,
click on RLINK configuration:
open the advanced dialog, click "connect to RLINK and read serial number"
does that work ?? if not it is simply windows drivers you need to fix and re-install.
if this is ok, I would download a few PDF schematics of development boards, with the same device you use,
and simply see how they did the powersupply and JTAG connections, then it will work,
it is easy to missunderstand the jtag connections.

this thread was ment to talk about serial bootloading, tried all that ?
it is much more simple, you need a crystal eg 8mhz to you STM32 and a serial level converter and handle the BOOT0 pin, as explained


Thomas Scherrer Denmark webx.dk

Offline

 

# 14   2008-02-19 10:09:14 STM32 bootloading with UART1

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: STM32 bootloading with UART1

FYI: recently we received a board (with STM32) from a customer who reported that RLink was not able to program it. At the end, we found the issue:  the VDDA pin was  not properly powered (VDDA supplies the power for the PLL, the reset block...).  Conclusion: the problem could be again with VCC/VDDA/..

As said by Thomas, RLink manages the communication at different steps.  The "connection to RLink" and the read of the RLink' Serial Number is the very first step. Then, you should try to check whether the IdCode of the STM32 is read. then you could try to erase the chip, then... I suggest that you make these tests with the command line utility: cortex_pgm.exe.

Offline

 

# 15   2008-02-20 06:29:35 STM32 bootloading with UART1

miko
New member
Registered: 2007-11-22
Posts: 3

Re: STM32 bootloading with UART1

hello ThomasScherrer, JTAG connected correctly, I read ID and I write soft in to the device, but my cristal iz 14MHz end it dont works, I think it don`t works becaus that in the STM32 integrated 8MHz cristal and it is conected default and it works. if JTAG conected mistake the controler`s ID don`t  be readed yes?. so if I read ID JTAG conected corectly.  mabe need 8MHz cristal or mabe  need other programmer configuration. I have one somebody, if you have  fool corectly simple GPIO test project for STM32F103C8T6 send me please. thanks beforehand.
::misha from tbilisi

Offline

 

# 16   2008-02-20 09:04:31 STM32 bootloading with UART1

ThomasScherrer
Member
From: Denmark
Registered: 2007-10-29
Posts: 64
Website

Re: STM32 bootloading with UART1

page 45 in the performance datasheet say you can use 4-16MHz crystal
all JTAG systems uses an external clocked syncronious serial connection,
so it dont care at all about your crystal frequency.


Thomas Scherrer Denmark webx.dk

Offline

 

# 17   2008-02-20 09:10:36 STM32 bootloading with UART1

ThomasScherrer
Member
From: Denmark
Registered: 2007-10-29
Posts: 64
Website

Re: STM32 bootloading with UART1

oh, look at page 48 in the performance datasheet.
the input to the PLL, is typ 8.0MHZ
the max input frequency to the PLL is not TESTET so we dont know if 14MHZ will work
or make some devices unstable,
I suggest you change to 8.0MHz and run all parameters within specified ranges


Thomas Scherrer Denmark webx.dk

Offline

 

# 18   2008-02-20 09:20:45 STM32 bootloading with UART1

ThomasScherrer
Member
From: Denmark
Registered: 2007-10-29
Posts: 64
Website

Re: STM32 bootloading with UART1

see page 49 of the refference manual !
you simply select the divider PLLXTPRE so your 14 MHz is now 7 into the PLL,
then you can step it up again to all desired frequencies,
some precautions exist when writing to PLL and clock source bits, so see page 57 before trying to change bits.
7 x 10 = 70, but you can not make 48MHz for USB !!
so I assume you dont want to use USB ?
if so you MUST change the crystal to one that can give a PLL running at 48MHz

Last edited by ThomasScherrer (2008-02-20 09:26:51)


Thomas Scherrer Denmark webx.dk

Offline

 

# 19   2008-04-17 15:30:42 STM32 bootloading with UART1

Microfun
New member
Registered: 2008-01-28
Posts: 2

Re: STM32 bootloading with UART1

new version Flash loader demonstrator for test

visit this link http://www.st.com/mcu/forums-cat-6720-23.html

Offline

 

# 20   2008-04-17 22:50:52 STM32 bootloading with UART1

Stewee
Member
From: Dorset/England
Registered: 2007-10-11
Posts: 47
Website

Re: STM32 bootloading with UART1

Thanks Microfun. Some feedback has been posted.


( Please Give Blood http://www.blood.co.uk >50% can.  5% do. )

Offline

 

# 21   2010-05-07 14:25:37 STM32 bootloading with UART1

niravambaliya
New member
Registered: 2010-05-07
Posts: 2

Re: STM32 bootloading with UART1

Hi all.
I need some help regarding the same (bootloading using USART1).

I am kinda new programmer and not have much knowledge. I have flash loader demonstrator installed.

I have STM3210E-EVAL board. I just want to know how to make this thing work. I mean flash loader demonstrator and STM3210E-EVAL.

I have set Boot 0 switch to 1 and Boot 1 switch 0. I have selected the USART settings as given in the document on flash loader demo.

Can anyone help me with this issue please. I would be grateful.

Thnx,
Nirav

Offline

 

# 22   2010-07-14 03:38:25 STM32 bootloading with UART1

ronald
New member
Registered: 2010-05-21
Posts: 5

Re: STM32 bootloading with UART1

hi. i have a problem when I try to init the usart using usart.h. the program show me a mistake between the library type.h and circle_api.h because they have a equals definitions.
somebody can help me with this. thanks for your comments.

Offline

 

# 23   2010-10-04 09:00:18 STM32 bootloading with UART1

teresap989
New member
Registered: 2010-10-04
Posts: 1

Re: STM32 bootloading with UART1

Stewee :

System Bootloader documentation says the STM32 system boot loader autobauds, the PC starts by sending 0x7F, the STM32 bootloader detects the baud rate from this right at the start after boot.

Its disappointing that 115k does not solve the speed problem.

There probably are no revision A 48pin and 100pin chips because revision A is an early engineering samples release.

References;-
System boot mode specification; http://www.st.com/stonline/products/lit … /13801.pdf
Flash loader demonstrator is listed here;   http://www.st.com/mcu/familiesdocs-110.html
Download the demonstrator here;  http://www.st.com/stonline/products/sup … um0462.zip
Get the documentation here; http://www.st.com/stonline/products/lit … /13916.pdf

Such a very amazing link!
Thanks you for the post.



__________________
watch free movies online

Offline

 

# 24   2010-12-01 20:41:04 STM32 bootloading with UART1

Perry
New member
Registered: 2010-12-01
Posts: 1

Re: STM32 bootloading with UART1

Hello everyone,

I'd like to write my own bootloader for STM32F101. I'm wandering where can I find the source code of STM32 system bootloader, or if the code is available for public?

Any advice will be much appreciated.

Thnx.

Offline

 

# 25   2011-12-19 04:23:00 STM32 bootloading with UART1

chowdaiah
New member
Registered: 2011-10-27
Posts: 3

Re: STM32 bootloading with UART1

Hello everyone,

I'd like to write my own bootloader using CAN bus for STM32F103. I had tried any sample code is available on net but i did't get any where.  I'm wandering where can I find the source code of STM32 system bootloader, or if the code is available for public?

Your early replay will be highly appreciated .

Thanks.

Offline

 

Board footer