Nuvoton Nu-Link Debug Adapter User Manual

1 Introduction

Nuvoton's Nu-Link Debug Adapter is a USB debugger and programmer based on the SWD (Serial Wire Debug) signal interface. It is applicable to the development of Nuvoton NuMicro® Family chips. There are four types of Nu-Link Debug Adapters with different specifications: Nu-Link-Pro, Nu-Link, Nu-Link-Me, and Nu-Link2-Me. These are collectively referred to as "Nu-Link Adapter" unless otherwise specified.

The Nu-Link Adapter supports ICP (In-Circuit Programming) via the SWD signal interface. Users can utilize the NuMicro® ICP Programming Tool to update chip firmware for mass production. The Nu-Link Adapter also supports third-party development tools such as Keil MDK, IAR EWARM, and NuEclipse GCC.

For clarity, specific terms in this manual are abbreviated as follows:

Short Name Full Name
Nu-Link Adapter Nuvoton Nu-Link Debug Adapter
NuMicro® Family Nuvoton NuMicro® Family
ICP Tool Nuvoton NuMicro® ICP Programming Tool
Keil MDK Keil ARM RealView Microcontroller Development Kit (MDK-ARM®)
IAR EWARM IAR Embedded Workbench for ARM
NuEclipse GCC NuEclipse Integrated Development Environment
SWD Serial Wire Debug
ICP In-Circuit Programming

2 Hardware Specifications

The Nu-Link Adapter features a USB connector and an SWD signal interface for connecting to the target chip. It allows users to connect to a PC's USB port to debug and program target chips using development software tools. Table 2-1 provides a comparison of the Nu-Link Adapter specifications, detailing supported functions like debugging, online/offline programming, and SWD I/O voltage settings.

Table 2-1 Nu-Link Adapter Function Comparison

Type Function Nu-Link-Pro Nu-Link Nu-Link-Me Nu-Link2-Me
Debugging
Online Programming
Offline Programming -
Multi SWD I/O Voltage ✓*1 ✓*2 - ✓*2
SWD I/O Voltage Support 1.8V, 2.5V, 3.3V, 5.0V 5.0V 3.3V (default), 5.0V 1.8V, 3.3V (default), 5.0V(*3)
Control Bus*4 - - *5
Virtual COM - - - ✓ (supported in versions later than V3.0)

*1 Adjusted by resistor JPR1.

*2 Adjusted by resistor ICEJPR1.

*3 The input supports 1.8V~5V, and the output only supports 1.8V~3.3V.

*4 The Nu-Link2-Me can be connected to an automatic IC programming system through the control bus.

*5 Control Bus for IC Programmer (Start, Busy, Pass, Fail).

2.1 Nu-Link-Pro

The Nu-Link-Pro is a full-featured debugger and programmer supporting debugging, online/offline programming, and SWD I/O voltage settings. It includes a USB port for computer connection, Status LEDs, an offline programming button, and an SWD port for target chip connection. The SWD port voltage is adjustable via software to 1.8V, 2.5V, 3.3V, or 5.0V. It also features SWD I/O voltage LEDs and SWD Power Output LEDs.

2.2 Nu-Link

The Nu-Link is a basic debugger and programmer with debugging and online/offline programming functions. It has a USB port for PC connection, Status LEDs, an offline programming button, and an SWD port for target chip connection. The default SWD port voltage is 5.0V.

2.3 Nu-Link-Me

The Nu-Link-Me is a simple debugger and programmer with debugging and online programming functions. It is typically shipped with NuTiny-SDK kits and can be used standalone for developing customized NuMicro® Family systems. It features a USB port, Status LEDs, a power switch to select between 3.3V and 5.0V (default 3.3V), and an SWD port for target chip connection with adjustable voltage.

2.4 Nu-Link2-Me

The Nu-Link2-Me is a simple debugger and programmer with debugging and online programming functions, often bundled with NuMaker kits. It supports offline programming via its 16 Mbit SPI Flash, allowing firmware updates without a PC. It also provides a virtual COM port (VCOM) for message output and can be separated from the NuMaker for use as a mass production programming tool.

2.5 Nu-Link Adapter Hardware Specifications

Table 2-2 summarizes the hardware specifications of the Nu-Link Adapters:

Table 2-2 Nu-Link Adapter Hardware Comparison

