STM8 Core

Arduino on the STM8 (8 bit processor)
dannyf
Posts: 147
Joined: Wed May 11, 2016 4:29 pm

Re: STM8 Core

Post by dannyf » Fri Jul 07, 2017 12:43 am

ST is said to introduce STM8S001 soon, a 8pin device. Maybe a good replacement for 12F675.

MarkB
Posts: 6
Joined: Sun Oct 02, 2016 11:40 pm

Re: STM8 Core

Post by MarkB » Mon Jul 17, 2017 5:47 pm

I've been playing with STM8 a bit over the past year and thought I might add a few observations.

1) I wouldn't call STM8 "obsolete" as it's one of the newest 8-bit microcontroller families on the market. It also seems to be very widely used.

2) Peripheral set is very similar to the STM32 line. This is helpful for those who might want to move back and forth between the 32 and 8 bit world.

3) The core runs at 1.8 V. This gives relatively low power at full speed, that is, the guaranteed clock speed does not roll off with voltage as does AVR. The MCU will tolerate a wide range of input voltage (2.95 - 5.5 V for STM8S) which is nice for running off unregulated battery. STM8L runs at lower voltage (1.65 - 3.6V). The I/O pin voltage are relative to Vdd.

4) Software/community support isn't anywhere near comparable to Arduino / AVR or for that matter PIC or MSP and so forth. I started with one of the commercial (but free for personal use with size restrictions that aren't relevant for the value-line STM8 products) compilers from IAR and have used the STM/COSMIC compiler as well. Both are full featured commercial grade products with a steep learning curve, but include (via STLINK) in circuit debugging tools, simulators, and such.

5) SDCC the open source compiler supports STM8 but documentation is pretty thin and it's hard to find example code. There is no open source support for debugging tools, but there are recent rumors of a project to do so.

6) I've lately been playing with an eForth port https://github.com/TG9541/stm8ef/wiki that supports compile to flash, interrupts, a periodic background task, "software serial", and "board support packages" for a number of cheap Chinese STM8 boards. As "hacker projects" go the code and documentation are quite good.

7) I haven't used it, but there exists an Arduino-like library for STM8/SDCC that is supposed to allow programming using Arduino paradigms. https://github.com/tenbaht/sduino/blob/ ... s/index.md Edit 2 (better link for Sduino): https://tenbaht.github.io/sduino/

Edit for addition observations per previous post:
a) There's no such thing as 8-bit ARM regardless of what eBay vendors say.

b) There are STM8 variants that have DMA, but the low-end STM8S103F3 or STM8S003F3 boards common on eBay don't have DMA.

c) Minimal circuit configuration for STM8S is MCU and 3 capacitors (Vdd bypass, Reset, and Vcap (1.8V core voltage)) using internal oscillator.
Last edited by MarkB on Tue Jul 18, 2017 2:36 pm, edited 1 time in total.

User avatar
zoomx
Posts: 523
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: STM8 Core

Post by zoomx » Tue Jul 18, 2017 6:46 am

@MarkB
thanks for your review!

dannyf
Posts: 147
Joined: Wed May 11, 2016 4:29 pm

Re: STM8 Core

Post by dannyf » Thu Jul 20, 2017 10:10 am

used the STM/COSMIC compiler as well.
STVD is a dog, ugly as hell.

there is an unlimited cosmic available on github. the morality of using it may be questionable to some, however.

I use IAR. it is simple, intuitive and very utilitarian as well. the beauty of it is that you can use the same IDE across most MCUs that I touch. couldn't have been happier with it.

User avatar
RogerClark
Posts: 7150
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM8 Core

Post by RogerClark » Fri Jul 21, 2017 10:33 pm

Can you post the link to the compiler on GitHub

I looked on STMs website about the compiler for STM8 and it seemed to be a free download, of what I presume is the compiler from Cosmic.

I looked on Cosmic's site and the STM8 compiler was available for free download, however there was some wierd legal stuff about it being only a 1 year license, albeit which they said was renewable.

I dont know if the compiler checks the date and time or whether the license duration is just from a legal standpoint.

BTW. Cosmic seem to have a compiler for the STM32 as well, but as STM official use gcc e.g. That's what the CubeMX is compatible with, I don't know who would use the Cosmic compiler for STM32

User avatar
LightningStalker
Posts: 21
Joined: Fri Nov 03, 2017 5:00 am
Location: GRMI
Contact:

Re: STM8 Core

Post by LightningStalker » Sat Nov 04, 2017 3:39 pm

I made a little breadboard pill board, more of a breakout board really, for my project with the STM8L152C6T. Feel free to do what you want with it. The traces are kind of ugly, mostly autorouter, but I was in a hurry. Also there is no regulator onboard. It was mostly copied from the STM8L discovery.
https://easyeda.com/LightningStalker/ST ... d69f4df7ea

User avatar
RogerClark
Posts: 7150
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM8 Core

Post by RogerClark » Sat Nov 04, 2017 8:23 pm

LightningStalker wrote:
Sat Nov 04, 2017 3:39 pm
I made a little breadboard pill board, more of a breakout board really, for my project with the STM8L152C6T. Feel free to do what you want with it. The traces are kind of ugly, mostly autorouter, but I was in a hurry. Also there is no regulator onboard. It was mostly copied from the STM8L discovery.
https://easyeda.com/LightningStalker/ST ... d69f4df7ea
Thanks for posting...

I few forum members have some $1.50 STM8 boards, bought from eBay (from China), but I don't think anyone , me included is actively using them for a project.

User avatar
LightningStalker
Posts: 21
Joined: Fri Nov 03, 2017 5:00 am
Location: GRMI
Contact:

Re: STM8 Core

Post by LightningStalker » Sun Nov 05, 2017 2:51 pm

I was attracted to it because of the price, pincount, LSO support, and the built-in LCD driver. I don't like the instruction timing, but hopefully that is inconsequential with the use of timers.

evildave_666
Posts: 32
Joined: Mon Apr 27, 2015 11:20 pm

Re: STM8 Core

Post by evildave_666 » Mon Nov 06, 2017 1:58 am

RogerClark wrote:
Sat Nov 04, 2017 8:23 pm
LightningStalker wrote:
Sat Nov 04, 2017 3:39 pm
I made a little breadboard pill board, more of a breakout board really, for my project with the STM8L152C6T. Feel free to do what you want with it. The traces are kind of ugly, mostly autorouter, but I was in a hurry. Also there is no regulator onboard. It was mostly copied from the STM8L discovery.
https://easyeda.com/LightningStalker/ST ... d69f4df7ea
Thanks for posting...

I few forum members have some $1.50 STM8 boards, bought from eBay (from China), but I don't think anyone , me included is actively using them for a project.
I've been using the dollar STM8S103 boards for running servos & PWMing LEDs on a model kit. All the work has been done with bare-metal direct register twiddling with SDCC though. I might try and rewrite it at some point using the Sduino libraries.

dannyf
Posts: 147
Joined: Wed May 11, 2016 4:29 pm

Re: STM8 Core

Post by dannyf » Sun Nov 12, 2017 2:32 pm

the dollar STM8S103 boards
I have loads of ghetto STM8S003Fs on pcb adapters, working just fine. They came to me at like 30c/chip. likely the least expensive brand-name MCUs.

Post Reply