資源描述:
《Freescale單片機_BDM調(diào)試方法及工具》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在行業(yè)資料-天天文庫。
1、S12MicroControllerDebugModule&BDMToolsDebugModeFeatures:Single-WireInterface.ActiveoutofResetinSpecialSingle-ChipModeInstructionTaggingCapabilityAllowsforsystemdebuggingduringprogramexecution.CanaccessallCPUregistersandsystemmemory.IPIPE0IPIPE1BKGDSingleWireSerialSystem16-BI
2、TSHIFTREGISTERInstructionDecode&Execution256BYTE@$FF00MEMADDRDATACNTLBusInt.&ControlHCS121wirecommunicationBDMHost-to-TargetSerialBitTimingWriteOneTimeslotWriteZeroTimeslotReadDataWriteaByteinRegisterBto1woreBusCLSLB0BCCWRITE0orBCSWRITE1WriteaByteinRegisterBtoBKGDWRITEBYTELD
3、AA#$8;BitnumberNEXTBITLSLB;HighbittoCBCCWRITE0BCLRBDMPORT,BKGD;Write1,DDR=OUTPTSEI;DisableIRQBSETBDMDDR,BKGD;0NOPBSETBDMPORT,BKGD;to1NEXTBIT1BCLRBDMDDR,BKGD;3cycles,DDR=InputCLI;EnableIRQDECA;1bitsentBNENEXTBITWAIT10RTS;5CyclesWRITE0BSETBDMDDR,BKGD;DDR=OutputSEIBCLRBDMPORT,B
4、DMBIT;Output=0BSRWAIT10;5+4cyclesNOPBRANEXBIT1;3cyclesModifyPage197BackgroundDebugModeOnceenabled,backgroundmodecanbemadeactivebyaserialcommandsentviatheBKGDpinorexecutionofaCPU12BGNDinstruction.TheCPUexecutescodelocatedinasmallon-chipROMmappedtoaddresses$FF20to$FFFF,replace
5、stheregularsystemvectors.BDMcontrolregistersareat$FF00to$FF06.Theusermemoryfrom$FF00to$FFFFisnotinthemapexceptthroughserialBDMcommands.HCS12TargetSystemBDMInterfacePodProgramExecutionBackgroundMonitorCodeCommandsResponsesBreakpointorBGNDInstructionReturntomainprogramexecutio
6、nBKGDPINSDIBackgroundDebugModeHostPCVIEW/MODIFYREGISTERS&MEMORYetc.SingleWireDevelopmentInterfaceTypicalBDMSystemOnlyBKGDandGNDarerequired,othersareoptional.-Resetwouldallowhosttoresetthetargetsystem.-Vddwouldallowpodto“steal”powerfromthetargetsystem.Vppisnotneededinanycurre
7、ntHCS12systems.注意:一定不能插反!?。ostPCRS232RxDTxDGNDInterfacePodCustomBDMSerialTargetSystemBKGDunused(Vpp)GNDVddRESETBKGDNCNCGNDVddRESETBKGDNCNCGNDVddRESET要求BDM和目標板都改,會與Motorola原始定義不兼容,可通過跳線解決S12DG128BasedBDMToolUseBDMToolDebugS12TargetSystemUSB接口的BDMforS12調(diào)試工具BKGDPinShares3Funct
8、ionsModeSelectduringresetSelectsNormal(BKGD=1)orSpecial(BKGD=0)modesDuringR