

It has an Ultra-low leakage per I/O: 50 nA along with a fast wakeup from Halt: 5 µs. Its low power features include 5 low-power modes: Wait, Low-power run (5.1 ♚), Low-power wait (3 ♚), Activehalt with RTC (1.3 ♚), Halt (350 nA). Its specifications are : 8-bit ultra-low-power MCU, 8-Kbyte Flash memory, 256-byte data EEPROM, RTC, timers, USART, I2C, SPI, ADC and DMA. If you are new to STVD development environment for STM8 then I recommend this article to complete your setup :įor this tutorial, I have chosen STM8L051F3 microcontroller. I previously explored the topic of sleep modes to conserve power in STM32/MSP430/NRF52 etc. STM8L is a low power MCU from st micro electronics which supports Interrupts for waking up from deep sleep. Unfortunately, all the examples I can find are on linux.If you are accustomed to programming Interrupt service routines then you should be knowing about the Interrupt Vector table.

Although not sure if that program is designed to work with the V3SET in the first place. I found an application installed with STVD that's supposed to "upgrade" (update?) my LINK with the latest firmware - it said the data on my link is corrupted. Tried both STVD-lite-programmer and STVP - both complained about not being able to communicate with the application (pretty sure this means the chip) via SWIM. Once I got something that builds fine, I tried to flash it into the chip. Also code is full of typos, which is nearly fatal for someone who isn't an embedded-c developer like me. It's amazing how low level it gets sometimes and then just totally skips over stuff. I followed the 'embedded-lab' guide which looks a little better than it actually is. Spent 9 hours yesterday (20:00 - 05:00am!) trying to get started. Here are some test and example programs, ready to compile with the libaries and write to flash: Here is a PWM controller project for a motor: Here is a water tank level sensor using ultrasonic rangefinder: Feel free to browse the code, and use whatever you like. It also has a support library for the STM8S003 W1209 thermostat, which has three buttons, a 3-digit display, a temperature probe, and a relay. The libraries have support for many input and output devices, such as keypads, LCD, and LED modules, binary/decimal conversion, PWM/servo control, ultrasonic rangefinding, UART. Most of it is for STM8S103 or STM8S105, but the STM8S003 is so close, they will work fine. I have a nice ecosystem of STM8 libraries, sample/example programs, and projects on github. I use the free SDCC (small device C compiler) and ST-LINK V2 and stm8flash to program the chips.