Device Description Nu-Link-Pro Nu-Link Nu-Link-Me Nu-Link2-Me
USB Connected to a PC USB port for using the adapter or downloading offline firmware.
SWD Connected to the target chip for debugging and programming.
Status LED Displays the operation status of the Nu-Link Adapter.
Offline Programming Button Allows initiating offline programming. -
SWD Power Output LED Displays the power output status of SWD VCC pins. - - -
SWD I/O Voltage LED Displays the SWD VCC and I/O voltage. - - -
Power Switch Switches power between SWD VCC and I/O pins. - - ✓*1 ✓*2

*1 Only supported in parts of the version (Supports 5V and 3.3V adjustable via resistor JPR1).

*2 MCUVCC Power Switch (ICEJPR1), ICEVCC Power Switch (ICEJPR2).

Table 2-3 SWD I/O Voltage LEDs and SWD Power Output LEDs Status List

Power Status Target System Power LED SWD I/O Voltage LED SWD Power Output
1.8V 2.5V 3.3V 5.0V
SWD port I/O and VCC voltage as 1.8V - On - - - On
SWD port I/O and VCC voltage as 2.5V - On On - - On
SWD port I/O and VCC voltage as 3.3V - On On On - On
SWD port I/O and VCC voltage as 5.0V - On On On On On
SWD port I/O voltage as 1.8V ✓(1.8V) On - - - -
SWD port I/O voltage as 2.5V ✓(2.5V) - On - - -
SWD port I/O voltage as 3.3V ✓(3.3V) - On On - -
SWD port I/O voltage as 5.0V ✓ (5.0V) - On On On -

Table 2-4 Status LEDs Difference List

Nu-Link Adapter Operation Status Status LED
ICE ICP Red Green
Boot Flash×3 Flash×3 Flash×3 Flash×3
One Nu-Link Adapter selected to connect Flash×4 Flash×4 Flash×4 Flash×4
ICE Online (Not connected with a target chip) On Any Any On
ICE Online (Connected with a target chip) On Any - On
ICE Online (Failed to connect with a target chip) On Any Flash On
During Offline Programming On - Flash Slowly -
Offline Programming Completed On - - -
Offline Programming Completed (Auto mode) On On - -
Offline Programming Failed On Flash - -

3 Main Functions

The Nu-Link Adapter offers comprehensive debugging and programming functionalities for the NuMicro® Family, supporting various third-party development tools. Table 3-1 details the function support across different software.

Table 3-1 Nu-Link Adapter Functions

Function ICP Tool Keil MDK IAR EWARM NuEclipse GCC
Debugging
Breakpoints
Direct Register Control Interface ✓*1
Semihost
Online Programming
Offline Programming*2 - - -
Software Serial Number - - -
Wide Voltage Programming*3 -
Multi Nu-Link Adapter Support - -
Nu-Link Adapter Driver Installation - -

*1 Core registers view is supported; peripherals view is not supported.

*2 Supported for Nu-Link, Nu-Link-Pro, and Nu-Link2-Me.

*3 Supported for Nu-Link-Pro.

3.1 Debugging

This section describes the debugging functions supported by the Nu-Link Adapter. Refer to related user manuals for more details.

3.1.1 Debug Mode

The Nu-Link Adapter supports debugging for NuMicro® Family chips using the SWD signal interface. Supported third-party tools include Keil MDK, IAR EWARM, and NuEclipse GCC. Further Debug mode functions are described below.

3.1.2 Breakpoints

In Debug mode, users can set breakpoints in the code. During real-time simulation, the chip simulation halts at a specified breakpoint. Figure 3-1 illustrates breakpoint settings in Keil MDK Debug mode, with red labels indicating breakpoints and a yellow arrow showing the next instruction to execute, along with the Program Counter (PC) register value.

Figure 3-1 Setting Breakpoints in Keil MDK Debug Mode

3.1.3 Direct Register Control Interface

The Direct Register Control Interface allows viewing and manipulating register contents on a target chip. In Keil MDK Debug mode, users can access this interface by invoking the Debug command and selecting a register from the "function register list" (e.g., ADC, CAN, CLK). Figure 3-2 shows the options for the Direct Register Control Interface.

Figure 3-2 Direct Register Interface Control Related Options in Keil MDK Debug Mode

