STM8S005K6T6C ,Mainstream Value line 8-bit MCU with 32 Kbytes Flash, 16 MHz CPU, integrated EEPROMSTM8S005K6STM8S005C6Valueline,16MHzSTM8S8-bitMCU,32KbytesFlash,dataEEPROM,10-bitADC,timers,UART,SPI ..
STM8S103F2P6 ,Mainstream Access line 8-bit MCU with 4 Kbytes Flash, 16 MHz CPU, integrated EEPROMSTM8S103K3STM8S103F3STM8S103F2Accessline,16MHzSTM8S8-bitMCU,upto8KbytesFlash,dataEEPROM,10-bitADC,3 ..
STM8S103F3P6 ,Mainstream Access line 8-bit MCU with 4 Kbytes Flash, 16 MHz CPU, integrated EEPROMFeaturesAutowake-uptimer•WindowwatchdogandindependentwatchdogCore•timers16MHzadvancedSTM8corewithHa ..
STM8S103F3P6TR ,Mainstream Access line 8-bit MCU with 4 Kbytes Flash, 16 MHz CPU, integrated EEPROMfeatures...9Table2.PeripheralclockgatingbitassignmentsinCLK_PCKENR1/2registers.......14Table3.TIMti ..
STM8S103K3T3C ,Mainstream Access line 8-bit MCU with 8 Kbytes Flash, 16 MHz CPU, integrated EEPROMFeaturesAutowake-uptimer•WindowwatchdogandindependentwatchdogCore•timers16MHzadvancedSTM8corewithHa ..
STM8S103K3T6C ,Mainstream Access line 8-bit MCU with 8 Kbytes Flash, 16 MHz CPU, integrated EEPROMSTM8S103K3STM8S103F3STM8S103F2Accessline,16MHzSTM8S8-bitMCU,upto8KbytesFlash,dataEEPROM,10-bitADC,3 ..
SY88289CLMG , 3.3V, 3.2Gbps CML Limiting Post Amplifier with High-Gain TTL Loss-of-Signal
SY88313BLMG , 3.3V, 3.2Gbps CML Low-Power Limiting Post Amplifier with TTL Loss-of-Signal
SY88313BLMG , 3.3V, 3.2Gbps CML Low-Power Limiting Post Amplifier with TTL Loss-of-Signal
SY88315BLMG , 3.3V, 3.2Gbps CML Low-Power Limiting Post Amplifier w/TTL Signal Detect
SY88315BLMG , 3.3V, 3.2Gbps CML Low-Power Limiting Post Amplifier w/TTL Signal Detect
SY88343BLEY , 3.3V, 3.2Gbps CML Limiting Post Amplifier with High Gain TTL Loss-of-Signal
STM8S005C6T6-STM8S005K6T6C
Mainstream Value line 8-bit MCU with 32 Kbytes Flash, 16 MHz CPU, integrated EEPROM
STM8S005K6 STM8S005C6 alue line, 16 MHz STM8S 8-bit MCU, 32 Kbytes Flash, data
EEPROM,10-bit ADC, timers, UART, SPI, I²C
Features
Core• 16 MHz advanced STM8 core with Harvard
architecture and 3-stage pipeline• Extended instruction set
Memories• Medium-density Flash/EEPROM:- Program memory:32 Kbytesof Flash
memory; data retention20 yearsat 55°C
after 100 cycles- Data memory: 128 bytesof true data
EEPROM; enduranceupto 100k write/erase
cycles RAM:2 Kbytes
Clock, reset and supply management• 2.95Vto 5.5V operating voltage• Flexible clock control,4 master clock sources:- Low power crystal resonator oscillator- External clock input- Internal, user-trimmable16 MHz RC- Internal low power 128 kHz RC Clock security system with clock monitor• Power management:- Low power modes (wait, active-halt, halt)- Switch-off peripheral clocks individually Permanently active, low consumption power-on
and power-down reset
Interrupt management• Nested interrupt controller with32 interrupts• Upto37 external interruptson6 vectors
Timers• 2x 16-bit general purpose timers, with 2+3
CAPCOM channels (IC, OCor PWM)• Advanced control timer: 16-bit,4 CAPCOM
channels,3 complementary outputs, dead-time
insertion and flexible synchronization• 8-bit basic timer with 8-bit prescaler• Auto wake-up timer• Window and independent watchdog timers
Communications interfaces• UART with clock outputfor synchronous
operation, Smartcard, IrDA, LIN• SPI interfaceupto8 Mbit/s•I2C interfaceupto 400 Kbit/s
Analog-to-digital converter (ADC)• 10-bit,±1 LSB ADC withupto10 multiplexed
channels, scan mode and analog watchdog
I/Os• Upto38 I/Osona 48-pin package including16
high sink outputs• 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
Contents Introduction ..............................................................................................................7 Description ...............................................................................................................8 Block diagram ..........................................................................................................9 Product overview ...................................................................................................104.1 Central processing unit STM8 .....................................................................................10
4.2 Single wire interface module (SWIM) and debug module (DM) ..................................10
4.3 Interrupt controller .......................................................................................................11
4.4 Flash program and data EEPROM memory ................................................................11
4.5 Clock controller ............................................................................................................12
4.6 Power management ....................................................................................................13
4.7 Watchdog timers ..........................................................................................................14
4.8 Auto wakeup counter ...................................................................................................14
4.9 Beeper ........................................................................................................................14
4.10 TIM1- 16-bit advanced control timer .........................................................................15
4.11 TIM2, TIM3- 16-bit general purpose timers ..............................................................15
4.12 TIM4- 8-bit basic timer ..............................................................................................15
4.13 Analog-to-digital converter (ADC1) ............................................................................16
4.14 Communication interfaces .........................................................................................16
4.14.1 UART2 ...............................................................................................16
4.14.2 SPI .....................................................................................................17
4.14.3 I²C ......................................................................................................18
Pinout and pin description ...................................................................................195.1 STM8S005 pinouts and pin description .......................................................................20
5.1.1 Alternate function remapping ...............................................................24
Memory and register map .....................................................................................256.1 Memory map ................................................................................................................25
6.2 Register map ...............................................................................................................26
6.2.1 I/O port hardware register map ............................................................26
6.2.2 General hardware register map ...........................................................29
6.2.3 CPU/SWIM/debug module/interrupt controller registers ......................39
Interrupt vector mapping ......................................................................................42 Option bytes ...........................................................................................................44 Electrical characteristics ......................................................................................499.1 Parameter conditions ...................................................................................................49
9.1.1 Minimum and maximum values ...........................................................49
9.1.2 Typical values .......................................................................................49
9.1.3 Typical curves ......................................................................................49
DocID022186 Rev32/103
STM8S005K6 STM8S005C6Contents
9.1.4 Typical current consumption ................................................................49
9.1.5 Loading capacitor .................................................................................50
9.1.6 Pin input voltage ...................................................................................50
9.2 Absolute maximum ratings ..........................................................................................50
9.3 Operating conditions ...................................................................................................52
9.3.1 VCAP external capacitor ......................................................................54
9.3.2 Supply current characteristics ..............................................................55
9.3.3 External clock sources and timing characteristics ...............................66
9.3.4 Internal clock sources and timing characteristics .................................68
9.3.5 Memory characteristics ........................................................................70
9.3.6 I/O port pin characteristics ...................................................................72
9.3.7 Typical output level curves ...................................................................75
9.3.8 Reset pin characteristics ......................................................................79
9.3.9 SPI serial peripheral interface ..............................................................81
9.3.10I2C interface characteristics ...............................................................84
9.3.11 10-bit ADC characteristics ..................................................................86
9.3.12 EMC characteristics ...........................................................................89
Package information ...........................................................................................9310.1 48-pin LQFP package mechanical data ....................................................................93
10.2 32-pin LQFP package mechanical data ....................................................................95
Thermal characteristics .......................................................................................9711.1 Reference document .................................................................................................97
11.2 Selecting the product temperature range ..................................................................97
Ordering information ...........................................................................................99 STM8 development tools ..................................................................................10013.1 Emulation and in-circuit debugging tools .................................................................100
13.2 Software tools ..........................................................................................................100
13.2.1 STM8 toolset ....................................................................................101
13.2.2C and assembly toolchains ..............................................................101
13.3 Programming tools ..................................................................................................101
Revision history .................................................................................................1023/103DocID022186 Rev3
ContentsSTM8S005K6 STM8S005C6
List of tablesTable1. STM8S005xx value line features ................................................................................................8
Table2. Peripheral clock gatingbit assignmentsin CLK_PCKENR1/2 registers ..................................13
Table3. TIM timer features ...................................................................................................................15
Table4. Legend/abbreviations for pinout tables ...................................................................................19
Table5. Pin description for STM8S005 microcontrollers .......................................................................21
Table6. Flash, Data EEPROM and RAM boundary addresses ............................................................26
Table7. I/O port hardware register map ................................................................................................26
Table8. General hardware register map ................................................................................................29
Table9. CPU/SWIM/debug module/interrupt controller registers ..........................................................39
Table 10. Interrupt mapping ...................................................................................................................42
Table 11. Option bytes ...........................................................................................................................44
Table 12. Option byte description ...........................................................................................................45
Table 13. Descriptionof alternate function remapping bits [7:0]of OPT2 ..............................................47
Table 14. Voltage characteristics ...........................................................................................................50
Table 15. Current characteristics ...........................................................................................................51
Table 16. Thermal characteristics ..........................................................................................................52
Table 17. General operating conditions .................................................................................................53
Table 18. Operating conditionsat power-up/power-down ......................................................................54
Table 19. Total current consumption with code executionin run modeatVDD=5V .............................55
Table 20. Total current consumption with code executionin run modeatVDD= 3.3V ..........................66
Table 21.T otal current consumptionin wait modeatVDD=5V ............................................................58
Table 22.T otal current consumptionin wait modeatVDD= 3.3V .........................................................58
Table 23.T otal current consumptionin active halt modeatVDD=5V ..................................................59
Table 24.T otal current consumptionin active halt modeatVDD= 3.3V ...............................................60
Table 25. Total current consumptionin halt modeatVDD=5V .............................................................61
Table 26. Total current consumptionin halt modeatVDD= 3.3V ..........................................................61
Table 27. Wakeup times .........................................................................................................................61
Table 28. Total current consumption and timingin forced reset state ....................................................92
Table 29. Peripheral current consumption .............................................................................................63
Table 30. HSE user external clock characteristics .................................................................................66
Table 31. HSE oscillator characteristics .................................................................................................67
Table 32. HSI oscillator characteristics ..................................................................................................68
Table 33. LSI oscillator characteristics ...................................................................................................70
Table 34. RAM and hardware registers ..................................................................................................70
Table 35. Flash program memory/data EEPROM memory ....................................................................71
Table 36. I/O static characteristics .........................................................................................................72
Table 37. Output driving current (standard ports) ..................................................................................74
Table 38. Output driving current (true open drain ports) ........................................................................74
Table 39. Output driving current (high sink ports) ..................................................................................74
Table 40. NRST pin characteristics ........................................................................................................79
Table 41. SPI characteristics ..................................................................................................................81
Table 42.I2C characteristics ..................................................................................................................84
Table 43. ADC characteristics ................................................................................................................86
Table 44. ADC accuracy withRAIN<10 kΩ,V DDA=5V .......................................................................87
Table 45. ADC accuracy withRAIN<10 kΩRAIN,V DDA= 3.3V ............................................................88
Table 46. EMS data ................................................................................................................................90
Table 47. EMI data .................................................................................................................................91
DocID022186 Rev34/103
STM8S005K6 STM8S005C6Listof tables
Table 48. ESD absolute maximum ratings .............................................................................................92
Table 49. Electrical sensitivities .............................................................................................................92
Table 50. 48-pin low profile quad flat package mechanical data ............................................................93
Table 51. 32-pin low profile quad flat package mechanical data .........................................................102
Table 52. Thermal characteristics(1) ......................................................................................................97
Table 53. Document revision history ...................................................................................................102
5/103DocID022186 Rev3
Listof tablesSTM8S005K6 STM8S005C6