1. The products described in this manual and the specifications thereof may be changed without prior notice.
To obtain up-to-date information and/or specifications, contact your Fujitsu sales representative or Fujitsu
authorized dealer.
2. Fujitsu will not be liable for infringement of copyright, industrial property right, or other rights of a third party
caused by the use of information or drawings described in this manual.
3. The contents of this manual may not be transferred or copied without the express permission of Fujitsu.
4. The products contained in this document are not intended for use with equipments which require extremely
high reliability such as aerospace equipments, undersea repeaters, nuclear control systems or medical
equipment for life support.
5. Some of the products described in this manual may be strategic materials (or special technology) as defined
by the Foreign Exchange and Foreign Trade Control Law. In such cases, the products or portions theory
must not be exported without permission as defined under the law.
This application note describes how to use DBG pin. The DBG pin can be used as 1-line
UART communication port in debug mode and can be used as P12/EC0 in free-run mode.
MCU-AN-500009-E-10 – Page 4
Page 5
DBG pin operation V1.0
Chapter 2 Functions of DBG pin
2 Functions of DBG pin
THE FUNCTIONS OF DBG PIN IN DIFFERENT MODES
2.1 DBG pin hardware connection (debug mode)
Figure 2-1 DBG pin hardware connection in debug mode
2.2 Performance in debug mode
If target MCU enter into debug mode, DBG pin performs as 1-line UART pin. To make sure
the real time communication with BGM Adapter, other functions in this pin are disabled.
P12 function is disabled. Any operation for P12 in user code has no effective.
EC0 function is also disabled in this pin. But there is another pin can be used as EC0 pin.
Write “1” to SYSC [EC0SL] can select P04/EC0 pin as external counter clock input. But do
not set EC0 input and HCLK1 input from P04 pin at the same time.
2.3 Performance in free-run mode
If target MCU enter into free-run mode, 1-line UART function is disabled. P12/EC0 functions
can be used by user code. But the DBG pin can not be set as 1-line UART pin by user code.
MCU-AN-500009-E-10 – Page 5
Page 6
DBG pin operation V1.0
T00CR1 =
0
x81
; // enable output, start timer00
.
T00CR1 =
0x81
; // enable output, start timer00
.
Chapter 3 How to Use DBG Pin
3 How to Use DBG Pin
EXAMPLES FOR DBG PIN SETTING IN DIFFERENT MODE
3.1 Used as 1-line UART pin / P12 pin
In Debug mode, DBG pin is used as 1-line UART pin automatically. Then DBG pin keeps
high when UART is in idle status. And in free-run mode, DBG pin is used as P12 according
to default setting. If write user code as follow:
DDR1_D12 = 1; // set P12 as output pin
PDR1_P12 = 0; // pull P12 to low.
After execute these codes in debug mode, the DBG pin still keeps high level. But after run
these codes in free-run mode, the DBG pin pulls to low level.
3.2 Used as EC0 pin
DBG pin can’t be used as EC0 pin in debug mode. To realize the external clock input for the
8/16 compound timer, EC0 pin can be changed to P04 pin in debug mode.
The upper sample code sets P04 as EC0 pin, and sets Timer00 in continuous interval timer
mode. Input a clock signal to P04 pin; execute these codes in debug mode; check the T00
pin; you can see the output clock is the input clock divided by 8.
The upper sample code sets P12 as EC0 pin, and sets Timer00 in continuous interval timer
mode. Input a clock signal to P12 pin; run these codes in free-run mode, check the T00 pin,
you can see the output clock is the input clock divided by 8.
MCU-AN-500009-E-10 – Page 6
Page 7
DBG pin operation V1.0
Chapter 4 Precautions in using DBG pin
4 Precautions in using DBG pin
1. The peripheral circuit connected to DBG pin shouldn’t influence the 1-line UART
communication if using BGM Adapter to do debug. Please refer to figure 2-1 when design
user board.
2. It is recommended that set P12 as input pin or output low in user code when doing debug.
Do not set P12 to output high. Because if set P12 output high, DBG pin will output high when
target MCU runs in free-run mode. And if target board is connected with BGM adapter in this
condition, a large current will run through DBG pin when BGM adapter transports bit “0” with
1-line UART pin.