Author Topic: STM32F030F4P6 Programming issues  (Read 5862 times)

0 Members and 1 Guest are viewing this topic.

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
STM32F030F4P6 Programming issues
« on: September 14, 2018, 09:35:07 pm »
Hi All,

I have a new PCB I've put together with an STM32F030F4P6.

I've attached the Schematic drawing below for reference.

I've checked over the board extensively to confirm all is correct.


Normally, to program an STM32F030, like one of the blue pills, all I have to do is attach the 3v3, GND & SCLK / SIO pins.

For this board I've made, I have to also connect Reset pin, & attach BOOT0 to 3v3 to get a connection.

I suspect it's due to the config internally of the unit, however I have used STM32Cube to set up the ports as Debug Serial Wire, this hasn't made a difference.

How can I configure this to allow me to work easily to program the unit without having to mess around with bringing the BOOT pin high and low, (and preferably no Reset line needed)

Thanks!






 

Offline mbless

  • Regular Contributor
  • *
  • Posts: 227
  • Country: 00
Re: STM32F030F4P6 Programming issues
« Reply #1 on: September 15, 2018, 01:11:45 am »
You haven't said what you are using to program it.

I just use a ST-Link and wire up VDD, GND, SWCLK, SWDIO and RST. BOOT0 should be pulled down to ground like in your schematic; setting it high will invoke the bootloader (UART, etc.), which you don't want if you're programming via SWD.

You can program with SWD without RST connected to the programmer, but then you have to manually reset to connect.
 

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: STM32F030F4P6 Programming issues
« Reply #2 on: September 15, 2018, 08:15:52 am »
You haven't said what you are using to program it.

I just use a ST-Link and wire up VDD, GND, SWCLK, SWDIO and RST. BOOT0 should be pulled down to ground like in your schematic; setting it high will invoke the bootloader (UART, etc.), which you don't want if you're programming via SWD.

You can program with SWD without RST connected to the programmer, but then you have to manually reset to connect.

I've been unable to connect to the MCU the way you've described it (with or without the reset connection)

I've ONLY been able to connect to it when the MCU is restarted with BOOT0 high, never when it is low.

I'm using an ST-LINK V2 (that works fine on the other boards I've tried, including a protoboard blue pill with the same MCU on it)

I'm using Visual GDB too, with Open OCD.
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: STM32F030F4P6 Programming issues
« Reply #3 on: September 16, 2018, 11:29:30 pm »
Looks like you want a bootloader, seems like your [emoji381] might have one...

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline CM800Topic starter

  • Frequent Contributor
  • **
  • Posts: 882
  • Country: 00
Re: STM32F030F4P6 Programming issues
« Reply #4 on: September 17, 2018, 07:22:44 am »
I'd be surprised if the pill has a bootloader, it's just an STM32F030F4 breakout off ebay:

https://www.ebay.co.uk/itm/STM32F030F4P6-ARM-CORTEX-M0-Core-Minimum-System-Dev-Board-UK/292149128160?hash=item440571ebe0:g:pMcAAOSwarNZuJVJ

But as mentioned, On my custom board, I can't seem to connect without starting the unit in bootloader mode. Even then, it's kinda unreliable as you have to mess about putting it in and out of bootloader mode (sometimes I loose connection)

It's weird.

No issues with the Chinese designed board, yet I can't find any hardware faults in mine.
 

Offline newbrain

  • Super Contributor
  • ***
  • Posts: 1719
  • Country: se
Re: STM32F030F4P6 Programming issues
« Reply #5 on: September 17, 2018, 08:24:04 am »
I'd be surprised if the pill has a bootloader
Looks like you want a bootloader, seems like your [emoji381] might have one...

The STM32F0 series has (as all STM32F/L/Hx, AFAIK) a default bootloader.
The bootloader on F030x4/6 can only use only USART.

To use it, you just need an USB to (TTL, 3.3V) serial and this ST utility.

That said, it's very strange that you cannot connect to the  target, NRST is usually not needed.
Can you show the OpenOCD log from VisualGDB?
Nandemo wa shiranai wa yo, shitteru koto dake.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: STM32F030F4P6 Programming issues
« Reply #6 on: September 17, 2018, 09:04:38 am »
I cannot find NRST pull-up resistor.

Anyway if you copied very simple circuit as stm32f030 bluepill and it does not work - then look for difference of both. Bodge your board until it's circuit is IDENTICAL to original, in the way of making your board identical you will find what was wrong.

What I am saying - Microcontrollers does not have "bad mood" moments or so. They act very predictable way (if undamaged). It has to be your error somewhere.
 

Offline mbless

  • Regular Contributor
  • *
  • Posts: 227
  • Country: 00
Re: STM32F030F4P6 Programming issues
« Reply #7 on: September 17, 2018, 03:00:12 pm »
I cannot find NRST pull-up resistor.
There's a ~40k internal pullup
 
The following users thanked this post: CM800


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf