本文为一款带OCDS的8051 MCU设计了一种单线仿真器,采用曼彻斯特编码。该仿真器使用STM32处理器,加上外围电路形成仿真器电路板,然后对STM32进行编程,实现仿真器的软件功能。仿真器负责将主机USB发出的调试命令转换为单线协议,然后发给MCU的OCDS, 进而控制MCU的运行。测试结果表明,该仿真器可以对MCU实现软件代码下载、启动与停止、断点设置、单步执行及存储访问等功能,该单线仿真器对其他形式仿真器也具有一定参考价值。
Abstract
In the paper,a single line simulator for a 8051 MCU with OCDS online simulation hardware module,using Manchester coding.The simulator uses STM32 processor and peripheral circuits to form the circuit board,and then the STM32 is programmed to realize the software function of the simulator.The emulator is responsible for converting the debugging command sent by the host USB into a single line protocol,and then sending it to the OCDS of MCU to control the operation of MCU.The simulator can implement software code download,start and stop,breakpoint setting,single step execution and storage access to MCU.The single line simulator also has certain reference value for other types of simulators.
关键词
曼彻斯特编码 /
仿真器 /
单线 /
STM32
Key words
Manchester coding /
simulator /
single wire /
STM32
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
参考文献
[1] 吴凌燕.Multisim10在单片机仿真中的应用[J].国外电子测量技术,2011,30(3):67-70.
[2] 虞致国,魏敬和.一种基于JTAG的SoC片上调试系统的设计[J].微电子学与计算机,2009,26(5):5-8.
[3] 姚霁.一种基于JTAG的片内调试系统设计[J].现代电子技术,2020,43(20):3.
[4] 金辉,华斯亮,张铁军,等.基于JTAG标准的处理器片上调试的分析和实现[J].微电子学与计算机,2007(6):116-119,122.
[5] 常志恒,肖铁军,史顺波.基于JTAG的片上调试器与调试系统的设计实现[J].计算机工程与应用,2012,48(30):78-82.[6] 肖哲靖,徐静平,雷青松,等.用于8051微控制器的片上调试系统的硬件设计[J].计算机与数字工程,2011,39(9):142-146.
[7] 高原,陈雅妮,胡广斌.基于CPLD单片机实验仿真器的设计[J].电子世界,2019(23):122-123.
[8] 张立新.一种微控制器的单线仿真装置.中国. CN202122323626.4 [P].2021-09-24.
[9] 张立新.微控制器的单线仿真装置和编码解码方法.中国. CN202111119963.X [P].2021-09-24.
[10] Keil Software.Implementing μVision2 Interface DLL’s to Hardware Debuggers,2003.
基金
*无锡学院科研启动费(2021r018); MCU单线仿真器项目(JSIC2021YY-02)。