26
M031/M032 Jan 28, 2019 Page 1 of 26 Rev 1.00 NUTINY-SDK-M031 USER MANUAL ARM ® Cortex ® - M 32-bit Microcontroller NuMicro ® Family NuTiny-SDK-M031TC User Manual The information described in this document is the exclusive intellectual property of Nuvoton Technology Corporation and shall not be reproduced without permission from Nuvoton. Nuvoton is providing this document only for reference purposes of NuMicro ® microcontroller based system design. Nuvoton assumes no responsibility for errors or omissions. All data and specifications are subject to change without notice. For additional information or questions, please contact: Nuvoton Technology Corporation. www.nuvoton.com

NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 1 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

ARM® Cortex

®- M

32-bit Microcontroller

NuMicro® Family

NuTiny-SDK-M031TC

User Manual

The information described in this document is the exclusive intellectual property of Nuvoton Technology Corporation and shall not be reproduced without permission from Nuvoton.

Nuvoton is providing this document only for reference purposes of NuMicro® microcontroller based system

design. Nuvoton assumes no responsibility for errors or omissions.

All data and specifications are subject to change without notice.

For additional information or questions, please contact: Nuvoton Technology Corporation.

www.nuvoton.com

Page 2: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 2 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Table of Contents

1 OVERVIEW ......................................................................................... 4

2 NUTINY-SDK-M031TC INTRODUCTION ...................................................... 5

NuTiny-SDK-M031TC Jumper Description ........................................................ 6 2.1

2.1.1 Power Setting ................................................................................................... 6

2.1.2 Debug Connector ............................................................................................... 6

2.1.3 USB Connector ................................................................................................. 6

2.1.4 Extended Connector ........................................................................................... 6

2.1.5 Reset Button ..................................................................................................... 6

2.1.6 Power Connector ............................................................................................... 6

2.1.7 Offline programming botton ................................................................................... 6

2.1.8 VCOM Enable ................................................................................................... 7

Pin Assignment for Extended Connector .......................................................... 9 2.2

NuTiny-SDK-M031TC PCB Placement ........................................................... 11 2.3

3 How to Start NuTiny-SDK-M031TC on the Keil μVision® IDE ............................ 12

Keil uVision® IDE Software Download and Install ............................................... 12 3.1

Nuvoton Nu-Link Driver Download and Install ................................................... 12 3.2

Hardware Setup ....................................................................................... 12 3.3

Example Program ..................................................................................... 13 3.4

4 How to Start NuTiny -SDK-M031 on the IAR Embedded Workbench ................... 14

IAR Embedded Workbench Software Download and Install ................................... 14 4.1

Nuvoton Nu-Link Driver Download and Install ................................................... 14 4.2

Hardware Setup ....................................................................................... 14 4.3

Example Program ..................................................................................... 14 4.4

5 Starting to Use Nu-Link2-Me VCOM Function ............................................... 16

Downloading and Installing VCOM Driver ........................................................ 16 5.1

VCOM Mode Setting on NuTiny-SDK-M031TC .................................................. 17 5.2

Setup on the Development Tool .................................................................... 17 5.3

5.3.1 Check the Using UART on the Keil μVision® IDE........................................................ 17

5.3.2 Check the Target Device and Debug Setting ............................................................ 18

5.3.3 Build and Download Code to NuTiny-SDK-M031TC .................................................... 20

5.3.4 Open the Serial Port Terminal .............................................................................. 20

5.3.5 Reset Chip ..................................................................................................... 20

6 NuTiny-SDK-M031TC Schematic ............................................................. 22

Page 3: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 3 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

NuTiny-SDK-M031TC Schematic .................................................................. 22 6.1

GPIO for 33 pin Schematic .......................................................................... 23 6.2

Nu-Link2-Me V3.0 Schematic ............................. Error! Bookmark not defined. 6.3

7 REVISION HISTORY ............................................................................ 25

Page 4: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 4 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

1 OVERVIEW

NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031 series. User can use

NuTiny-SDK-M031TC to develop and verify the application program easily.

NuTiny-SDK-M031TC includes two portions. One is NuTiny-SDK-M031TC and the other is Nu-Link2-Me. NuTiny-SDK-M031TC is the evaluation board and Nu-Link2-Me is its Debug Adaptor. Thus, user does not need other additional ICE or debug equipment.

The Nuvoton® Arm

® Cortex

®-M0 NuMicro

® M031/M032 series MCU features 1.8 ~ 3.6V operating

voltage, running up to 48 MHz, and provides a good solution for the applications that need low-voltage interface connection operation. This product can be applied to mobile devices, application processor connected peripheral controllers, IoT sensor devices, motor control, industrial control, and consumer devices.