The Direct Register Control Interface for CLK displays register address, name, and value. For PWRCON, it shows function bits, names, and values. Double-clicking a "register value" opens detailed control options, as seen in the right part of Figure 3-3. Hovering over a "register name" or "control value" provides tooltips, and values can be directly modified to update the target chip.

Figure 3-3 Direct Register Control Interface in Keil MDK Debug Mode

3.1.4 Semihost

The Semihost function allows outputting messages from the NuMicro® Family microcontroller to the debug window via UART, without using GPIO. Figure 3-4 displays these debug messages in the "UART #1" form.

To use Semihost (example with Keil MDK and M031AE series):

  1. Modify strings in "startup_NUC1xx.s": Change SEMIHOSTED SETL {FALSE} to SEMIHOSTED SETL {TRUE}.
  2. Modify strings in "system_NUC1xx.h": Add #define DEBUG_ENABLE_SEMIHOST.
  3. Rebuild the project and enter Debug mode.
  4. In Debug mode, navigate to View → Serial Windows → UART #1.
  5. Press F5 to program the target chip; debug messages will appear in the UART #1 form.

Figure 3-4 Semihost Options in Keil MDK Debug Mode

3.2 Programming

This section briefly describes the programming functions supported by the Nu-Link Adapter. Refer to related user manuals for more details.

3.2.1 Online Programming

Online Programming enables the Nu-Link Adapter to download firmware to the NuMicro® Family chip through software programs, as illustrated in the flow diagram in Figure 3-5.

Figure 3-5 Online Programming Flow Diagram

3.2.2 Offline Programming

Offline Programming allows the Nu-Link Adapter to update firmware directly without software programs, as shown in Figure 3-6. This method is efficient for mass production as it doesn't require delivering the original code or firmware file. The Nu-Link Adapter also supports "Limited Offline Programming" to control the authorized number of firmware copies.

Figure 3-6 Offline Programming Flow Diagram

3.2.3 Software Serial Number (SN)

The ICP Tool's Software Serial Number (SN) function lets users specify values for "Increase SN from" and "Write address in flash" during programming. For example, with the NUC140VE3CN chip, users can set an SN and its write address in APROM, LDROM, or Data Flash, and the SN will auto-increment, as shown in Figure 3-7.

Figure 3-7 Software Serial Number (SN) Settings

3.3 Wide Voltage Programming

The Nu-Link-Pro supports wide voltage programming, allowing adjustment of the SWD port voltage to 1.8V, 2.5V, 3.3V, or 5.0V. Controlled pins include VCC, ICE_DAT, ICE_CLK, and /RESET, as shown in Figure 4-2. The Nu-Link-Pro also has SWD I/O Voltage LEDs and SWD Power Output LEDs for voltage status indication (refer to Table 2-3).

The Nu-Link-Me adjusts SWD port voltage via resistor JPR1 to 3.3V or 5.0V. Controlled pins include VCC, ICE_DAT, ICE_CLK, /RESET, ICE_RX, and ICE_TX, as shown in Figure 4-2.

The Nu-Link2-Me uses resistor ICEJPR1 to adjust SWD port voltage to 1.8V, 3.3V, or 5.0V. Controlled pins include VCC, ICE_DAT, ICE_CLK, /RESET, ICE_RX/PASS, ICE_TX/Fail, BUSY, and START, as shown in Figure 4-2.

3.4 Installing the Nu-Link Adapter Driver

The Nu-Link Adapter supports various functions and third-party tools like Keil MDK and IAR EWARM. After installing the software, drivers are required. Download links for the Nu-Link Adapter Driver for Keil MDK and Nu-Link Adapter Driver for IAR EWARM are provided for installing the latest version. Refer to section 4.2 for software setup details.

4 Installation and Setup

This chapter guides on connecting the Nu-Link Adapter to a computer and configuring third-party tools to use it as a debugger and programmer.

4.1 Connecting to the Nu-Link Adapter

The Nu-Link Adapter acts as a bridge between USB and the SWD interface, enabling software tools to debug and program target chips via USB. Connect the adapter to a PC's USB port directly or via a USB connector. The adapter can supply power (1.8V, 2.5V, 3.3V, or 5.0V) to the target circuit board, with a maximum of 5V/500mA. Refer to Table 2-1 for specifications.

