[SOLVED] STM32F030F4 Internal RC
Posted: Thu Feb 27, 2020 8:19 am
I'm really glad to see this forum back up and running. I'm just starting to play around with the STM32 micros- I've been using the 8bit Arduinos for a couple of years now and want to start using something a bit more powerful.
I've used a Robotdyn STM32F103C8 board for a couple of projects and haven't had any trouble that I couldn't get myself out of, but I'm experimenting with an STM32F030F4 that I'd like to use in a smaller project and I'm having some issues. Namely, although the firmware upload process appears to go ok the micro doesn't actually do anything.
For my setup I have an STM32F030F4 soldered onto a breakout board. This is in turn soldered onto a piece of breadboard which also has a USB-Serial adapter soldered onto it, as well as a 3.3V voltage regulator to power the STM32. The regulator is an uA78M33 and the USB-Serial adapter is this one. This USB-Serial adapter provides 5V to the regulator and has a 100nF capacitor on the line labelled 'RST' so that it can restart the micro at the start of code upload. the BOOT0 pin has a pullup to 3.3V and is broken out a 2pin header so that I can short it to ground when I want.
Here is the schematic: There are pullups to 5V on PA9, PA10, PA13 and PA14 because I'd like to use them to interface with a 5V DAC once I've gotten the micro working.
I don't have any resonators/crystals on hand so I'd like to use the internal RC as the system clock.
I believe that this setup is working since the upload process appears to complete without a hitch. Here is the console output once the upload is complete:
Since I don't have an external clock source I'm using the 'STM32F030F4 Demo board (internal RC oscillator)' option in Tools>Board Part Number.
Using this simple blink code:
gives no output on pin PA4 and I'm not sure why. Is there an issue with trying to use the micro while it doesn't have an external clock source? I have some resonators on the way.
VDD and VDDA are both at a steady 3.3V and are each individually decoupled.
My understanding was the STM32s will look for an external clock source, and if there isn't one they'll default to using the internal RC.
If anyone could offer some advice I'd appreciate.
I've used a Robotdyn STM32F103C8 board for a couple of projects and haven't had any trouble that I couldn't get myself out of, but I'm experimenting with an STM32F030F4 that I'd like to use in a smaller project and I'm having some issues. Namely, although the firmware upload process appears to go ok the micro doesn't actually do anything.
For my setup I have an STM32F030F4 soldered onto a breakout board. This is in turn soldered onto a piece of breadboard which also has a USB-Serial adapter soldered onto it, as well as a 3.3V voltage regulator to power the STM32. The regulator is an uA78M33 and the USB-Serial adapter is this one. This USB-Serial adapter provides 5V to the regulator and has a 100nF capacitor on the line labelled 'RST' so that it can restart the micro at the start of code upload. the BOOT0 pin has a pullup to 3.3V and is broken out a 2pin header so that I can short it to ground when I want.
Here is the schematic: There are pullups to 5V on PA9, PA10, PA13 and PA14 because I'd like to use them to interface with a 5V DAC once I've gotten the micro working.
I don't have any resonators/crystals on hand so I'd like to use the internal RC as the system clock.
I believe that this setup is working since the upload process appears to complete without a hitch. Here is the console output once the upload is complete:
Code: Select all
Sketch uses 10796 bytes (65%) of program storage space. Maximum is 16384 bytes.
Global variables use 896 bytes (21%) of dynamic memory, leaving 3200 bytes for local variables. Maximum is 4096 bytes.
-------------------------------------------------------------------
STM32CubeProgrammer v2.1.0
-------------------------------------------------------------------
Serial Port COM6 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8,
stop-bit = 1.0, flow-control = off
Activating device: OK
Chip ID: 0x444
BootLoader protocol version: 3.1
Device name : STM32F03x
Device type : MCU
Device CPU : Cortex-M0
Memory Programming ...
Opening and parsing file: Blink.ino.bin
File : Blink.ino.bin
Size : 11012 Bytes
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 10]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:01.911
RUNNING Program ...
Address: : 0x8000000
Start operation achieved successfully
Using this simple blink code:
Code: Select all
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(PA4, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(PA4, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(PA4, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
VDD and VDDA are both at a steady 3.3V and are each individually decoupled.
My understanding was the STM32s will look for an external clock source, and if there isn't one they'll default to using the internal RC.
If anyone could offer some advice I'd appreciate.