NuMicro® M031/M032 series provide 16 channels of 12-bit ADC with up to 2Msps high conversion

rate and the PWM with 96 MHz high performance interface which sourced from PLL clock for the requirement of precise, high response of volatge or current and mass processing data market.

Besides, NuMicro® M031/M032 series also provide up to 3 sets of UART interface for connecting

more extended modules in the application such as networking or sensor modules.

The functions of NuMicro® M032 series are all based on M031 and enhanced with USB 2.0 full-

speed device feature to provide more possibilities of USB related application.

In breif, the NuMicro® M031/M032 series support the wide voltage range from 1.8V to 3.6V and

temperature ranging from -40°C to 105°C, up to 128 Kbytes of Flash memory, up to 16 Kbytes of

SRAM, up to 8 Kbytes of ISP (In-System Programming) as well as ICP (In-Circuit Programming) and IAP (In-Application Programming) in LQFP64, LQFP48, QFN33, TSSOP28 or TSSOP20 packages. It also supports high immunity of 4KV ESD (HBM)/4.4KV EFT. It is also equipped with plenty of peripherals such as Timers, Watchdog Timers, UART, SPI, I²C, USCI, PDMA, EBI, GPIO, up to 12 channels of 16-bit PWM, up to 16 channels of 12-bit ADC, USB device, low voltage reset, brown-out detector, 96-bit UID (Unique Identification), and 128-bit UCID (Unique Customer Identification).

Page 5: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 5 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

2 NUTINY-SDK-M031TC INTRODUCTION

NuTiny-SDK-M031TC uses the M031TC1AE as the target microcontroller. Figure 2-1 is NuTiny-SDK-M031TC for M031 series, the left portion is called NuTiny-SDK-M031TC and the right portion is Debug Adaptor called Nu-Link2-Me.

NuTiny-SDK-M031TC is similar to other development boards. Users can use it to develop and verify applications to emulate the real behavior. The on board chip covers M031 series features. The NuTiny-SDK-M031TC can be a real system controller to design user’s target systems.

Nu-Link2-Me is a Debug Adaptor. The Nu-Link2-Me Debug Adaptor connects your PC's USB port to your target system (via Serial Wired Debug Port) and allows you to program and debug embedded programs on the target hardware. The Nu-Link2-Me also supports VCOM function, which gives users more flexibility when debug. To use Nu-Link2-Me Debug adaptor with IAR or Keil, please refer to “Nuvoton NuMicro

® IAR ICE driver user manual “or Nuvoton NuMicro

® Keil

ICE driver user manual” in detail. These two documents will be stored in the local hard disk when the user installs each driver. To use Nu-Link2-Me VCOM function, please refer to Chapter 5.

Reset Botton

(SW1)

I/O LED

Power LED

Extended Connector

(JP3/JP6)

ICE Controller

USB Connector

(ICE J1)

ICE ControllerTarget Chip

MCUVCC:

1.8V, 3.3V or 5V

(JPR1)

VDD

(JP1)

GND

(JP2)

VCOM

Enable

Extended Connector

(JP4/JP5)

ICEVCC:

1.8V or 3.3V

(JPR1)

Offline

Programming

Button

Figure 2-1 NuTiny-SDK-M031TC (PCB Board)

Page 6: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 6 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

NuTiny-SDK-M031TC Jumper Description 2.1

2.1.1 Power Setting

ICEJ3: USB port in Nu-Link2-Me ICEJPR1: Configures the MCU operating voltage at 1.8V / 3.3V / 5V ICEJPR2: Configures the ICE(Nu-Link2-Me) operating voltage at 1.8V / 3.3V JP1: VDD Voltage connecter in NuTiny-SDK-M031TC

Model ICEJ3 USB

port ICEJPR1

(MCUVCC) ICEJPR2 (ICEVCC)

JP1 VDD MCU

Voltage ICE Chip Voltage

Model 1 Connect to

PC Select 1.8V Select 1.8V

DC 1.8V output

DC 1.8V DC 1.8V

Model 2 Connect to

PC Select 3.3V

(default) Select 3.3V

(default) DC 3.3V output

DC 3.3V DC 3.3V

Model 3 Connect to

PC Select 5V

Select 3.3V (default)

DC 5V output

DC 5V DC 3.3V

Model 4 X X Select 3.3V

(default) DC 1.8 V ~ 3.3 V Input

Voltage by J5 input

DC 3.3V

X: Unused.

Note: Don’t configure the MCU operating voltage to 5V because the operating voltage of the M031 series is 1.8V~3.3V.

2.1.2 Debug Connector

