欢迎来到天天文库
浏览记录
ID:42779177
大小:3.33 MB
页数:40页
时间:2019-09-22
《Freescale单片机_BDM调试方法及工具》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
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.注意:一定不能插反!!!HostPCRS232RxDTxDGNDInterfacePodCustomBDMSerialTargetSystemBKGDunused(Vpp)GNDVddRESETBKGDNCNCGNDVddRESETBKGDNCNCGNDVddRESET要求BDM和目标板都改,会与Motorola原始定义不兼容,可通过跳线解决S12DG128BasedBDMToolUseBDMToolDebugS12TargetSystemUSB接口的BDMforS12调试工具BKGDPinShares3Funct
8、ionsModeSelectduringresetSelectsNormal(BKGD=1)orSpecial(BKGD=0)modesDuringR
此文档下载收益归作者所有