STM8S003F3 STM8S003K3 Value line, 16-MHz STM8S 8-bit MCU, 8-Kbyte Flash memory, 128-byte data EEPROM, 10-bit ADC, 3 timers, UART, SPI, IC Datasheet - production data Features Core 16 MHz advanced STM8 core with Harvard LQFP32 TSSOP20 UFQFPN20 architecture and 3-stage pipeline 7x7 mm 6.5x6.4 mm 3x3 mm Extended instruction set Timers Memories Advanced control timer: 16-bit, 4 CAPCOM Program memory: 8 Kbyte Flash memory data channels, 3 complementary outputs, dead-time retention 20 years at 55 C after 100 cycles insertion and flexible synchronization RAM: 1 Kbyte 16-bit general purpose timer, with 3 CAPCOM Data memory: 128 bytes true data EEPROM channels (IC, OC or PWM) endurance up to 100 k write/erase cycles 8-bit basic timer with 8-bit prescaler Auto wakeup timer Clock, reset and supply management Window and independent watchdog timers 2.95 V to 5.5 V operating voltage Flexible clock control, 4 master clock sources Communications interfaces Low-power crystal resonator oscillator UART with clock output for synchronous External clock input operation, SmartCard, IrDA, LIN master mode Internal, user-trimmable 16 MHz RC SPI interface up to 8 Mbit/s Internal low-power 128 kHz RC 2 I C interface up to 400 Kbit/s Clock security system with clock monitor Analog to digital converter (ADC) Power management Low-power modes (wait, active-halt, halt) 10-bit ADC, 1 LSB ADC with up to 5 Switch-off peripheral clocks individually multiplexed channels, scan mode and analog Permanently active, low-consumption watchdog power-on and power-down reset I/Os Interrupt management Up to 28 I/Os on a 32-pin package including 21 Nested interrupt controller with 32 interrupts high-sink outputs Up to 27 external interrupts on 6 vectors Highly robust I/O design, immune against current injection Development support Embedded single-wire interface module (SWIM) for fast on-chip programming and non- intrusive debugging August 2018 DS7147 Rev 10 1/103 This is information on a product in full production. www.st.comContents STM8S003F3 STM8S003K3 Contents 1 Introduction 9 2 Description 10 3 Block diagram . 11 4 Product overview 12 4.1 Central processing unit STM8 . 12 4.2 Single wire interface module (SWIM) and debug module (DM) 13 4.3 Interrupt controller 13 4.4 Flash program memory and data EEPROM . 13 4.5 Clock controller . 15 4.6 Power management . 16 4.7 Watchdog timers . 16 4.8 Auto wakeup counter 17 4.9 Beeper . 17 4.10 TIM1 - 16-bit advanced control timer 17 4.11 TIM2 - 16-bit general purpose timer . 17 4.12 TIM4 - 8-bit basic timer . 18 4.13 Analog-to-digital converter (ADC1) . 18 4.14 Communication interfaces 18 4.14.1 UART1 19 4.14.2 SPI . 19 2 4.14.3 I C . 20 5 Pinouts and pin descriptions . 21 5.1 STM8S003K3 LQFP32 pinout and pin description 22 5.2 STM8S003F3 TSSOP20/UFQFPN20 pinout and pin description 25 5.3 Alternate function remapping 29 6 Memory and register map 30 6.1 Memory map 30 6.2 Register map 31 2/103 DS7147 Rev 10