Figure 4-1 Nu-Link Adapter Connection Diagram

SWD Connector:

The SWD connector is a 100 mil (2x5) female header, compatible with all NuMicro® development tools and evaluation boards. Figure 4-2 shows the SWD connector pin diagrams for Nu-Link-Pro, Nu-Link-Me, and Nu-Link2-Me.

Figure 4-2 SWD Connector Pin Diagrams

4.2 Software Setup

This section outlines the necessary software settings for connecting the Nu-Link Adapter. Refer to user manuals for detailed software operations.

4.2.1 ICP Tool

  1. Download and install the Nuvoton NuMicro® ICP Programming Tool.
  2. Open the ICP Tool, select the UI language and target chip, then click Continue (Figure 4-3).

Figure 4-3 Startup Screen of ICP Tool

The ICP Tool's connection status is "Disconnected" until the Nu-Link Adapter is connected (Figure 4-4).

Figure 4-4 ICP Tool Main Window

  1. Click Option in the Program section of the ICP Tool Window to open the Program Option form (Figure 4-5).
  2. In the Nu-Link Pro IO Voltage section, specify the SWD port power voltage for the target chip and click OK. Select the Offline Programming mode option if needed (Figure 4-5).

Figure 4-5 ICP Tool Programming Options

  1. Return to the ICP Tool window and click Connect. If multiple Nu-Link Adapters are connected, proceed to Step 5; otherwise, proceed to Step 6.
  2. If two Nu-Link Adapters are connected, a message prompts to select one. Clicking OK connects the selected adapter. The Status LED blinks during connection. Refer to Table 2-4 for blinking details.

Figure 4-6 Select One Nu-Link Adapter

  1. After clicking Connect, the ICP Tool connects to the Nu-Link Adapter, and an SWD port is detected. Figure 4-7 shows a connected adapter with a detected target chip, allowing programming.

Figure 4-7 Nu-Link Adapter Connected with a Target Chip Detected

  1. Figure 4-8 shows the ICP Tool connected to the Nu-Link Adapter with no target chip detected. The ICP tool continues detection until Stop Check is clicked. Chip programming is not possible, but offline programming can save data to the Nu-Link Adapter.

Figure 4-8 Nu-Link Adapter Connected with No Target Chip Detected

  1. Click Disconnect (Figure 4-7) or Stop Check (Figure 4-8) to disconnect the ICP Tool and leave the Nu-Link Adapter unused, allowing it to be connected to another tool.

4.2.2 Keil MDK

  1. Install Keil MDK. Ensure the Nu-Link Adapter Driver for Keil MDK is downloaded and installed so Keil MDK can recognize the Nu-Link Adapter.
  2. Open Keil MDK and the project to be configured.
  3. Debugger Settings: Invoke Project → Options for Target → Output, and enable the Debug Information option (Figure 4-9).

Figure 4-9 Enable Debug Information for Keil MDK

  1. Invoke Project → Options for Target → Debug, and select the "Nuvoton Nu-Link M0 Debugger" option (Figure 4-10).

Figure 4-10 Keil MDK Debugger Selection

  1. Click the Settings button to open the Debug form (Figure 4-11). Refer to Table 4-1 for setting descriptions. Options may vary based on the Nu-Link Adapter type.

Figure 4-11 Nu-Link Adapter Parameter Settings

Table 4-1 Debugger Function Settings Description

Debug Function Description
Driver Version Displays the Nu-Link Adapter driver version on the host.
Chip Type Specifies the target chip type.
Reset Select "Auto detect" to reset the target chip.
IO Voltage Specifies the SWD port I/O voltage for the target chip (options: 1.8V, 2.5V, 3.3V, 5V).

Programmer Settings:

  1. Invoke Project → Options for Target → Utilities. Enable "Use Target Driver for Flash Programming" and select "Nuvoton Nu-Link M0 Debugger". Then, select the "Update Target before Debugging" option (Figure 4-12).

Figure 4-12 Keil MDK Programmer Selection

  1. Click the Settings button to open the Flash Download form, where users can specify pre- or post-programming options with the Nu-Link Adapter (Figure 4-13).

Figure 4-13 Nu-Link Adapter Programming Settings