J1: Connector in target board (NuTiny-SD K-M031TC) for connecting with Nuvoton ICE adaptor (Nu-Link2-Me)

ICEJ4: Connector in ICE adaptor (Nu-Link2-Me) for connecting with a target board (for example NuTiny-SDK-M031TC)

2.1.3 USB Connector

ICEJ3: Micro USB Connector in Nu-Link2-Me connected to a PC USB port

2.1.4 Extended Connector

JP3, JP4, JP5, JP6: Show all chip pins in NuTiny-SDK-M031TC

2.1.5 Reset Button

SW1: Reset button in NuTiny-SDK-M031TC

2.1.6 Power Connector

JP1: VDD connector in NuTiny-SDK-M031TC JP2: GND connector in NuTiny-SDK-M031TC

2.1.7 Offline Programming Botton

ICESW1: Offline programming button in NuTiny-SDK-M031TC

Page 7: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 7 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

2.1.8 VCOM Enable

ICESW2: VCOM function enable for NuTiny-SDK-M031TC. Switch ICESW2 on before power on to enable VCOM function. ICESW2 connects pin 31(PB.12/RXD) and pin 30(PB.13/TXD) in NuTiny-SDK-M031TC with pin 22(PB.1/TXD) and pin 21(PB.0/RXD) in Nuvoton ICE adaptor (Nu-Link2-Me).

Page 8: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 8 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Switch Pin Number

Function Name UART0 Mode VCOM Mode ICESW2

1 ICE_TX/MCU_RX Off On

2 ICE_RX/MCU_TX Off On

3 X X X

4 X X X

X: Unused.

Page 9: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 9 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Pin Assignment for Extended Connector 2.2

NuTiny-SDK-M031TC provides M031TC1AE on board and the extended connector (JP3, JP4, JP5 and JP6) for QFN-33 pin. Table 2-1 is the pin assignment for M031TC1AE.

Pin No Pin Function

1

PB.5/ADC0_CH5/I2C0_SCL/PWM0_CH0/UART2_TXD/TM0/INT0

2 PB.4/ADC0_CH4/I2C0_SDA/PWM0_CH1/UART2_RXD/TM1/INT1

3 PB.3/ADC0_CH3/I2C1_SCL/UART1_TXD/PWM0_CH2/PWM0_BRAKE0/TM2/INT2

4 PB.2/ADC0_CH2/I2C1_SDA/UART1_RXD/PWM0_CH3/TM3/INT3

5 PB.1/ADC0_CH1/UART2_TXD/I2C1_SCL/PWM0_CH4/PWM0_BRAKE0

6 PB.0/ADC0_CH0/UART2_RXD/SPI0_I2SMCLK/I2C1_SDA/PWM0_CH5/PWM0_BRAKE1

7 PF.5/UART2_RXD/UART2_nCTS/PWM0_CH0/X32_IN/ADC0_ST

8 PF.4/UART2_TXD/UART2_nRTS/PWM0_CH1/X32_OUT

9 PF.3/UART0_TXD/I2C0_SCL/XT1_IN

10 PF.2/UART0_RXD/I2C0_SDA/XT1_OUT

11 PA.3/SPI0_SS/UART1_TXD/I2C1_SCL/PWM0_CH2/CLKO

12 PA.2/SPI0_CLK/UART1_RXD/I2C1_SDA/PWM0_CH3

13 PA.1/SPI0_MISO/UART0_TXD/UART1_nCTS/PWM0_CH4

14 PA.0/SPI0_MOSI/UART0_RXD/UART1_nRTS/PWM0_CH5

15 PF.15/PWM0_BRAKE0/PWM0_CH1/TM2/CLKO/INT4

16 nRESET

17 PF.0/UART1_TXD/I2C1_SCL/UART0_TXD/ICE_DAT

18 PF.1/UART1_RXD/I2C1_SDA/UART0_RXD/ICE_CLK

19 PC.1/UART2_TXD/I2C0_SCL

20 PC.0/UART2_RXD/I2C0_SDA

21 PA.12/I2C1_SCL

22 PA.13/I2C1_SDA

23 PA.14/UART0_TXD

24 PA.15/UART0_RXD

25 VSS

26 LDO_CAP

27 VDD

28 PB.15/ADC0_CH15/SPI0_SS/UART0_nCTS/TM0_EXT/PWM0_BRAKE1

29 PB.14/ADC0_CH14/SPI0_CLK/UART0_nRTS/TM1_EXT/CLKO

Page 10: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 10 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

30 PB.13/ADC0_CH13/SPI0_MISO/UART0_TXD/TM2_EXT

