
MS51
Dec. 17, 2019
Page
191
of 316
Rev 1.01
M
S51
SE
RIES
TE
CHNICA
L REF
ERE
N
CE MA
NU
A
L
programmed as 1, the OCD is activated. The OCD cannot operate if chip is locked. The OCD system
uses a two-wire serial interface, OCDDA and OCDCK, to establish communication between the target
device and the controlling debugger host. OCDDA is an input/output pin for debug data transfer and
OCDCK is an input pin for synchronization with OCDDA data. The
̅̅̅̅̅̅̅̅̅̅̅
pin is also necessary for
OCD mode entry and exit. The MS51 supports OCD with Flash Memory control path by ICP writer
mode, which shares the same three pins of OCD interface.
The MS51 uses OCDDA, OCDCK, and nRESET pins to interface with the OCD system. When
designing a system where OCD will be used, the following restrictions must be considered for correct
operation:
1. nRESET cannot be connected directly to V
DD
and any external capacitors connected must be
removed.
2. All external reset sources must be disconnected.
3. Any external component connected on OCDDA and OCDCK must be isolated.
Limitation of OCD
6.3.3.1
The MS51 is a fully-featured microcontroller that multiplexes several functions on its limited I/O pins.
Some device functionality must be sacrificed to provide resources for OCD system. The OCD has the
following limitations:
1. The nRESET pin to be used for OCD mode selection.
2. The OCDDA pin is physically located on the same pin P5.0. Therefore, neither its I/O function nor
shared multi-functions can be emulated.
3. The OCDCK pin is physically located on the same pin as P5.1. Therefore, neither its I/O function
nor shared multi-functions can be emulated.
4. When the system is in Idle or Power-down mode, it is invalid to perform any accesses because
parts of the device may not be clocked. A read access could return garbage or a write access might
not succeed.
5. HIRC cannot be turned off because OCD uses this clock to monitor its internal status. The
instruction that turns off HIRC affects nothing if executing under debug mode. When CPU enters its
Power-down mode under debug mode, HIRC keeps turning on.
The MS51 OCD system has another limitation that non-intrusive commands cannot be executed at
any time while the user’s program is running. Non-intrusive commands allow a user to read or write
MCU memory locations or access status and control registers with the debug controller. A reading or
writing memory or control register space is allowed only when MCU is under halt condition after a
matching of the hardware address breakpoint or a single step running.
CONFIG0
7
6
5
4
3
2
1
0
CBS
-
OCDPWM
OCDEN
-
-
LOCK
-
R/W
-
R/W
R/W
-
-
R/W
-
Factory default value: 1111 1111b
Bit
Name
Description
5
OCDPWM
PWM output state under OCD halt
This bit decides the output state of PWM when OCD halts CPU.
1 = Tri-state pins those are used as PWM outputs.
0 = PWM continues.