HCS12Microcontrollersfreescale.comMC9S12XS256ReferenceManualCoversMC9S12XSFamilyMC9S12XS256MC9S12XS128MC9S12XS64MC9S12XS256RMV1Rev.1.0909/2009Toprovidethemostup-to-dateinformation,thedocumentrevisionontheWorldWideWebisthemostcurrent.Aprintedcopymaybeanearlierrevision.Toverifyyouhavethelatestinformationavailable,referto:(FTMR)modulesectionstocoverthewholefamily.Afulllistoffamilymembersandoptionsisincludedintheappendices.Thisdocumentcontainsinformationforallconstituentmodules,withtheexceptionoftheCPU.ForCPUinformationpleaserefertoCPU12XV1intheCPU12/CPU12XReferenceManual.RevisionHistoryDateRevisionLevelDescriptionMarch,20091.07Correctedpinnamein112LQPFpinoutUpdatedXMMC,MSCAN,PIMsectionsMay,20091.08RemovedallKGDreferencesCorrectedDetailedRegisterMap(FERSTAT)CorrectedstatementonVDDA/VDDXprotectiondiodesSeptember,20091.09UpdatedChapter8S12XEClocksandResetGenerator(S12XECRGV1)UpdatedChapter14SerialCommunicationInterface(S12SCIV5)UpdatedChapter16TimerModule(TIM16B8CV2)BlockDescriptionUpdatedChapter18256KByteFlashModule(S12XFTMR256K1V1)UpdatedChapter19128KByteFlashModule(S12XFTMR128K1V1)UpdatedChapter2064KByteFlashModule(S12XFTMR64K1V1)S12XSFamilyReferenceManual,Rev.1.09FreescaleSemiconductor3Chapter1DeviceOverviewS12XSFamily.................................19Chapter2PortIntegrationModule(S12XSPIMV1)...........................57Chapter3MemoryMappingControl(S12XMMCV4)........................125Chapter4Interrupt(S12XINTV2)........................................149Chapter5BackgroundDebugModule(S12XBDMV2).......................165Chapter6S12XDebug(S12XDBGV3)Module.............................191Chapter7Security(S12XS9SECV2)......................................227Chapter8S12XEClocksandResetGenerator(S12XECRGV1)...............233Chapter9PierceOscillator(S12XOSCLCPV2)............................263Chapter10Analog-to-DigitalConverter(ADC12B16CV1).....................267Chapter11Freescale’sScalableControllerAreaNetwork(S12MSCANV3)......293Chapter12PeriodicInterruptTimer(S12PIT24B4CV1).......................347Chapter13Pulse-WidthModulator(S12PWM8B8CV1).......................363Chapter14SerialCommunicationInterface(S12SCIV5)......................395Chapter15SerialPeripheralInterface(S12SPIV5)...........................433Chapter16TimerModule(TIM16B8CV2)BlockDescription...................459Chapter17VoltageRegulator(S12VREGL3V3V1)...........................487Chapter18256KByteFlashModule(S12XFTMR256K1V1)....................505Chapter19128KByteFlashModule(S12XFTMR128K1V1)....................555Chapter2064KByteFlashModule(S12XFTMR64K1V1)......................605AppendixAElectricalCharacteristics.....................................655AppendixBPackageInformation.........................................696AppendixCPCBLayoutGuidelines.......................................706AppendixDDerivativeDifferences........................................710AppendixEDetailedRegisterAddressMap................................711AppendixFOrderingInformation.........................................733S12XSFamilyReferenceManual,Rev.1.094FreescaleSemiconductorS12XSFamilyReferenceManual,Rev.1.09FreescaleSemiconductor5Chapter1DeviceOverviewS12XSFamily1.1Introduction..................................................................191.1.1Features..............................................................191.1.2ModesofOperation.....................................................231.1.3BlockDiagram.........................................................241.1.4DeviceMemoryMap....................................................251.1.5AddressMapping.......................................................261.1.6DetailedRegisterMap...................................................281.1.7PartIDAssignments....................................................281.2SignalDescription.............................................................291.2.1DevicePinout..........................................................291.2.2PinAssignmentOverview................................................331.2.3DetailedSignalDescriptions..............................................411.2.4PowerSupplyPins......................................................451.3SystemClockDescription.......................................................481.4ModesofOperation............................................................491.4.1ChipConfigurationSummary.............................................491.4.2PowerModes..........................................................501.4.3FreezeMode...........................................................511.5Security......................................................................511.6ResetsandInterrupts...........................................................511.6.1Resets................................................................511.6.2Vectors...............................................................511.6.3Ef