STM8S103K3STM8S103F3STM8S103F2Accessline,16MHzSTM8S8-bitMCU,upto8KbytesFlash,dataEEPROM,10-bitADC,3timers,UART,SPI,I²CLQFP327x7UFQFPN325x5TSSOP20UFQFPN203x3SO20W300milsSDIP32400milsFeaturesCore•16MHzadvancedSTM8corewithHarvardarchitectureand3-stagepipeline•ExtendedinstructionsetMemories•Programmemory:8KbytesFlash;dataretention20yearsat55°Cafter10kcycles•Datamemory:640bytestruedataEEPROM;endurance300kcycles•RAM:1KbytesClock,resetandsupplymanagement•2.95to5.5Voperatingvoltage•Flexibleclockcontrol,4masterclocksources:-Lowpowercrystalresonatoroscillator-Externalclockinput-Internal,user-trimmable16MHzRC-Internallowpower128kHzRC•Clocksecuritysystemwithclockmonitor•Powermanagement:-Lowpowermodes(wait,active-halt,halt)-Switch-offperipheralclocksindividually•Permanentlyactive,lowconsumptionpower-onandpower-downresetInterruptmanagement•Nestedinterruptcontrollerwith32interrupts•Upto27externalinterruptson6vectorsTimers•Advancedcontroltimer:16-bit,4CAPCOMchannels,3complementaryoutputs,dead-timeinsertionandflexiblesynchronization•16-bitgeneralpurposetimer,with3CAPCOMchannels(IC,OCorPWM)•8-bitbasictimerwith8-bitprescaler•Autowake-uptimer•WindowwatchdogandindependentwatchdogtimersCommunicationsinterfaces•UARTwithclockoutputforsynchronousoperation,Smartcard,IrDA,LINmastermode•SPIinterfaceupto8Mbit/s•I2Cinterfaceupto400Kbit/sAnalogtodigitalconverter(ADC)•10-bit,±1LSBADCwithupto5multiplexedchannels,scanmodeandanalogwatchdogI/Os•Upto28I/Osona32-pinpackageincluding21highsinkoutputs•HighlyrobustI/Odesign,immuneagainstcurrentinjectionDevelopmentsupport•Embeddedsinglewireinterfacemodule(SWIM)forfaston-chipprogrammingandnonintrusivedebuggingUniqueID•96-bituniquekeyforeachdevice1/117DocID15441Rev9June2012(SWIM)anddebugmodule(DM)..................................114.3Interruptcontroller.......................................................................................................124.4FlashprogramanddataEEPROMmemory................................................................124.5Clockcontroller............................................................................................................134.6Powermanagement....................................................................................................144.7Watchdogtimers..........................................................................................................144.8Autowakeupcounter...................................................................................................154.9Beeper........................................................................................................................154.10TIM1-16-bitadvancedcontroltimer.........................................................................154.11TIM2-16-bitgeneralpurposetimer..........................................................................164.12TIM4-8-bitbasictimer..............................................................................................164.13Analog-to-digitalconverter(ADC1)............................................................................164.14Communicationinterfaces.........................................................................................174.14.1UART1...............................................................................................174.14.2SPI.....................................................................................................184.14.3I²C......................................................................................................185Pinoutandpindescription...................................................................................195.1STM8S103KxUFQFPN32/LQFP32/SDIP32pinoutandpindescription.....................205.2STM8S103FxTSSOP20/SO20/UFQFPN20pinoutandpindescription.....................245.2.1STM8S103FxTSSOP20/SO20pinout.................................................245.2.2STM8S103FxUFQFPN20pinout........................................................255.2.3STM8S103FxTSSOP20/SO20/UFQFPN20pindescription................255.3Alternatefunctionremapping.......................................................................................276Memoryandregistermap.....................................................................................286.1Memorymap...................................................................................