STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
更新时间:2023-09-04 22:25:01 阅读量: 教育文库 文档下载
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3
Valueline,16MHzSTM8S8-bitMCU,8KbytesFlash,128bytes
dataEEPROM,10-bitADC,3timers,UART,SPI,
I²C
Interruptmanagement
Nestedinterruptcontrollerwith32interrupts
Upto27externalinterruptson6vectors
Timers
Advancedcontroltimer:16-bit,4CAPCOMchannels,3complementaryoutputs,dead-timeinsertionandflexiblesynchronization
Features
Core
16MHzadvancedSTM8corewithHarvardarchitectureand3-stagepipeline
Extendedinstructionset
generalpurposetimer,with3CAPCOM 16-bit
channels(IC,OCorPWM)
8-bitbasictimerwith8-bitprescaler Autowake-uptimer
watchdogandindependentwatchdog Window
timersCommunicationsinterfaces
UARTwithclockoutputforsynchronous
operation,Smartcard,IrDA,LINmastermode
Memories
Programmemory:8KbytesFlash;dataretention20yearsat55°Cafter100cycles
1Kbytes RAM:
memory:128bytesoftruedataEEPROM; Data
enduranceupto100000write/erasecycles
Clock,resetandsupplymanagement2.95to5.5Voperatingvoltage
SPIinterfaceupto8Mbit/s ICinterfaceupto400Kbit/s
2
Analogtodigitalconverter(ADC)
10-bit,±1LSBADCwithupto5multiplexedchannels,scanmodeandanalogwatchdog
clockcontrol,4masterclocksources: Flexible
-Lowpowercrystalresonatoroscillator-Externalclockinput
-Internal,user-trimmable16MHzRC-Internallowpower128kHzRC
Clocksecuritysystemwithclockmonitor
management: Power
-Lowpowermodes(wait,active-halt,halt)-Switch-offperipheralclocksindividually
active,lowconsumptionpower-on Permanently
andpower-downreset
I/Os
Upto28I/Osona32-pinpackageincluding21highsinkoutputs
robustI/Odesign,immuneagainstcurrent Highlyinjection
Developmentsupport
Embeddedsinglewireinterfacemodule(SWIM)forfaston-chipprogrammingandnonintrusivedebugging
June2012
DocID018576Rev3
1/100
http://www.77cn.com.cn
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
ContentsSTM8S003K3STM8S003F3
Contents
1234
Introduction..............................................................................................................7Description...............................................................................................................8Blockdiagram..........................................................................................................9Productoverview...................................................................................................10
4.1CentralprocessingunitSTM8.....................................................................................104.2Singlewireinterfacemodule(SWIM)anddebugmodule(DM)..................................104.3Interruptcontroller.......................................................................................................114.4FlashprogrammemoryanddataEEPROM................................................................114.5Clockcontroller............................................................................................................124.6Powermanagement....................................................................................................134.7Watchdogtimers..........................................................................................................134.8Autowakeupcounter...................................................................................................144.9Beeper........................................................................................................................144.10TIM1-16-bitadvancedcontroltimer.........................................................................144.11TIM2-16-bitgeneralpurposetimer..........................................................................154.12TIM4-8-bitbasictimer..............................................................................................154.13Analog-to-digitalconverter(ADC1)............................................................................154.14Communicationinterfaces.........................................................................................16
4.14.1UART1...............................................................................................164.14.2SPI.....................................................................................................174.14.3I²C......................................................................................................17
5Pinoutandpindescription...................................................................................18
5.1STM8S003K3LQFP32pinoutandpindescription......................................................185.2STM8S003F3TSSOP20/UFQFPN20pinoutandpindescription...............................21
5.2.1STM8S003F3TSSOP20pinoutandpindescription............................215.2.2STM8S003F3UFQFPN20pinout........................................................225.2.3STM8S003F3TSSOP20/UFQFPN20pindescription..........................22
5.3Alternatefunctionremapping.......................................................................................24
6Memoryandregistermap.....................................................................................25
6.1Memorymap6.2Registermap
6.2.16.2.26.2.3
................................................................................................................25...............................................................................................................26I/Oporthardwareregistermap............................................................26Generalhardwareregistermap..........................................................27CPU/SWIM/debugmodule/interruptcontrollerregisters.....................36
7Interruptvectormapping......................................................................................398Optionbytes...........................................................................................................41
8.1Alternatefunctionremappingbits................................................................................43
2/100DocID018576Rev3
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3Contents
9Electricalcharacteristics......................................................................................46
9.1Parameterconditions...................................................................................................46
9.1.1Minimumandmaximumvalues...........................................................469.1.2Typicalvalues.......................................................................................469.1.3Typicalcurves......................................................................................469.1.4Loadingcapacitor.................................................................................469.1.5Pininputvoltage...................................................................................46
9.2Absolutemaximumratings..........................................................................................479.3Operatingconditions....................................................................................................49
9.3.1VCAPexternalcapacitor......................................................................509.3.2Supplycurrentcharacteristics..............................................................519.3.3Externalclocksourcesandtimingcharacteristics...............................609.3.4Internalclocksourcesandtimingcharacteristics.................................629.3.5Memorycharacteristics........................................................................649.3.6I/Oportpincharacteristics...................................................................669.3.7Resetpincharacteristics......................................................................749.3.8SPIserialperipheralinterface..............................................................77
2
9.3.9ICinterfacecharacteristics.................................................................80
9.3.1010-bitADCcharacteristics..................................................................819.3.11EMCcharacteristics...........................................................................85
10Packageinformation...........................................................................................89
10.132-pinLQFPpackagemechanicaldata....................................................................8910.220-pinTSSOPpackagemechanicaldata..................................................................9010.320-leadUFQFPNpackagemechanicaldata.............................................................92
11Thermalcharacteristics.......................................................................................94
11.1Referencedocument.................................................................................................9411.2Selectingtheproducttemperaturerange..................................................................94
12Orderinginformation...........................................................................................9613STM8developmenttools....................................................................................97
13.1Emulationandin-circuitdebuggingtools...................................................................9713.2Softwaretools............................................................................................................97
13.2.1STM8toolset......................................................................................9813.2.2Candassemblytoolchains................................................................98
13.3Programmingtools....................................................................................................98
14Revisionhistory...................................................................................................99
DocID018576Rev33/100
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
ListoftablesSTM8S003K3STM8S003F3
Listoftables
Table1.STM8S003xxvaluelinefeatures................................................................................................8Table2.PeripheralclockgatingbitassignmentsinCLK_PCKENR1/2registers..................................13Table3.TIMtimerfeatures....................................................................................................................15Table4.Legend/abbreviationsforpinouttables...................................................................................18Table5.LQFP32pindescription............................................................................................................19Table6.STM8S003F3pindescription...................................................................................................22Table7.I/Oporthardwareregistermap................................................................................................26Table8.Generalhardwareregistermap...............................................................................................27Table9.CPU/SWIM/debugmodule/interruptcontrollerregisters.........................................................36Table10.Interruptmapping...................................................................................................................39Table11.Optionbytes...........................................................................................................................99Table12.Optionbytedescription...........................................................................................................41Table13.STM8S003K3alternatefunctionremappingbitsfor32-pindevices......................................43Table14.STM8S003F3alternatefunctionremappingbitsfor20-pindevices......................................44Table15.Voltagecharacteristics...........................................................................................................47Table16.Currentcharacteristics...........................................................................................................47Table17.Thermalcharacteristics..........................................................................................................48Table18.Generaloperatingconditions.................................................................................................49Table19.Operatingconditionsatpower-up/power-down......................................................................50Table20.TotalcurrentconsumptionwithcodeexecutioninrunmodeatVDD=5V.............................51Table21.TotalcurrentconsumptionwithcodeexecutioninrunmodeatVDD=3.3V..........................52Table22.TotalcurrentconsumptioninwaitmodeatVDD=5V............................................................53Table23.TotalcurrentconsumptioninwaitmodeatVDD=3.3V.........................................................53Table24.TotalcurrentconsumptioninactivehaltmodeatVDD=5V..................................................54Table25.TotalcurrentconsumptioninactivehaltmodeatVDD=3.3V...............................................54Table26.TotalcurrentconsumptioninhaltmodeatVDD=5V.............................................................55Table27.TotalcurrentconsumptioninhaltmodeatVDD=3.3V..........................................................55Table28.Wakeuptimes.........................................................................................................................56Table29.Totalcurrentconsumptionandtiminginforcedresetstate....................................................57Table30.Peripheralcurrentconsumption.............................................................................................57Table31.HSEuserexternalclockcharacteristics.................................................................................60Table32.HSEoscillatorcharacteristics.................................................................................................61Table33.HSIoscillatorcharacteristics..................................................................................................62Table34.LSIoscillatorcharacteristics...................................................................................................64Table35.RAMandhardwareregisters..................................................................................................64Table36.FlashprogrammemoryanddataEEPROM...........................................................................65Table37.I/Ostaticcharacteristics.........................................................................................................66Table38.Outputdrivingcurrent(standardports)..................................................................................68Table39.Outputdrivingcurrent(trueopendrainports)........................................................................68Table40.Outputdrivingcurrent(highsinkports)..................................................................................69Table41.NRSTpincharacteristics........................................................................................................74Table42.SPIcharacteristics..................................................................................................................78
2
Table43.ICcharacteristics..................................................................................................................80Table44.ADCcharacteristics................................................................................................................82Table45.ADCaccuracywithRAIN<10kΩ,VDD=5V.........................................................................82Table46.ADCaccuracywithRAIN<10kΩRAIN,VDD=3.3V..............................................................83Table47.EMSdata................................................................................................................................86
4/100DocID018576Rev3
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3Listoftables
Table48.EMIdata.................................................................................................................................86Table49.ESDabsolutemaximumratings.............................................................................................87Table50.Electricalsensitivities.............................................................................................................88Table51.32-pinlowprofilequadflatpackagemechanicaldata............................................................89Table52.20-pin,4.40mmbody,0.65mmpitchmechanicaldata.........................................................91Table53.20-leadultrathinfinepitchquadflatno-leadpackage(3x3)mechanicaldata......................92Table54.Thermalcharacteristics..........................................................................................................94Table55.Documentrevisionhistory......................................................................................................99
DocID018576Rev35/100
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
ListoffiguresSTM8S003K3STM8S003F3
Listoffigures
Figure1.Blockdiagram...........................................................................................................................9Figure2.Flashmemoryorganization....................................................................................................12Figure3.STM8S003K3LQFP32pinout................................................................................................18Figure4.STM8S003F3TSSOP20pinout..............................................................................................21Figure5.STM8S003F3UFQFPN20-pinpinout.....................................................................................22Figure6.Memorymap...........................................................................................................................25Figure7.Pinloadingconditions.............................................................................................................46Figure8.Pininputvoltage.....................................................................................................................47Figure9.fCPUmaxversusVDD................................................................................................................50Figure10.ExternalcapacitorCEXT.......................................................................................................50Figure11.TypIDD(RUN)vs.VDDHSEuserexternalclock,fCPU=16MHz.............................................58Figure12.TypIDD(RUN)vs.fCPUHSEuserexternalclock,VDD=5V....................................................58Figure13.TypIDD(RUN)vs.VDDHSIRCosc,fCPU=16MHz.................................................................59Figure14.TypIDD(WFI)vs.VDDHSEuserexternalclock,fCPU=16MHz..............................................59Figure15.TypIDD(WFI)vs.fCPUHSEuserexternalclock,VDD=5V.....................................................60Figure16.TypIDD(WFI)vs.VDDHSIRCosc,fCPU=16MHz.................................................................60Figure17.HSEexternalclocksource....................................................................................................61Figure18.HSEoscillatorcircuitdiagram...............................................................................................62Figure19.TypicalHSIfrequencyvariationvsVDD@4temperatures..................................................63Figure20.TypicalLSIfrequencyvariationvsVDD@4temperatures...................................................64Figure21.TypicalVILandVIHvsVDD@4temperatures......................................................................67Figure22.Typicalpull-upresistancevsVDD@4temperatures............................................................67Figure23.Typicalpull-upcurrentvsVDD@4temperatures.................................................................68Figure24.Typ.VOL@VDD=5V(standardports)................................................................................70Figure25.Typ.VOL@VDD=3.3V(standardports).............................................................................70Figure26.Typ.VOL@VDD=5V(trueopendrainports)......................................................................71Figure27.Typ.VOL@VDD=3.3V(trueopendrainports)...................................................................71Figure28.Typ.VOL@VDD=5V(highsinkports)................................................................................72Figure29.Typ.VOL@VDD=3.3V(highsinkports).............................................................................72Figure30.Typ.VDD-VOH@VDD=5V(standardports).......................................................................73Figure31.Typ.VDD-VOH@VDD=3.3V(standardports)...................................................................73Figure32.Typ.VDD-VOH@VDD=5V(highsinkports).......................................................................74Figure33.Typ.VDD-VOH@VDD=3.3V(highsinkports)....................................................................74Figure34.TypicalNRSTVILandVIHvsVDD@4temperatures...........................................................76Figure35.TypicalNRSTpull-upresistancevsVDD@4temperatures.................................................76Figure36.TypicalNRSTpull-upcurrentvsVDD@4temperatures......................................................77Figure37.Recommendedresetpinprotection......................................................................................77Figure38.SPItimingdiagram-slavemodeandCPHA=0..................................................................79Figure39.SPItimingdiagram-slavemodeandCPHA=1..................................................................79
(1)
Figure40.SPItimingdiagram-mastermode...................................................................................80
2
Figure41.TypicalapplicationwithICbusandtimingdiagram............................................................84Figure42.ADCaccuracycharacteristics...............................................................................................84Figure43.TypicalapplicationwithADC................................................................................................85Figure44.32-pinlowprofilequadflatpackage(7x7)..........................................................................89Figure45.20-pin,4.40mmbody,0.65mmpitch...................................................................................90Figure46.20-leadultrathinfinepitchquadflatno-leadpackageoutline(3x3)....................................92Figure47.STM8S003xvaluelineorderinginformationscheme...........................................................96
6/100DocID018576Rev3
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3Introduction
1Introduction
Thisdatasheetcontainsthedescriptionofthedevicefeatures,pinout,electricalcharacteristics,mechanicaldataandorderinginformation.
ForcompleteinformationontheSTM8Smicrocontrollermemory,registersandperipherals,pleaserefertotheSTM8Smicrocontrollerfamilyreferencemanual(RM0016).
informationonprogramming,erasingandprotectionoftheinternalFlashmemory For
pleaserefertotheSTM8SFlashprogrammingmanual(PM0051).
informationonthedebugandSWIM(singlewireinterfacemodule)refertotheSTM8 For
SWIMcommunicationprotocolanddebugmoduleusermanual(UM0470).
informationontheSTM8core,pleaserefertotheSTM8CPUprogrammingmanual For
(PM0044).
DocID018576Rev37/100
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
DescriptionSTM8S003K3STM8S003F3
2Description
TheSTM8S003xvalueline8-bitmicrocontrollersfeature8KbytesFlashprogrammemory,plusintegratedtruedataEEPROM.TheSTM8Smicrocontrollerfamilyreferencemanual(RM0016)referstodevicesinthisfamilyaslow-density.Theyprovidethefollowingbenefits:performance,robustness,andreducedsystemcost.
DeviceperformanceandrobustnessareensuredbyintegratedtruedataEEPROMsupportingupto100000write/erasecycles,advancedcoreandperipheralsmadeinastate-of-thearttechnology,a16MHzclockfrequency,robustI/Os,independentwatchdogswithseparateclocksource,andaclocksecuritysystem.
Thesystemcostisreducedthankstohighsystemintegrationlevelwithinternalclockoscillators,watchdogandbrown-outreset.
Fulldocumentationisofferedaswellasawidechoiceofdevelopmenttools.
Table1:STM8S003xxvaluelinefeatures
DevicePincount
MaximumnumberofGPIOs(I/Os)Ext.interruptpinsTimerCAPCOMchannelsTimercomplementaryoutputsA/DconverterchannelsHighsinkI/Os
STM8S003K332282773421
STM8S003F3201616725128K1K
(1)
LowdensityFlashprogrammemory(bytes)8KRAM(bytes)
TruedataEEPROM(bytes)Peripheralset
1K128
128
(1)
2
Multipurposetimer(TIM1),SPI,IC,UARTwindowWDG,independentWDG,ADC,PWMtimer(TIM2),8-bittimer(TIM4)
(1)
Withoutread-while-writecapability.
8/100DocID018576Rev3
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3Blockdiagram
3Blockdiagram
Figure1:Blockdiagram
DocID018576Rev39/100
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
ProductoverviewSTM8S003K3STM8S003F3
4Productoverview
Thefollowingsectionintendstogiveanoverviewofthebasicfeaturesofthedevicefunctionalmodulesandperipherals.
Formoredetailedinformationpleaserefertothecorrespondingfamilyreferencemanual(RM0016).
4.1CentralprocessingunitSTM8
The8-bitSTM8coreisdesignedforcodeefficiencyandperformance.
Itcontains6internalregisterswhicharedirectlyaddressableineachexecutioncontext,20addressingmodesincludingindexedindirectandrelativeaddressingand80instructions.ArchitectureandregistersHarvardarchitecture
3-stagepipeline
32-bitwideprogrammemorybus-singlecyclefetchingformostinstructions
andY16-bitindexregisters-enablingindexedaddressingmodeswithorwithoutoffset X
andread-modify-writetypedatamanipulations 8-bitaccumulator
24-bitprogramcounter-16-Mbytelinearmemoryspace 16-bitstackpointer-accesstoa64K-levelstack
8-bitconditioncoderegister-7conditionflagsfortheresultofthelastinstruction
Addressing
20addressingmodes
indirectaddressingmodeforlook-uptableslocatedanywhereintheaddress Indexed
space
Stackpointerrelativeaddressingmodeforlocalvariablesandparameterpassing
Instructionset
80instructionswith2-byteaverageinstructionsize
Standarddatamovementandlogic/arithmeticfunctions 8-bitby8-bitmultiplication
16-bitby8-bitand16-bitby16-bitdivision Bitmanipulation
Datatransferbetweenstackandaccumulator(push/pop)withdirectstackaccess DatatransferusingtheXandYregistersordirectmemory-to-memorytransfers
4.2
Singlewireinterfacemodule(SWIM)anddebugmodule(DM)
Thesinglewireinterfacemoduleanddebugmodulepermitsnon-intrusive,real-timein-circuitdebuggingandfastmemoryprogramming.
10/100DocID018576Rev3
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3
SWIM
Productoverview
Singlewireinterfacemodulefordirectaccesstothedebugmoduleandmemoryprogramming.Theinterfacecanbeactivatedinalldeviceoperationmodes.Themaximumdatatransmissionspeedis145bytes/ms.Debugmodule
Thenon-intrusivedebuggingmodulefeaturesaperformanceclosetoafull-featuredemulator.Besidememoryandperipherals,alsoCPUoperationcanbemonitoredinreal-timebymeansofshadowregisters.
R/WtoRAMandperipheralregistersinreal-time
R/WaccesstoallresourcesbystallingtheCPU
Breakpointsonallprogram-memoryinstructions(softwarebreakpoints) Twoadvancedbreakpoints,23predefinedconfigurations
4.3
Interruptcontroller
Nestedinterruptswiththreesoftwareprioritylevels 32interruptvectorswithhardwarepriority
Upto27externalinterruptson6vectorsincludingTLI Trapandresetinterrupts
4.4
FlashprogrammemoryanddataEEPROM
8KbytesofFlashprogramsinglevoltageFlashmemory
bytesoftruedataEEPROM 128
Useroptionbytearea
Writeprotection(WP)
WriteprotectionofFlashprogrammemoryanddataEEPROMisprovidedtoavoidunintentionaloverwritingofmemorythatcouldresultfromausersoftwaremalfunction.
Therearetwolevelsofwriteprotection.ThefirstlevelisknownasMASS(memoryaccesssecuritysystem).MASSisalwaysenabledandprotectsthemainFlashprogrammemory,thedataEEPROM,andtheoptionbytes.
Toperformin-applicationprogramming(IAP),thiswriteprotectioncanberemovedbywritingaMASSkeysequenceinacontrolregister.ThisallowstheapplicationtomodifythecontentofthemainprogrammemoryanddataEEPROM,ortoreprogramthedeviceoptionbytes.Asecondlevelofwriteprotection,canbeenabledtofurtherprotectaspecificareaofmemoryknownasUBC(userbootcode).Refertothefigurebelow.
ThesizeoftheUBCisprogrammablethroughtheUBCoptionbyte,inincrementsof1page(64-byteblock)byprogrammingtheUBCoptionbyteinICPmode.Thisdividestheprogrammemoryintotwoareas:Mainprogrammemory:8KbytesminusUBC
User-specificbootcode(UBC):Configurableupto8Kbytes
TheUBCarearemainswrite-protectedduringin-applicationprogramming.ThismeansthattheMASSkeysdonotunlocktheUBCarea.Itprotectsthememoryusedtostoretheboot
DocID018576Rev311/100
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
ProductoverviewSTM8S003K3STM8S003F3
program,specificcodelibraries,resetandinterruptvectors,theresetroutineandusuallytheIAPandcommunicationroutines.
Figure2:Flashmemoryorganization
Read-outprotection(ROP)
Theread-outprotectionblocksreadingandwritingfrom/totheFlashprogrammemoryandthedataEEPROMinICPmode(anddebugmode).Oncetheread-outprotectionisactivated,anyattempttotoggleitsstatustriggersaglobaleraseoftheprogrammemory.Evenifnoprotectioncanbeconsideredastotallyunbreakable,thefeatureprovidesaveryhighlevelofprotectionforageneralpurposemicrocontroller.
4.5Clockcontroller
Theclockcontrollerdistributesthesystemclock(fMASTER)comingfromdifferentoscillatorstothecoreandtheperipherals.Italsomanagesclockgatingforlowpowermodesandensuresclockrobustness.
Features
Clockprescaler:TogetthebestcompromisebetweenspeedandcurrentconsumptiontheclockfrequencytotheCPUandperipheralscanbeadjustedbyaprogrammableprescaler.
clockswitching:Clocksourcescanbechangedsafelyontheflyinrunmode Safe
throughaconfigurationregister.Theclocksignalisnotswitcheduntilthenewclocksourcemanagement:Toreducepowerconsumption,theclockcontrollercanstopthe Clock
clocktothecore,individualperipheralsormemory.
clocksources:Fourdifferentclocksourcescanbeusedtodrivethemaster Master
clock:
-1-16MHzhigh-speedexternalcrystal(HSE)
-Upto16MHzhigh-speeduser-externalclock(HSEuser-ext)-16MHzhigh-speedinternalRCoscillator(HSI)-128kHzlow-speedinternalRC(LSI)isready.Thedesignguaranteesglitch-freeswitching.
12/100DocID018576Rev3
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3Productoverview
clock:Afterreset,themicrocontrollerrestartsbydefaultwithaninternal2MHz Startup
clock(HSI/8).Theprescalerratioandclocksourcecanbechangedbytheapplicationsecuritysystem(CSS):Thisfeaturecanbeenabledbysoftware.IfanHSEclock Clock
failureoccurs,theinternalRC(16MHz/8)isautomaticallyselectedbytheCSSandanmainclockoutput(CCO):Thisoutputsanexternalclockforusebythe Configurable
application.Table2:PeripheralclockgatingbitassignmentsinCLK_PCKENR1/2registers
BitPCKEN17PCKEN16PCKEN15PCKEN14
PeripheralBitclockTIM1ReservedTIM2TIM4
PCKEN13PCKEN12PCKEN11PCKEN10
PeripheralBitclockUART1ReservedSPIIC
2
programassoonasthecodeexecutionstarts.
interruptcanoptionallybegenerated.
PeripheralBitclockReservedReservedReservedReserved
PCKEN23PCKEN22PCKEN21PCKEN20
PeripheralclockADCAWUReservedReserved
PCKEN27PCKEN26PCKEN25PCKEN24
4.6Powermanagement
Forefficentpowermanagement,theapplicationcanbeputinoneoffourdifferentlow-powermodes.Youcanconfigureeachmodetoobtainthebestcompromisebetweenlowestpowerconsumption,fasteststart-uptimeandavailablewakeupsources.
Waitmode:Inthismode,theCPUisstopped,butperipheralsarekeptrunning.Thewakeupisperformedbyaninternalorexternalinterruptorreset.
haltmodewithregulatoron:Inthismode,theCPUandperipheralclocksare Active
stopped.Aninternalwakeupisgeneratedatprogrammableintervalsbytheautowakeup
unit(AWU).Themainvoltageregulatoriskeptpoweredon,socurrentconsumptionishigherthaninactivehaltmodewithregulatoroff,butthewakeuptimeisfaster.WakeupistriggeredbytheinternalAWUinterrupt,externalinterruptorreset.
haltmodewithregulatoroff:Thismodeisthesameasactivehaltwithregulator Active
on,exceptthatthemainvoltageregulatorispoweredoff,sothewakeuptimeisslower.
mode:Inthismodethemicrocontrollerusestheleastpower.TheCPUandperipheral Halt
clocksarestopped,themainvoltageregulatorispoweredoff.Wakeupistriggeredbyexternaleventorreset.
4.7Watchdogtimers
Thewatchdogsystemisbasedontwoindependenttimersprovidingmaximumsecuritytotheapplications.
Activationofthewatchdogtimersiscontrolledbyoptionbytesorbysoftware.Onceactivated,thewatchdogscannotbedisabledbytheuserprogramwithoutperformingareset.
DocID018576Rev313/100
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
Productoverview
Windowwatchdogtimer
STM8S003K3STM8S003F3
Thewindowwatchdogisusedtodetecttheoccurrenceofasoftwarefault,usuallygeneratedbyexternalinterferencesorbyunexpectedlogicalconditions,whichcausetheapplicationprogramtoabandonitsnormalsequence.
Thewindowfunctioncanbeusedtotrimthewatchdogbehaviortomatchtheapplicationperfectly.
Theapplicationsoftwaremustrefreshthecounterbeforetime-outandduringalimitedtimewindow.
Aresetisgeneratedintwosituations:
1.Timeout:At16MHzCPUclockthetime-outperiodcanbeadjustedbetween75µsupto64ms.2.Refreshoutofwindow:Thedowncounterisrefreshedbeforeitsvalueislowerthantheonestoredinthewindowregister.Independentwatchdogtimer
Theindependentwatchdogperipheralcanbeusedtoresolveprocessormalfunctionsduetohardwareorsoftwarefailures.
Itisclockedbythe128kHZLSIinternalRCclocksource,andthusstaysactiveevenincaseofaCPUclockfailure
TheIWDGtimebasespansfrom60µsto1s.
4.8Autowakeupcounter
Usedforautowakeupfromactivehaltmode
Clocksource:Internal128kHzinternallowfrequencyRCoscillatororexternalclock LSIclockcanbeinternallyconnectedtoTIM1inputcapturechannel1forcalibration
4.9
Beeper
ThebeeperfunctionoutputsasignalontheBEEPpinforsoundgeneration.Thesignalisintherangeof1,2or4kHz.
ThebeeperoutputportisonlyavailablethroughthealternatefunctionremapoptionbitAFR7.
4.10TIM1-16-bitadvancedcontroltimer
Thisisahigh-endtimerdesignedforawiderangeofcontrolapplications.Withits
complementaryoutputs,dead-timecontrolandcenter-alignedPWMcapability,thefieldofapplicationsisextendedtomotorcontrol,lightingandhalf-bridgedriver16-bitup,downandup/downautoreloadcounterwith16-bitprescaler
independentcapture/comparechannels(CAPCOM)configurableasinputcapture, Four
outputcompare,PWMgeneration(edgeandcenteralignedmode)andsinglepulsemode Synchronizationmoduletocontrolthetimerwithexternalsignals Breakinputtoforcethetimeroutputsintoadefinedstate Threecomplementaryoutputswithadjustabledeadtime
14/100
DocID018576Rev3
output
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3Productoverview
Encodermode
Interruptsources:3xinputcapture/outputcompare,1xoverflow/update,1xbreak
4.11
TIM2-16-bitgeneralpurposetimer
16-bitautoreload(AR)up-counter
15-bitprescaleradjustabletofixedpowerof2ratios1…32768 3individuallyconfigurablecapture/comparechannels PWMmode
Interruptsources:3xinputcapture/outputcompare,1xoverflow/update
4.12
TIM4-8-bitbasictimer
8-bitautoreload,adjustableprescalerratiotoanypowerof2from1to128 Clocksource:CPUclock
Interruptsource:1xoverflow/update
Table3:TIMtimerfeatures
Timer
Countersize(bits)
PrescalerAnyintegerfrom1to65536Anypowerof2from1to32768Anypowerof2from1to128
Countingmode
CAPCOMchannels
Complem.Ext.outputstrigger
Timer
synchronization/chaining
TIM116Up/down43Yes
TIM216Up30NoNo
TIM48Up00No
4.13Analog-to-digitalconverter(ADC1)
TheSTM8S003xxproductscontaina10-bitsuccessiveapproximationA/Dconverter(ADC1)withupto5externalmultiplexedinputschannelsandthefollowingfeatures:Inputvoltagerange:0toVDD
Conversiontime:14clockcycles
Singleandcontinuousandbufferedcontinuousconversionmodes Buffersize(nx10bits)wheren=numberofinputchannels
Scanmodeforsingleandcontinuousconversionofasequenceofchannels Analogwatchdogcapabilitywithprogrammableupperandlowerthresholds Analogwatchdoginterrupt
DocID018576Rev3
15/100
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
ProductoverviewSTM8S003K3STM8S003F3
Externaltriggerinput TriggerfromTIM1TRGO
Endofconversion(EOC)interrupt
4.14
Communicationinterfaces
Thefollowingcommunicationinterfacesareimplemented:
UART1:FullfeatureUART,synchronousmode,SPImastermode,Smartcardmode,IrDAmode,singlewiremode,LIN2.1mastercapability
SPI:Fullandhalf-duplex,8Mbit/s I²C:Upto400Kbit/s
4.14.1
UART1
Mainfeatures
OneMbit/sfullduplexSCI
SPIemulation
Highprecisionbaudrategenerator Smartcardemulation
IrDASIRencoderdecoder LINmastermode
Singlewirehalfduplexmode
Asynchronouscommunication(UARTmode)
Fullduplexcommunication-NRZstandardformat(mark/space)
transmitandreceivebaudratesupto1Mbit/s(f/16)andcapableof Programmable
followinganystandardbaudrateregardlessoftheinputfrequency Separateenablebitsfortransmitterandreceiver
receiverwakeupmodes: TwoAddress
bit(MSB)--Idleline(interrupt)
Transmissionerrordetectionwithinterruptgeneration Paritycontrol
CPU
Synchronouscommunication
Fullduplexsynchronoustransfers
SPImasteroperation 8-bitdatacommunication
Maximumspeed:1Mbit/sat16MHz(f
Reception:Detects11-bitbreakframe
16/100
CPU/16)
LINmastermode
Emission:Generates13-bitsynchbreakframe
DocID018576Rev3
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3Productoverview
4.14.2SPI
Maximumspeed:8Mbit/s(f/2)bothformasterandslave Fullduplexsynchronoustransfers
Simplexsynchronoustransfersontwolineswithapossiblebidirectionaldataline Masterorslaveoperation-selectablebyhardwareorsoftware CRCcalculation
1byteTxandRxbuffer
Slave/masterselectioninputpin
MASTER
4.14.3I²C
masterfeatures: I²CClock
generation--Startandstopgenerationslavefeatures: I²CProgrammable
I2Caddressdetection--Stopbitdetection
Generationanddetectionof7-bit/10-bitaddressingandgeneralcall
differentcommunicationspeeds: Supports
-Standardspeed(upto100kHz)-Fastspeed(upto400kHz)
DocID018576Rev317/100
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
PinoutandpindescriptionSTM8S003K3STM8S003F3
5Pinoutandpindescription
Table4:Legend/abbreviationsforpinouttables
5.1STM8S003K3LQFP32pinoutandpindescription
Figure3:STM8S003K3LQFP32pinout
18/100DocID018576Rev3
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料
STM8S003K3STM8S003F3Pinoutandpindescription
1.(HS)highsinkcapability.
2.(T)Trueopendrain(P-bufferandprotectiondiodetoVDDnotimplemented).
3.[]alternatefunctionremappingoption(ifthesamealternatefunctionisshowntwice,itindicatesanexclusivechoicenotaduplicationofthefunction).
Table5:LQFP32pindescription
DocID018576Rev319/100
正在阅读:
STM8S003F3U6TR,STM8S003K3T6C,STM8S003F3P6, 规格书,Datasheet 资料09-04
我的拿手好戏六年级作文500字(5篇)08-01
焊接打磨作业指导书 - 图文05-26
高一新生军训个人心得体会范文03-25
党风廉政警示教育心得体会3篇-心得体会09-07
2016年环境污染防治研究分析及发展趋势预测 (目录)03-20
关于公路桥梁施工中预应力技术的探讨10-15
询价函模板03-27
植物生理学总结12-25
1998年香港金融保卫战回眸05-25
- 1STM8S开发环境编译方法
- 2STM32FEBKC6T6 32位ARM 电动车行业专供 完全替代STM32F103C6T6
- 3STM8S学习 - 操作单个IO口
- 4STM32FEBKC6T6 32位ARM 电动车行业专供 完全替代STM32F103C6T6
- 5STM8S学习 - 操作单个IO口
- 6STM8教程-第十章 STM8S207 外部输入中断及其应用实例
- 7德州仪器(TI)LM3S5652-IQR50-A0T,LM3S5652-IQR50-A0, 规格书,Datasheet 资料
- 8STM32F10x_SPI与I2S
- 9zSTM8S-利用STM8S的官方库在IAR中新建工程编译及下载
- 10zSTM8S-利用STM8S的官方库在IAR中新建工程编译及下载
- exercise2
- 铅锌矿详查地质设计 - 图文
- 厨余垃圾、餐厨垃圾堆肥系统设计方案
- 陈明珠开题报告
- 化工原理精选例题
- 政府形象宣传册营销案例
- 小学一至三年级语文阅读专项练习题
- 2014.民诉 期末考试 复习题
- 巅峰智业 - 做好顶层设计对建设城市的重要意义
- (三起)冀教版三年级英语上册Unit4 Lesson24练习题及答案
- 2017年实心轮胎现状及发展趋势分析(目录)
- 基于GIS的农用地定级技术研究定稿
- 2017-2022年中国医疗保健市场调查与市场前景预测报告(目录) - 图文
- 作业
- OFDM技术仿真(MATLAB代码) - 图文
- Android工程师笔试题及答案
- 生命密码联合密码
- 空间地上权若干法律问题探究
- 江苏学业水平测试《机械基础》模拟试题
- 选课走班实施方案
- STM
- 003
- Datasheet
- 规格
- 资料
- TR
- 项目部安全例会制度
- 辽宁大学经济学院硕士研究生培养方案(2012年版)
- 金工实习答案
- 圆柱体体积公式推导及应用教学设计
- 供电课程设计完整稿某工厂降压变电所一次部分电气设计
- 方位角坐标计算
- 塑料化粪池施工工艺
- 考评员考试试卷
- 月度优秀员工评选方案
- 必修3 Unit 3 The Million Pound Bank Note复习与练习
- 金融学形考参考答案 第十一章 中央银行
- 外贸报价单格式
- 浅谈保险业如何深入推进廉政文化建设论文
- 《商业银行经营学(专科)》17年9月在线作业满分答案
- 广东省建设工程造价咨询服务收费标准表(粤价函724号文)
- 苏电生〔2010〕102号新建居住区供配电设施规划设计导则
- Visual_C++面向对象编程教程第1章_Visual_C++集成开发环境
- 公务员考试申论范文:如何应对经济危机(策论文)
- 贝多芬悲怆奏鸣曲的背景资料
- 17-中共XX支部委员会审查发展对象会议记录-发展对象审查会议