STM32 UART programming

I am designing a breakout board for the STM32F103RB, I have the UART1 pins out so I can use flash programming rather than JTAG, but I am having no luck with ST flash programmer :frowning: it gives me different problem messagesā€¦

  1. ā€œUnrecognized deviceā€¦please, reset your device then try againā€

  2. ā€œNo response from the target, the boot loader can not be started. Please verify the boot mode configuration and the flash protection status, Reset your device then try againā€

  3. ā€œCannot get available commands, please, try to change echo selection, reset your device then try againā€

Board:

====

I have a custom made board, which I confirm is working since I have the JTAG pins out as well and was able to connect and program it using Olimex ARM-USB-OCD + Eclipse

Connection:

=======

USB to serial FT232 ā†’ Sparkfun logic level converter (3.3v/5v) ā†’ STM32 UART pins

Settings:

======

Boot 0 = 1

Boot 1 = 0

Things I tried:

=========

1 - Set boot 0 & boot 1 to correct setting (As above) then quickly pressing next button on flash demonstrator

2 - Power up board, run flash demonstrator, pressing next

3 - Power up board, run flash demonstrator, press reset button, pressing next

Nothing of that works, for some reason the Flash demonstrator does not want to connect to the board :frowning:

Appreciate your input on thisā€¦

Do you have the ft232 driver installed (i should add for the chip id you have installed onto your pcb)?

Is you r ft232 chip operating correctly?

Do you have a known ft232 usb->uart dongle that you could wire up to the uart using flywires?

The ft232 is working fine I just tested it :frowning:

According to the source code in Sloadhost (see below) the autobaud character is 0x7f, or DEL, and the response is 0x79, or ā€˜yā€™. So in theory you should be able connect with a terminal program, reset the board, hit (or hold down) the DEL key, and see a ā€˜yā€™ in response.

When I tried this on a commercial dev board I did get a response, but it wasnā€™t a ā€˜yā€™ - it was more like the sort of garbage you expect to see with wrong baud rate, etc. Same thing at 57600 or 115200. I only tried 8n1 - that might be my problem. More research required. (Sorry - too lazy to dig through the ST docs right now.)

Anyway you might try that and see if youā€™re getting anything at all from the STM32. A scope or even a multimeter might help.

Search this topic for ā€œsloadhostā€ - Alex Favelukaā€™s program has been very useful for me, but diagnostics are not its strong point, and Iā€™m not sure it includes a Windows binary.

[Edit]The terminal program I tried first (ā€œscreenā€) was sending a 4 character sequence when I hit the DEL key. Hence the garbage. It turns out that HyperTerminal can be set to send DEL (0x7f) when you hit the backspace key. Using that method I was able to get the ā€˜yā€™ response. However, forget what I said about holding the key down - it seems to be a one-time thing.

I think this is the first time Iā€™ve ever written anything positive about HyperTerm!