2009-12-23 03:34 PM
Flash Loader Demonstrator v2.1.0 RTS/DTR control issue
#stm32-flash-bootloader2011-05-17 04:32 AM
I'm trying to use ST's STMFlashLoader.exe program, which comes with the
http://www.st.com/stonline/products/support/micro/files/um0462.zip
package. I've successfully been able to use STMFlashLoader.exe out of the package (without recompiling etc) to load code/data into a blank STM32F processor. On my hardware I've connected the RS232 RTS and DTR signals to NRST and BOOT0 (with appropriate level shifting etc) so that a PC application can completely control the loading of the application without manual user intervention (i.e. jumper on the BOOT0 signal) for manufacturing/testing purposes. However I've run into a problem in that the RTS/DTR signals seem to be controlled within the STUARTBLLIB.dll (for which source code code in NOT provided!) via the Win32 EscapeCommFunction() API rather than the setRts()/setDtr() functions in STBLLIB.dll (for which source IS provided). I say ''seem to be'' because I changed/recompiled STBLLIB.dll with setRts()/setDtr() stubbed out (i.e. do nothing) and yet the RTS signal still toggles. I know this isn't done in the main program (STMFlashLoader.cpp) because I've checked. Therefore is it possible for someone with access to the STUARTBLLIB.dll source code to determine if RTS/DTR are controlled directly (why?????).2011-05-17 04:32 AM
For personal use, there is a free STM32 programmer using RTS/DTR for bootloader control. See
. If you cannot read german, just follow the links. The program itself talks english. [ This message was edited by: prx on 04-12-2009 14:51 ]2011-05-17 04:32 AM
Thank you. That works great even with a standard serial port. The only issue is that it doesn't provide a way of setting the flash-write protection bits. That's ok because I can have my firmware do that when it runs :)
2011-05-17 04:32 AM
I'm using an STM32F101C8T6. I have DTR controlling STM32 power and RTS controlling BOOT0. I have tried to use STMFlashLoader and it won't toggle DTR or RTS. I run the following and DTR doesn't move:
STMFlashLoader -Dtr --Hi I'm on COM1. If I open HyperTerm or TeraTerm, DTR goes high. STMFlashLoader is using a library call, STBL_SetDtr(TRUE|FALSE), but I'm not sure if this boils down to an EscapeCommFunction. I've used Dale Wheat's STM32Boot (which does use the EscapeCommFunctions to toggle DTR and RTS) and it worked well with bootloader v2.0. See However, my latest chips are running bootloader v2.1, so I can't use that at the moment. Is anyone else using STMFlashLoader to toggle DTR/RTS with success? I also looked at STM32Prog.exe, but it assumes DTR and RTS on specific pins and I can't change them (plus, there's no source).2011-05-17 04:32 AM
there have a free tool,call ''mcuisp.exe'',which can download from www.mcuisp.com.
It is write by me, mm2011-05-17 04:32 AM
You just confirmed what I found. STMFlashLoader is broken when it comes to DTR/RTS. I gave up and downloaded/used STM32Prog.exe (the link is in the reply to my original post above). It worked immediately with no fuss.
That said my connections are: RTS to NRST DTR to BOOT0 If you can't reverse the signals then you'll probably have to write your own PC utility.2011-05-17 04:32 AM
:D
mcuisp,你的软件是中文的,这里�?�好些个都是大鼻�?,估计�?太认得中文呢。2011-05-17 04:33 AM
Hi.
Is there any chance to get a working version of the flash loader (command line version) regarding the RTS and DTR lines? This would be very helpful! thanks a lot and kind regards2011-06-09 10:00 AM
I could successfully download following these steps:
It has worked perfectly for me, no more switches! Hope it helps everybody.
GUGA