31 PB.12/ADC0_CH12/SPI0_MOSI/UART0_RXD/TM3_EXT

32 AVDD

Table 2-1 Pin Assignment for M031TC1AE

Page 11: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 11 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

NuTiny-SDK-M031TC PCB Placement 2.3

Users can refer to Figure 2-2 for the NuTiny-SDK-M031TC PCB placements.

Figure 2-2 NuTiny-SDK-M031TC PCB Placement

Page 12: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 12 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

3 HOW TO START NUTINY-SDK-M031TC ON THE KEIL ΜVISION® IDE

Keil uVision® IDE Software Download and Install 3.1

Please visit the Keil company website (http://www.keil.com) to download the Keil μVision® IDE

and install the RVMDK

Nuvoton Nu-Link Driver Download and Install 3.2

Please visit the Nuvoton company NuMicro® website (http://www.nuvoton.com/NuMicro) to

download “NuMicro® Keil μVision

® IDE driver” file. When the Nu-Link driver has been well

downloaded, please unzip the file and execute the “Nu-Link_Keil_Driver.exe” to install the driver.

Hardware Setup 3.3

The hardware setup is shown as Figure 3-1.

Figure 3-1 NuTiny-SDK-M031TC Hardware Setup

Page 13: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 13 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Example Program 3.4

This example demonstrates the ease of downloading and debugging an application on a NuTiny-SDK-M031TC board. It can be found on Figure 3-2 list directory and downloaded from Nuvoton NuMicro

® website.

The example file can be found in the directory list shown in Figure 3-2.

Directory C:\Nuvoton\BSP

Library\M031_Series_BSP_CMSIS_V3.00.000\SampleCode\Template\Keil

Project File

Figure 3-2 Example Directory

This sample code will show some functions about system manager controller and clock controller.

Start uVision®

Start debug mode When using the debugger commands, you may:

Project – Open Open the SYS.uvproj project file

Review variables in the watch

window

Single step through code

Project – Build

Compile and link the SYS application Reset the device

Flash – Download

Program the application code into on-chip Flash ROM

Run the application

Page 14: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 14 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

4 HOW TO START NUTINY -SDK-M031 ON THE IAR EMBEDDED WORKBENCH

IAR Embedded Workbench Software Download and Install 4.1

Please connect to IAR company website (http://www.iar.com) to download the IAR Embedded Workbench and install the EWARM.

Nuvoton Nu-Link Driver Download and Install 4.2

Please visit the Nuvoton company NuMicro® website (http://www.nuvoton.com/NuMicro ) to

download the “NuMicro® IAR EWARM Driver” file. When the Nu-Link driver has been well

downloaded, please unzip the file and execute the “Nu-Link_Keil_Driver.exe” to install the driver.

Hardware Setup 4.3

The hardware setup is shown as Figure 4-1.

Figure 4-1 NuTiny-SDK-M031TC Hardware Setup

Example Program 4.4

This example demonstrates the ease of downloading and debugging an application on a NuTiny-SDK-M031TC board. It can be found on Figure 4-2 list directory and downloaded from Nuvoton NuMicro

® website.

Page 15: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 15 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Directory C:\Nuvoton\BSP

Library\M031_Series_BSP_CMSIS_V3.00.000\SampleCode\Template\IAR

Project File

Figure 4-2 Example Directory

This sample code will show some functions about system manager controller and clock controller.

Start IAR Embedded Workbench Project – Download and Debug

Program the application code into on-chip Flash ROM

File-Open-Workspace

Open the SYS.eww workspace file

Single step through code

Project - Make

Compile and link the SYS application

Reset the device

Run the application

Page 16: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 16 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

5 STARTING TO USE NU-LINK2-ME VCOM FUNCTION

Downloading and Installing VCOM Driver 5.1

Please connect to Nuvoton NuMicro® website (http://www.nuvoton.com/NuMicro) to download the

“NuMicro® ICP Programming Tool” file. After the ICP Programming Tool driver is downloaded,

please unzip the file and execute the “ICP Programming Tool.exe”. Simply follow the installation and optional steps to install ICP Programming Tool and Nu-Link USB Driver, which included VCOM driver.

Figure 5-1 Optional Step after ICP Programming Tool Installation

Figure 5-2 Install Nuvoton Nu-LinkDeviceClass

Page 17: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 17 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Figure 5-3 Install Nuvoton COM&LPT Driver

Figure 5-4 Install Nuvoton Nu-Link2DeviceClass

VCOM Mode Setting on NuTiny-SDK-M031TC 5.2

Before the NuTiny-SDK-M031TC is connected to the PC, please enable ICESW2 VCOM function by switching on ICESW2. The NuTiny-SDK-M031TC transmits through UART0 to VCOM to send out data. Switch ICESW2 off when using UART0 function without VCOM function.

Setup on the Development Tool 5.3

The example is demonstrated on the Keil μVision® IDE.

5.3.1 Check the Using UART on the Keil μVision® IDE

Please open the project and find system_M031Series.h to check the using UART in DEBUG_PORT, which has to be the same as the using UART in the NuTiny-SDK-M031TC.

Page 18: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 18 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Figure 5-5 The Using UART on Keil μVision® IDE

5.3.2 Check the Target Device and Debug Setting

The target device has to be the same as the setting in Debug. Please click “Target Option” to open the Option windows, and find the setting in “Device”, “Debug”, and “Utilities” page. Please follow the steps below to check the setting.

Step 1

Page 19: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 19 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Step 2

Step 3

Page 20: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 20 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

5.3.3 Build and Download Code to NuTiny-SDK-M031TC

Please build the project and download code to NuTiny-SDK-M031TC.

5.3.4 Open the Serial Port Terminal

User can use serial port terminal, PuTTY for example, to print out debug message.

Figure 5-6 Set Baud Rate

5.3.5 Reset Chip

After pushing the reset button and enable ICESW2 VCOM function, the chip will reprogram application and print out debug message.

Page 21: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 21 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Figure 5-7 Serial Port Terminal Windows

Notice: Please switch ICESW2 on before the NuTiny-SDK-M031TC connects to the PC. When the NuTiny-SDK-M031TC connects to the PC with ICESW2 switch on, PC will detect VCOM as a USB device and the detection will only be processed once.

Page 22: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 22 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

6 NUTINY-SDK-M031TC SCHEMATIC

Nu-Link2-Me 6.1

GND

GREENRED

ICEU1

<M48SSIDAE>

PB

.61

PB

.52

PB

.43

PB

.34

PB

.25

PB

.16

PB

.07

PA

.11

8

PA

.10

9

PA

.910

PA

.811

PF

.612

VB

AT

13

PF

.514

PF

.415

PF

.316

PF.217PC.718PC.619PA.720PA.621VSS22VDD23LDO_CAP24PA.525PA.426PA.327PA.228PA.129PA.030VDDIO31nRESET32

PF

.033

PF

.134

PC

.535

PC

.436

PC

.337

PC

.238

PC

.139

PC

.040

HS

US

B_V

RE

S41

HS

US

B_V

DD

33

42

HS

US

B_V

BU

S43

HS

US

B_D

-44

HS

US

B_V

SS

45

HS

US

B_D

+46

HS

US

B_V

DD

12_C

AP

47

HS

US

B_ID

48

VSS49

LDO_CAP50

VDD51

PC.1452

PB.1553

PB.1454

PB.1355

PB.1256

AVDD57

VREF58

AVSS59

PB.1160

PB.1061

PB.962

PB.863

PB.764

SW

DH

_C

LK

NU

LIN

K_ID

0N

ULIN

K_ID

1

SW

DH

_D

AT

SW

DH

_R

ST

#IC

EV

DD

ICE

LE

D

ICEVDDICE_RST

HX

T_I

HXT_O

ICEC6

1u

C0603

SWO

KEY1ISPLED

US

B_H

S_R

EX

T

US

B_H

S_C

AP

US

B_H

S_V

BU

S

ICEVDDGND

USB_HS_CAP

US

B_H

S_D

-

US

B_H

S_D

+G

ND

ICEC2

1u

C0603

SP

IM_C

S

SP

IM_M

ISO

0

SP

IM_D

3

ICE

_C

LK

ICE

_D

AT

ICEVDD

GND

SP

IM_D

2

SP

IM_C

LK

SP

IM_M

OS

I0

ICEC130.1u

C0603

USB_HS_VBUS

RESETDEBUG

ICER310KR0603

ICEVDD

ICEC9

1uC0603

ICE_RST

ICE_RSTICE_CLKICE_DAT

ICEVDD

ICE_DAT

ICEJ1

HEADER_5(NC)

12345

ICE_CLK

ICER210K

R0603

ICEVDD

ICER410K

R0603

ETMD1

ETMCK_MOSIETMD0_MISO

ETMD3_SSETMD2_CK

ICE_RX

ICESW2

SMD HPS602-E

ICE_RX_S

VCOM SWITCH

ICE_TX_S ICE_TX

ETMD3_SSETMD2_CKETMD0_MISOETMCK_MOSI

NULINK_ID0

NULINK ID

Nu-Trace, ID0 = 1, ID1 = 1Nu-Link2, ID0 = 0, ID1 = 1Nu-LInk2-Me, ID0 = 0, ID1 = 0

NULINK_ID1

SWDH_DAT

SWDH_RST#SWDH_CLK

TICERST

TICEDAT

GND

MCU_TXMCU_RX

VDD

TICECLK

ICE_RX_SICE_TX_S

3.3VICEU2

W25Q16JVSSIQ

SOP8\5.23/1.27MM

CS#1

DO2

WP#3

GND4

DI5CLK6HOLD#7VCC8

SPIM_MISO0

3.3V

ICEC12

0.1u

C0603

SPI FLASH

1 2

ICED4

SS24A

MCUVCC

SN74LV2T45DCUR

ICEU4

SOP8/3.1/0.5

GND4 A23

VCCA1

DIR5

A12

B26B17VCCB8

ICER1200 1%

R0603

HS

US

B_V

DD

33

HXT_O

ICEC11 20p

C0603

ICEC10 20p

C0603

HXT_I

12M Crystal

ICEX1

12MHz SMD X3225B1

XIN

2

GND

4GND

3XOUT

SN74LV2T45DCUR

ICEU3

SOP8/3.1/0.5

GND4 A23

VCCA1

DIR5

A12

B26B17VCCB8

ICE INTERFACE

ICEJ4

HEADER 2.54 5X2 (NC)

1 23 45 67 89 10

Title

Size File Name : Rev

Date: Sheet of

Author :

Nu-Link2-Me 1.0

Nu-Link2-Me

CMHuangA3

1 3Wednesday, October 17, 2018

ICE_RX_S

SWO

ICE_TX_S

ICEC1

0.1u

C0603

ICEC7

4.7u

C0603

ICEC8470p

C0603

ICEVDD

MSG_EN

MS

G_E

N

ETMD3_SS I2C1_SCL QSPI_SS BUSY

5V

SPIM_MOSI0_LVSPIM_CLK_LV

SPIM_CS_LV

ETMD0_MISO UART0_TX QSPI_MISOFAILICE_TX

ETMCK_MOSI UART0_RX QSPI_MOSIPASSICE_RX

ETMD2_CK I2C1_SDA QSPI_CLK START

ICEVDD

SPIM_CS

USB_HS_VBUS

3.3V

ICEJ3

micro USB 5pin

MICRO_USB_AB

VBUS1

D-2

D+3

GND5

ID4

Shield6

Shield7

Shield8

Shield9

Shield10

Shield11

SPIM_CS_LV

ICEL2

FERRITE BEAD

L0603

DP

DM

ICER70

ICER60

USB_HS_D+

USB_HS_D-

USB 2.0 HIGH SPEED DEVICES

ICELED

RED

ISPLED

1 2

GREEN0805 LED G (綠 光 ) 普 亮

KP-2012 GREEN

ICEJ2

HEADER04(NC)

1234

ICERP1

8P4R-330

8P4RA

1 23 45 67 8

DMDP

1 2

RED0805 LED R (紅 光 ) 高 亮

KP-2012

USB_HS_VBUS

ICEVDD

1 2

ISP

0805 LED Y (黃 光 )高 亮KP-2012

1 2

ICE0805 LED R (紅 光 ) 高 亮

KP-2012

LED

ICEVDD

SPIM_MOSI0SPIM_CLK

SPIM_MOSI0_LVSPIM_CLK_LV

3.3V

KEY

ICEVDD

KEY1

ICER510KR0603ICESW1

3x6x5 2PIN SMD

SW-2P-SMD

MCUVCC_DIODE

MCUVCC_DIODE

ICER1810KR0603

ICER1910KR0603

3.3V3.3V

3.3V

ICE5V

ICE5V

ICEVDD

SWDH_RST#SWDH_CLKSWDH_DAT

ICE5V

5V

Power Switch

USB_HS_VBUS1 2

ICED1

SS24A

ICEUP1AMS1117_3.3v

IN3

GN

D1

OU

T2

OU

T4

ICEUP2ACE1117_ADJ

IN3

AD

J1

OU

T2

OU

T4

ICER8120,1%R0603

ICER982, 1%

R0603

ICEJPR2

1&2 (0 ohm)

123

ICEVCC

3.3V

1.8VICECT110uF/10VTANT-A

12 3.3V3.3V

MCUVCC

1.8V

ICEJPR1

1&2 (0 ohm)

1234

ICECT310uF/10V

12

1.8V

ICEC5

0.1u

C0603

ICEVDDICEVCC

ICECT210uF/10VTANT-A

12

ICEL1

FERRITE BEAD

Off-page Connector

ICEC3

1u

C0603

ICEC4

0.1u

C0603

Page 23: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 23 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

M031TC1AE 6.2

PB12_RXD0PB13_TXD0

PF1_ICE_CLKPF0_ICE_DAT

ICE

nRESET

P19P20P21

P24

P22P23

PF0_ICE_DATP17PF1_ICE_CLKP18

PF2_XT1_OUT

PF3_XT1_INR2 0

R5 0

LDO_CAPP26P25

X1

32MHz 49S SMDXTAL\LP\SMD

P28

P32

VDD_1P27

C8 20p

C2 20p

MCUVCC_DIODE

PB12_RXD0P31PB13_TXD0P30

SW13x6x5 2PIN SMD

SW-2P-SMDC91uC0603

R310KR

R0603

RESET

VDD

nRESET

Bypass Cap

C40.1uC0603

C51uC0603

VDD

HXT & LXT Crystal

PF5_X32_IN

X2

SMD 32.768K X3215

9HT9

PF4_X32_OUT

R1 0

R4 0

C1 20p

C7 20p

JP2

NC

123

4

JP1

NC

123

4

C120.1u

VDD AVDD

C110.1u

CT310uF/10V

12

CT210uF/10V

12

L2

FERRITE BEAD

C130.01u

Power

VDD

Title

Size Document Number Rev

Date: Sheet of

NnTiny-SDK-M031TC

v1.0M031TC1AECustom

2 3Monday , January 28, 2019

LDO_CAP

UP1_VCC

VDD_1

R6330R

R0603

J1

HEADER 2.54 5X2 (NC)

1 23 45 67 89 10

12

LEDG1GreenLED0805

R7330R

R0603

12

LEDR1RedLED0805

VDD

VDD

PB4_NU2_A1PB3_NU2_A2PB2_NU2_A3

PB0_NU2_A4/SDA

PB5_NU2_A0

PB1_NU2_A5/SCL

PF3_XT1_IN

PC0_NU4_SDAPC1_NU4_SCL

TICEDATTICECLK

PA13PA12

LDO_CAP

PA14PA15

VDD

AVDD

GND

MCU_RXMCU_TXPB14_LED_RPB15

PF2_XT1_OUT

PF15

PA1_NU3_D12/MISO

PA3_NU3_D10/SSPA2_NU3_D13/CLK

TICERST

PA0_NU3_D11/MOSI

P17 - P24

P9 - P16

P1 - P8

P25 - P32

U2

<M031TC1AE>

PB

.5/A

DC

0_C

H5/I

2C

0_S

CL/P

WM

0_C

H0/U

AR

T2_T

XD

/TM

0/I

NT

01

PB

.4/A

DC

0_C

H4/I

2C

0_S

DA

/PW

M0_C

H1/U

AR

T2_R

XD

/TM

1/I

NT

12

PB

.3/A

DC

0_C

H3/I

2C

1_S

CL/U

AR

T1_T

XD

/PW

M0_C

H2/P

WM

0_B

RA

KE

0/T

M2/I

NT

23

PB

.2/A

DC

0_C

H2/I

2C

1_S

DA

/UA

RT

1_R

XD

/PW

M0_C

H3/T

M3/I

NT

34

PB

.1/A

DC

0_C

H1/U

AR

T2_T

XD

/I2C

1_S

CL/P

WM

0_C

H4/P

WM

0_B

RA

KE

05

PB

.0/A

DC

0_C

H0/U

AR

T2_R

XD

/SP

I0_I2

SM

CLK

/I2C

1_S

DA

/PW

M0_C

H5/P

WM

0_B

RA

KE

16

PF

.5/U

AR

T2_R

XD

/UA

RT

2_nC

TS

/PW

M0_C

H0/X

32_IN

/AD

C0_S

T7

PF

.4/U

AR

T2_T

XD

/UA

RT

2_nR

TS

/PW

M0_C

H1/X

32_O

UT

8

PF.3/UART0_TXD/I2C0_SCL/XT1_IN9PF.2/UART0_RXD/I2C0_SDA/XT1_OUT10PA.3/SPI0_SS/UART1_TXD/I2C1_SCL/PWM0_CH2/CLKO11PA.2/SPI0_CLK/UART1_RXD/I2C1_SDA/PWM0_CH312PA.1/SPI0_MISO/UART0_TXD/UART1_nCTS/PWM0_CH413PA.0/SPI0_MOSI/UART0_RXD/UART1_nRTS/PWM0_CH514PF.15/PWM0_BRAKE0/PWM0_CH1/TM2/CLKO/INT415nRESET16

PF

.0/U

AR

T1_T

XD

/I2C

1_S

CL/U

AR

T0_T

XD

/IC

E_D

AT

17

PF

.1/U

AR

T1_R

XD

/I2C

1_S

DA

/UA

RT

0_R

XD

/IC

E_C

LK

18

PC

.1/U

AR

T2_T

XD

/I2C

0_S

CL

19

PC

.0/U

AR

T2_R

XD

/I2C

0_S

DA

20

PA

.12/I

2C

1_S

CL

21

PA

.13/I

2C

1_S

DA

22

PA

.14/U

AR

T0_T

XD

23

PA

.15/U

AR

T0_R

XD

24

VSS25

LDO_CAP26

VDD27

PB.15/ADC0_CH15/SPI0_SS/UART0_nCTS/TM0_EXT/PWM0_BRAKE128

PB.14/ADC0_CH14/SPI0_CLK/UART0_nRTS/TM1_EXT/CLKO29

PB.13/ADC0_CH13/SPI0_MISO/UART0_TXD/TM2_EXT30

PB.12/ADC0_CH12/SPI0_MOSI/UART0_RXD/TM3_EXT31

AVDD32

VS

S33

PF2_XT1_OUTP10

P14P13P12P11

P8

P5

P6

P7

nRESETP16P15

P1

P3

P2

P4

P26P25

P31P30P29P28P27

P32

P14P15P16

P9P10P11P12P13

P1

P5P4P3P2

P6

PF3_XT1_INP9

LED

P21

P20

P19

P18

P17

P24

P23

P22

PF4_X32_OUTPF5_X32_IN

PF4_X32_OUTP8PF5_X32_INP7

PB14_LED_RP29

PC3_LED_R

Page 24: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 24 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

External Connector 6.3

P32P31P30

PA12PC0_NU4_SDAPC1_NU4_SCL

PA15

TICEDATTICECLK

PA13PA14

AVDD

GNDLDO_CAP

PB15

MCU_RXMCU_TX

VDD

PB14_LED_R

P17 - P24

Title

Size Document Number Rev

Date: Sheet of

NnTiny-SDK-M031TC

v1.0Ext. ConnectorA

3 3Tuesday , Nov ember 27, 2018

P24 - P32

External Connector

P1 - P8

P9 - P16

JP3

HEADER 2.54 8X2 (NC)

2468

10121416

13579111315

JP5

HEADER 2.54 8X2 (NC)

2468

10121416

13579111315

JP4

HEADER 2.54 8X2 (NC)

2468

10121416

13579111315

JP6

HEADER 2.54 8X2 (NC)

2468

10121416

13579111315

P2

P4P3

P1

P8P7P6P5

PB2_NU2_A3

PB0_NU2_A4/SDA

PB5_NU2_A0PB4_NU2_A1PB3_NU2_A2

PF5_X32_INPF4_X32_OUT

PB1_NU2_A5/SCL

P4P3P2P1

P8P7P6P5

P12P11P10P9

P16P15

P13P14

P12

P10P11

P9

P14

P16P15

P13

P20P21P22

P18

P23

P17

P19

P24

PA2_NU3_D13/CLK

PF2_XT1_OUTPF3_XT1_IN

PA0_NU3_D11/MOSIPF15

PA1_NU3_D12/MISO

PA3_NU3_D10/SS

TICERST

P17P18

P24P23

P19P20P21P22

P25P26

P29P28P27

P32P31P30

P29

P25P26

P28P27

Page 25: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 25 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

7 REVISION HISTORY

Date Revision Description

2019.01.28 1.00 1. Initially issued.

Page 26: NuMicro Family NuTiny-SDK-M031TC User Manual...M031/M032 Jan 28, 2019 Page 4 of 26 Rev 1.00 INY-DK-1 L 1 OVERVIEW NuTiny-SDK-M031TC is the specific development tool for NuMicro® M031

M031/M032

Jan 28, 2019 Page 26 of 26 Rev 1.00

NU

TIN

Y-S

DK

-M03

1 U

SE

R M

AN

UA

L

Important Notice

Nuvoton Products are neither intended nor warranted for usage in systems or equipment, any malfunction or failure of which may cause loss of human life, bodily injury or severe property damage. Such applications are deemed, “Insecure Usage”.

Insecure usage includes, but is not limited to: equipment for surgical implementation, atomic energy control instruments, airplane or spaceship instruments, the control or operation of dynamic, brake or safety systems designed for vehicular use, traffic signal instruments, all types of safety devices, and other applications intended to support or sustain life.

All Insecure Usage shall be made at customer’s risk, and in the event that third parties lay claims to Nuvoton as a result of customer’s Insecure Usage, customer shall indemnify the damages and liabilities thus incurred by Nuvoton.