4.2.3 IAR EWARM

  1. Install IAR EWARM. Ensure the Nu-Link Adapter Driver for IAR EWARM is installed for recognition by IAR EWARM.
  2. Open IAR EWARM and the project.
  3. In the Target tab of the General Options page (Project → Options), click the Device option's button and select "Nuvoton → Nuvoton M031AE series" as the target chip (Figure 4-14 and Figure 4-15).

Figure 4-14 Options Selection

Figure 4-15 IAR EWARM Target Chip Selection

Debugger and Programmer Settings:

  1. In the Setup tab of the Debugger page, select "Third-Party Driver" as the driver (Figure 4-16).

Figure 4-16 Set IAR EWARM as Third-Party Driver for Debugger & Programmer

  1. In the Download tab of the Debugger page, ensure the "Use flash loader(s)" option is selected (Figure 4-17).

Figure 4-17 IAR EWARM Programming Settings

  1. In the Download tab, select "Override default board file" if firmware needs to be downloaded to APROM or LDROM. Specify the board file (e.g., NUC100_APROM.board) or the path "$TOOLKIT_DIR$\config\flashloader\Nuvoton\" if the file is not found (Figure 4-18).

Figure 4-18 Select.board File for IAR EWARM

Driver Plugin File Settings:

  1. In the Third-Party Driver page, specify the path of the IAR debugger driver plugin: "C:\Program Files\Nuvoton Tools\Nu-Link_IAR\Nu-Link_IAR.dll" (Figure 4-19).

Figure 4-19 Set the Path of the IAR EWARM Debugger Driver Plugin

  1. Click OK to save settings and return to the IAR EWARM main window.
  2. Invoke Nu-Link, select SWD as the Port, and specify the Nu-Link-Pro I/O Voltage in the Target power control section (e.g., 3.3V) (Figure 4-20).

Figure 4-20 Specify the Port and Target I/O Voltage

4.2.4 NuEclipse GCC

  1. Install NuEclipse GCC (no driver installation required).
  2. Open NuEclipse GCC and the project. Refer to UM_NuEclipse_EN for details.

Debugger Settings:

  1. In debug mode, prepare a debug configuration. Click Run > Debug Configuration... to open the dialog. Double-click the GDB Nuvoton NuLink Debugging group. The Nuvoton Nu-Link debug configuration appears. In the Main tab, ensure the Project name matches and the C/C++ Application points to the .elf file. If incorrect, select the project, build it, and verify the executable's existence before repeating (Figure 4-21).

Figure 4-21 NuEclipse GCC Debug Configuration

Programmer Settings:

  1. The Debugger tab configures OpenOCD and GDB Client setup. OpenOCD requires configuration files for adapters and target chips. Nuvoton's adapter is Nu-Link, using "nulink.cfg". Nuvoton supports M0, M4, and M23 ARM families with corresponding configuration files (numicroM0.cfg, numicroM4.cfg, numicroM23.cfg). For M0 2nd development, use numicroM0_NS.cfg (Figure 4-22).

Figure 4-22 Configuring the Debugger Tab

  1. In the Startup tab, select the correct Chip Series. The corresponding target configuration file is written to the Debugger tab's Config options. Check "Load executable to flash" or "Load executable to SRAM" as needed. Click Apply to save settings and Debug to launch the application (Figure 4-23).

Figure 4-23 Configuring the Startup Tab

5 +Appendix

5.1 Nu-Link Adapter Operating Current

Table 5-1 shows the operating current of the Nu-Link Adapter when powered via USB during online programming.

Table 5-1 Nu-Link Adapter Operating Current (Online Programming)

Parameter Type Nu-Link-Pro Nu-Link Nu-Link-Me Nu-Link2-Me
5.0V 3.3V 2.5V 1.8V 5.0V 3.3V 2.5V 5.0V 3.3V 1.8V
SWD I/O Mode Settings - 5.0V 3.3V 2.5V 1.8V 5.0V 5.0V 5.0V 5.0V 5.0V 5.0V
SWD I/O Voltage (V) 5.06 3.34 2.54 1.83 4.77 4.79 3.37 5.06 3.34 1.8
USB Input Current (mA) 101 92 88 84 110 74 80 101 99 91

Table 5-2 shows the operating current of the Nu-Link Adapter when powered from a target board (SWD VCC pin) during offline programming.

