A design method of embedded OCD (On-Chip Debugging) based on Intel 8051 MCU architecture is proposed. The OCD module named E-OCD-SFR_B (Enhanced OCD module with SFR(Special Function Register) Breakpoint Function) is integrated into an existing MCU core, implementing several debugging function. The method we proposed is able to switch from running mode and debugging mode conveniently by controlling the debugging enable port and also enables controlling the MCU core in debugging mode by additional SFR. The function of SFR breakpoint is added, so we could trace the particular SFR, this is the reinforcement to the exiting OCD methods. The principles of E-OCD-SFR_B and detailed implemental method and simulation solution based on EDA platform are presented and validated. The simulation result indicates the completely observing and controlling to the core is achieved without any effect to original functions of the system.
展开▼