I was wondering does this Cortex-M0 STM32F051C8T6 STM32 ARM board can replace the Blue Pill?
I have seen this board on a page while learning STM32 boards and I have read that it is also called F0 Blue Pill.
Is that correct?
And before I will try to get hold of it – Do you happen to know if it is supported by Arduino IDE?
The board I am thinking of is:
http://www.chinalctech.com/index.php?_m … &p_id=1170

Would be happy if it can be used – I have found it in sale right now and I was wondering ..
Thanks,
Arye
[MoDu – Thu Oct 04, 2018 10:48 am] –
My question is why? You have a good support for one board, which costs around the same. Why would go with an inferior board with less support?
+1
[aryeduino – Thu Oct 04, 2018 8:30 am] –
…
I was wondering does this Cortex-M0 STM32F051C8T6 STM32 ARM board can replace the Blue Pill?
…
Arye,
Start around 3:50 in the short presentation:
but if one do not need the usb after all, i’d think it is a pretty usable and possibly cheaper mcu
interestingly they are priced close to the stm8s boards pretty much in the $1 range of boards
https://www.aliexpress.com/w/wholesale- … 0f4p6.html
about the same price as stm8s boards
but the stm32f030f4 has a mere 4k of sram and a mere 16k flash
either way STM8S103F3 has even less mere 1 ksram and 8 k flash
https://www.st.com/en/microcontrollers/stm8s103f3.html
but that’s 8 bits mcu
![]()
[ag123 – Thu Oct 04, 2018 1:16 pm] –
…
but the stm32f030f4 has a mere 4k of sram and a mere 16k flash
Many of us are here paying homage to STM silicon because 1) the low-cost uC line of chips are very inexpensive and 2) the AVR 8-bitters were too cramped in SRAM and/or flash for our software needs. Going backward seems somewhat anticlimactic. .. unless that bit of purified sand provides some capability or feature that warrants the effort. There are always a few in the group that just do things because they can; but, they support themselves.
As the M0 thumb instructions are a sub-set of M3, my guess is that some minor changes would need to be made to inform the compiler via a switch to change the compile binary… of course, such backwardness applies to the libraries, too. Things should work unless some M3-centric code is required.
Ray
i’d say usb is after all a big feature of the stm32f103
[nikosx – Thu Oct 04, 2018 2:05 pm] –
The F0xx variety is indeed not as featured as F103 etc but very competitive in price, even compared to 8 bit MCUs.
Where are you seeing “very competitive in price”? In qty 1 from a real distributor they aren’t that cheap:
https://octopart.com/search?q=stm32f051 … rt-dir=asc
Seems to be about $2 for just the chip. How is that competitive to a $1.85 complete bluepill module?
The problem with these chips, when used with Arduino, is its small amount of ram. All the Arduino cores I’ve seen will chew up that 8k and more. The CPU on these chips is limited to 48MHz. The only redeeming features I can see is that they come with a DAC, Comparator, I2S, HDMI CIE, and by virtue of being a new design it gets the newer style of selecting alternate IO. The down side is its cortex-m0 arm6v-m, that architecture only has a small subset of what you get on a cortex-m3. You go from a Harvard architecture to a Von Neumann. Von neumann means your data bus access and instruction bus access will happen serially, instead of being concurrent like on the m3. In addition, all those nice m3 hardware instructions that make software floating point reasonable are gone. Finally, you lose USB and the 72MHz clock on the bluepill.
In the past I’ve purchased its little brother, the stm32f051k8. 6 years ago I found it to be a cheap replacement for 8 bit chips. It comes in a 0.8mm pitch 32pin QFP package making it a natural replacement for those atmega32u chips. You can use it with the cheap 32 pin qfp breakout boards you find on ebay/aliexpress. However, once the $4 bluepill appeared (now less than $2) I stopped messing with it. Why bother?
I talked about mass production & not for the F103 but for F030…
I haved used a PICF690 with price for 100 1.4 $ / https://www.digikey.com/product-detail/ … -ND/894269, 8 bit, 4K (ok 4K words, about 8 Kbytes)
this is for a mass produced product….(can’t use BP for this… I use just the PIC / ARM chip…in a custom made board…)
Now, if i port it for an F030 price woulde be about 1$ or less (https://www.digikey.com/product-detail/ … ND/4494296)
and STM32F030K6T6 has 32K…..
Yes F051 is another alternative, i found F091 & F030 better price/performance & supported from ST Nucleo & ST Core… Again, i’m not comparing them to F103 or F2xx, F3xx, F4xx but as 8 bit replacement…
[nikosx – Thu Oct 04, 2018 7:20 pm] –
Also, i’m considering F091 as a possible replacement for TI ARMs Tivac TM4c123…
nikosx & aryeduino:
I think you have heard that many of us have doubts of how well these lower-resource (SRAM) will work with the STM32DUINO core known as Roger’s core (reincarnation of the Leaflabs Maple Project.) Because of many technical issues, the minimum resource “buy-in” to the 32-bit world often times catch the uninitiated off-guard: https://www.stm32duino.com/viewtopic.php?t=2070
That being said, I am always interesting to hear from those off on their own path – provided that they are self-sufficient and can work through the issues without general forum assistance. This does not mean that you can not inquire if others wish to join your merry band of experimenters; when ready with a hardware recommendation, ask away and a few members may follow along.
ABOVE SAID: please do not expect ad hoc forum support. But feel free from time to time on doing a “project update” for the general members to read.
Ray
AVR is using avr-gcc and ARM is using arm-none-eabi-gcc. I didn’t test it, but I suspect the ARM GCC is build to deal with more than 4KB RAM.
Nobody at leaflabs considered playing with 4 or 8KB, so just compile a plain sketch:
Arduino AVR Core (Uno):
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.[Rick Kimball – Thu Oct 04, 2018 7:30 pm] –
Is your goal to use them with arduino though?
I think it depends on the project & it’s requirements….
I have a TM4c123 Tivac project with GPRS and it’s in TI Energia (their Arduino equivalent). It works OK and seem to have less RAM footprint than STM32 equivalent project… The thing is to try to make it on STM32 (091 is oK) to reduce cost, since TivaC does not have ST ARM variety and it’s price is about 2x of the F091…
For the PIC part i have a production project since i’ve worked a lot with PIcs (16F & 18F), but Arduino environment is much more rich for certain things & an F030 will do (with much more Flash for code & H/W features…)…
The RAM footprint is an issue, as stated in another thread here… 8K is small but maybe will be enough… I’m using STM32 core that supports F030 & F090 in nucleo boards… I’ve started with an L476 with Arduino STM32.
For now i’m trying to port the Tivac project in F091. Certain things needed for this, eg Timer interrupts for time delays, pwm for Sine wave generation of certain tones and GPRS / data communication. All of these need to be solved to be able to port the program. Memory also is an issue for an 8K part (RAM). I got the tones part with DAC use and i think timer with int is ok now (after some code samples from STM32 core thread…)….
For simple projects i’m also considering KEIL MDK which has a much smaller footprint but of course lacks Arduino’s features… (For F030).. But need more low level work than Arduino env….
[madias – Thu Oct 04, 2018 9:11 pm] –
I also have doubts caused by the limited RAM:
AVR is using avr-gcc and ARM is using arm-none-eabi-gcc. I didn’t test it, but I suspect the ARM GCC is build to deal with more than 4KB RAM.
Nobody at leaflabs considered playing with 4 or 8KB, so just compile a plain sketch:
I don’t think the RAM issue is a compiler one but rather a framework one… (arduino framework & it’s ARM implementation)…
I’ve done some KEIL MDK experiments these days and both Flash & RAM footprints are minimal… Eg a basic Blink with Serial Msgs debug on an F30 is <2K code and maybe 20 bytes Ram (flash could go down to 1.5K with microlib). Equivelant STM32 core would be at least 8K flash.
https://www.aliexpress.com/w/wholesale- … tId=400103
the boards are literally going for as low as usd 85c shipped, consider if most of it is shipping cost in low volume (i.e. 1 piece), the soc itself probably cost much less.
the lowest stm32f030f4p6 for about usd 1.20 shipped
https://www.aliexpress.com/w/wholesale- … tId=400103
that gives an indication of the relative price difference on a per piece basis
i’d think in part as stm32f030 is an arm core, there is additional licensing fees and in addition it is 32 bits and has more hardware in terms of sram and flash. so those things adds up to the floor on costs.
my interest with stm8s and stm32f030 is mainly as ‘co-processors’ for bp/mm. if you consider bp/mm, connecting an lcd display easily use about 10 pins if you add a sd card interface that use another 4 pins for spi2 add some adc and some gpio controls that use another few pins, then 2 pins are used for usb (and more if you do some fancy usb reset circuitry), another 2 pins for the rtc crystal, after that you want to add a 4×4 keypad, that is 8 pins, the bp/mm would literally run out of pins or if one is lucky just about use up all available pins (on a side note, one of the ‘fewest’ pin solution for a keypad controller is the PCF8574 io extender which connects i2c to 8 io pins
http://www.ti.com/product/PCF8574
but they do not come cheap at least on aliexpress/ebay, priced almost the same as the mcus)
if i use an stm8s or stm32f030 as a ‘co-processor’ i can have the stm8s or stm32f030 take care of the keypad and interface back to stm32f103 bp/mm using just 2 pins i2c. And a trouble is, the stm8s has its own learning curve, and in the end i never quite get down to make my stm8s work as a ‘keypad controller’. stm32f030 would in that sense reduce the learning curve. but i’d think if c/c++ is used i’d need to trim the codes down to the absolute minimum. i’d think the current stm32 * duino cores is somewhat ‘fat’ in part perhaps as some dependencies are compiled and linked in the codes when it is pretty much unused or that they are infrequently used. but it is quite overwhelmingly underutilised to have a 32 bits processor handle 8 pins for a keypad
the nice thing about stm32f030 would in this case mean that you’d only need that same arm toolchain vs say with stm8s you would need 2 sets of tool chain.
the answer depends on how much effort YOU want to put into supporting it.
if you are thinking about putting blue pill binaries on that thing, the answer is no.
if you are thinking about running blue pill source code on that thing, the answer is maybe.
if you are thinking about rolling your own and you are capable of doing that, the answer is yes.
platform.txt wrote:build.mcu=cortex-m3
… to …
build.mcu=cortex-m0
if so, either the F091 (or even a full blow M3/M4F) is no match for the TM4 part in term of peripherals – the TI part is the most feature rich you will see, without going to the weird parts, or the TI part is a waste for your application. I’m a huge fan of those chips – their ADC is wacky, however.
the STM8S / F030 parts can be too limiting if you are running the arduino code. They are more than enough to function as a keypad reader, however, especially if you code your own. The keypad controllers are well defined and generally not too hardware specific.
with that said, it is much easier to simply integrade your keypad reader onto a F103, especially if the space constraint isn’t there.
[dannyf – Fri Oct 05, 2018 5:20 pm] –
Also, i’m considering F091 as a possible replacement for TI ARMs Tivac TM4c123…if so, either the F091 (or even a full blow M3/M4F) is no match for the TM4 part in term of peripherals – the TI part is the most feature rich you will see, without going to the weird parts, or the TI part is a waste for your application. I’m a huge fan of those chips – their ADC is wacky, however.
the STM8S / F030 parts can be too limiting if you are running the arduino code. They are more than enough to function as a keypad reader, however, especially if you code your own. The keypad controllers are well defined and generally not too hardware specific.
with that said, it is much easier to simply integrade your keypad reader onto a F103, especially if the space constraint isn’t there.
For the application the only capability the ST does not have is EEPROM (i use Flash instead). I used the TI part because an existing (bigger) project with TM4C1294, so for code reuse…. I DONT consider an STM08 part… or an F030…. yes they cant hold the Arduino code… you have to program bare metal…