Table 5-2 Nu-Link Adapter Operating Current (Offline Programming)

Parameter Type Nu-Link-Pro Nu-Link
5.0V 3.3V 2.5V 1.8V 5.0V 3.3V 2.5V
Power Supplied from a Target Board - Off Off Off Off Off Off Off
Power Supplied via an USB - - - - - - - -
SWD VCC Input Voltage (V) 5.00 3.30 2.50 1.80 5.00 3.30 2.50
SWD VCC Input Current (mA) 64 86 117 171 100 77 62

5.2 Automatic IC Programming System

The automatic IC programming system utilizes individual slots and a control bus, as depicted in Figure 5-1.

Figure 5-1 SWD Connector Pin Diagrams

5.2.1 Operation sequence and Waveform

  1. Nu-Link2-ME powers on. START, BUSY, PASS, and FAIL are set to logic.
  2. To start programming, START must be logic 0 for TSTART, where 50ms ≤ TSTART ≤ 80ms.
  3. During programming startup, BUSY is logic 0 and may toggle.
  4. Upon completion, BUSY becomes logic 1. PASS or FAIL indicates the result:
    • BUSY=1 and PASS=0 indicates "PASS".
    • BUSY=1 and FAIL=0 indicates "FAIL".

Figure 5-2 PASS Waveform

Figure 5-3 FAIL Waveform

6 Revision History

Revision Description Date
V1.00 Preliminary version 2012/07/16
V1.01 Delete Nu-Link-Me (On-board Version), Add Nu-Link2-Me. 2019/10/24
Models: Nu-Link Debug Adapter, Debug Adapter, Nu-Link Adapter, Adapter

File Info : application/pdf, 33 Pages, 2.16MB

PDF preview unavailable. Download the PDF instead.

resource-download

References

iText 5.5.6 ©2000-2015 iText Group NV (AGPL-version)

Related Documents

Preview Nuvoton ICP Tool Revision History - Software Updates and Supported Devices
Comprehensive revision history for the Nuvoton ICP Programming Tool, detailing software updates, bug fixes, and support for various NuMicro microcontroller families and part numbers.
Preview Nuvoton ICP Programming Tool User Manual
Comprehensive user manual for the Nuvoton ICP Programming Tool, detailing its features, operation modes, binary code protection, firmware updates, and support for NUC505 series microcontrollers.
Preview Nu-LB-Mini51 User Manual: ARM Cortex-M0 Microcontroller Development Tool
User manual for the Nuvoton Nu-LB-Mini51 development tool, featuring the ARM Cortex-M0 microcontroller. Covers introduction, setup for Keil uVision and IAR Embedded Workbench, schematics, and software downloads.
Preview Nu-Link Driver for IAR EWARM Revision History
This document details the revision history of the Nu-Link Driver for IAR EWARM, including supported devices and software updates.
Preview Nuvoton Nu-Link Driver for Keil MDK Revision History - Updates & Supported Devices
Detailed revision history for the Nuvoton Nu-Link Driver for Keil MDK, outlining software updates, new microcontroller support, and feature enhancements for embedded development with Nuvoton's NuMicro series.
Preview 新唐科技 2021 车用与工业物联网峰会 - 产品与解决方案概览
Nuvoton Technology 2021 Roadshow 演示文稿,详细介绍了公司在车用技术和工业物联网(IoT)领域的最新创新和解决方案。内容涵盖 NuMicro 微控制器系列、汽车平台应用、工业物联网技术、飞行时间(ToF)传感器和电池管理IC(BM-IC)等。
Preview Nuvoton Smart Home and Office Solutions
Explore Nuvoton's innovative solutions for smart homes and offices, featuring advanced microcontrollers like the NuMicro M254/M256/M258 series, M031BT/M032BT BLE MCUs, and M031G series for 5G applications. Discover how Nuvoton technology enhances IoT integration, unified communications, and audio experiences.
Preview Nuvoton 2025 Product Selection Guide: Microcontrollers & More
Explore the comprehensive Nuvoton 2025 Product Selection Guide, featuring a wide range of microcontrollers including Arm Cortex-M, Arm9, and 8051 families, alongside solutions for AI, IoT, automotive, and industrial applications. Discover Nuvoton's innovative semiconductor offerings.