Electronic – Trying to flash STM32f030f4 (ARM, Cortex M0) – what is proper wiring

armbootloaderstm32stm32f0uart

I've got STM32F030F4 chips from shop, made a small breadboard adapter for it and tried to connect to its built-in bootloader via USART1.

I've failed and I'm somewhat bewildered about wiring. My current schematic is the following:

  • pin 16 (VDD) to +3.3
  • pin 15 (GND) to GND
  • pin 1 (BOOT0) to +3.3
  • pin 4 (RESET) to GND, temporarily
  • pin 8 (USART1_TX) to RX of the FTDI-cable
  • pin 9 (USART1_RX) to TX of the FTDI-cable

The cable I use constantly with NXP chips, so I think it is using. It also provides +3.3 volts and has LEDS to indicate TX/RX activity.

I've tried this tool http://sourceforge.net/projects/bootstm32/ after plugging the cable and temporarily applying RESET to GND.

Magically, it could not connect, though I see the TX activity LED blink…

I've rechecked datasheet and I am somewhat bewildered. There are also pins 17 and 18 for USART1 TX and RX. I've tried them also but to no avail.

Another concern is that I think this chip do not have BOOT1 pin (many manuals write about driving it low). So I assume it is not needed?

I also thought I can test with multimeter either one of pins is in strong HIGH state, which should be TX – but none is. Though probably TX is turned to output only after auto baud rate detection is completed?

What else can be wrong? I think I need not quartz for simplest schematic, yes? Thanks in advance for your hints!

UPD Solved! It appeared that VDDA should also be connected, otherwise chip is in reset state. Please see my own answer below for more details.

Best Answer

At last I've found what was missing.

VDDA should be connected! e.g. to VDD. I believe if device has VSSA also, it also should be connected.

Otherwise the chip is in reset mode "thanks" to functionality which monitors both VDD and VDDA and simply does not allow chip to start.

So minimal connection is like this:

  • 3.3 Volts to VDD, VDDA, BOOT0
  • GND to VSS (and VSSA if present)

(at this point you can check that PA9 yields strong high level - seems it at once becomes TX output)

  • PA9 (TX) to the RX of the cable (in my case no pull-up is needed as it is full-functional output)
  • PA10 (RX) to the TX of the cable.

By the way I use the cable with 5V levels and it is Ok as the pins are 5v-tolerant.