37
NUC126 May 23, 2017 Page 1 of 37 Rev 1.00 NUTINY-SDK-NUC126 USER MANUAL ARM ® Cortex ® -M 32-bit Microcontroller NuMicro ® Family NuTiny-SDK-NUC126 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-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 1 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

ARM® Cortex

®-M

32-bit Microcontroller

NuMicro® Family

NuTiny-SDK-NUC126

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-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 2 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Table of Contents

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

2 NUTINY-SDK-NUC126 INTRODUCTION ...................................................... 5

NuTiny -SDK-NUC126 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 Virtual COM Port Function Switch ........................................................................... 7

Pin Assignment for Extended Connector .......................................................... 8 2.2

NuTiny-SDK-NUC126 PCB Placement ........................................................... 23 2.3

3 How to Start NuTiny-SDK-NUC126 on the Keil μVision® IDE ............................ 24

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

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

Hardware Setup ....................................................................................... 24 3.3

Example Program ..................................................................................... 25 3.4

4 How to Start NuTiny-SDK-NUC126 on the IAR Embedded Workbench ................ 26

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

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

Hardware Setup ....................................................................................... 26 4.3

Example Program ..................................................................................... 27 4.4

5 Starting to Use Nu-Link-Me 3.0 VCOM Function............................................ 28

Downloading and Installing VCOM Driver ........................................................ 28 5.1

VCOM Mode Setting on NuTiny-SDK-NUC126 .................................................. 29 5.2

Setup on the Development Tool .................................................................... 29 5.3

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

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

5.3.3 Build and Download Code to NuTiny-SDK-NUC126 .................................................... 32

5.3.4 Open the Serial Port Terminal .............................................................................. 32

5.3.5 Reset Chip ..................................................................................................... 32

6 NuTiny-SDK-NUC126 Schematic ............................................................. 34

NuTiny-EVB-NUC126 Schematic .................................................................. 34 6.1

Page 3: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 3 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Nu-Link-Me V3.0 Schematic ........................................................................ 35 6.2

7 REVISION HISTORY ............................................................................ 36

Page 4: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 4 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

1 OVERVIEW

NuTiny-SDK-NUC126 is the specific development tool for NuMicro® NUC126 series. Users can

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

NuTiny-SDK-NUC126 includes two portions. One is NuTiny-EVB-NUC126 and the other is Nu-Link-Me. NuTiny-EVB-NUC126 is the evaluation board and Nu-Link-Me is its Debug Adaptor. Thus, users do not need other additional ICE or debug equipments.

Page 5: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 5 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

2 NUTINY-SDK-NUC126 INTRODUCTION

NuTiny-SDK-NUC126 uses the NUC126VG4AE as the target microcontroller. Figure 2-1 NuTiny-SDK-NUC126 (PCB Board)Figure 2-1 is NuTiny-SDK-NUC126 for NUC126 series, the left portion is called NuTiny-EVB-NUC126 and the right portion is Debug Adaptor called Nu-Link-Me.

NuTiny-EVB-NUC126 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 NUC126 series features. The NuTiny-EVB-NUC126 can be a real system controller to design users’ target systems.

Nu-Link-Me is a Debug Adaptor. The Nu-Link-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-Link-Me V3.0 also supports VCOM function, which gives users more flexibility when debug. To use Nu-Link-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-Link-Me 3.0 VCOM function, please refer to Chapter 5.

VDD

(JP8)

Reset Button

(SW1)

I/O LED

Power LED

Target Chip

Virtual COM

Port Function

Switch

(SW2)ICE Controller

USB Connector

(J1)

ICE

Controller

VCC : 3.3V or

5V

(JPR1)Extended Connector (JP5,

JP10)

GND (JP7)

USB

Connector

(CON1)

Extended Connector (JP6,

JP11)

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

Page 6: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 6 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

NuTiny -SDK-NUC126 Jumper Description 2.1

2.1.1 Power Setting

JP8: VDD Voltage connecter in NuTiny-EVB-NUC126 CON1: USB port in NuTiny-EVB-NUC126 J1: USB port in Nu-Link-Me JPR1: Select 5.0V or 3.3V for system power

Model JPR1 JP8 VDD CON1 USB Port J1 ICE USB Port MCU Voltage

Model 1 Select 3.3V

(Default) DC 3.3V Output X Connect to PC DC 3.3V

Model 2 Select 5.0V DC 5.0V Output X Connect to PC DC 5.0V

Model 3 Select 3.3V or 5.0V DC 5.0V Output Connect to PC Connect to PC DC 5.0V

Model 4* X DC 5.0V Output Connect to PC X DC 5.0V

Model 5 Select 3.3V or 5.0V DC 2.5V ~ 5.0V

Input X Connect to PC

Voltage by JP8 Input

Model 6* X DC 2.5V ~ 5.0V

Input X X

Voltage by JP8 Input

X: Unused. Note*: Ned to separate NuTiny-EVB-NUC126 and Nu-Link-Me.

2.1.2 Debug Connector

JP4: Connector in target board (NuTiny-EVB-NUC126) for connecting with Nuvoton ICE adaptor (Nu-Link-Me)

JP2: Connector in ICE adaptor (Nu-Link-Me) for connecting with a target board (NuTiny-EVB-NUC126)

2.1.3 USB Connector

CON1: Micro USB Connector in NuTiny-EVB-NUC126 for application use J1: Micro USB Connector in Nu-Link-Me connected to a PC USB port

2.1.4 Extended Connector

JP5, JP6, JP10, and JP11: Show all chip pins in NuTiny-EVB-NUC126

2.1.5 Reset Button

SW1: Reset button in NuTiny-EVB-NUC126

2.1.6 Power Connector

JP8: VDD connector in NuTiny-EVB-NUC126 JP7: GND connector in NuTiny-EVB-NUC126

Page 7: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 7 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

2.1.7 Virtual COM Port Function Switch

SW2: Switch SW2 on/off before power on to enable/disable VCOM function. SW2 connects pin 8(PD.0/RXD) and pin 15(PD.1/TXD) in NuTiny-EVB-NUC126 with pin 22(PB.1/TXD) and pin 21(PB.0/RXD) in Nuvoton ICE adaptor (Nu-Link-Me V3.0). SW2 connects pin 30(VCOM) in Nuvoton ICE adaptor (Nu-Link-Me V3.0) to GND to enable VCOM function.

Switch Pin Number

Disable VCOM Mode Enable VCOM Mode

1 Off On

2 Off On

3 Off On

4 Off On

X: Unused.

Page 8: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 8 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin Assignment for Extended Connector 2.2

NuTiny-EVB-NUC126 provides NUC126VG4AE on board and the extended connector for LQFP100-pin. Table 2-1 is the pin assignment for NUC126VG4AE.

Pin No. Pin Name Type Description

1 PB.13 I/O General purpose digital I/O pin.

ADC0_CH10 A ADC0 channel 10 analog input.

2 PB.14 I/O General purpose digital I/O pin.

ADC0_CH11 A ADC0 channel 11 analog input.

3 PB.15 I/O General purpose digital I/O pin.

ADC0_CH12 A ADC0 channel 12 analog input.

ACMP0_P3 A Analog comparator 0 positive input 3 pin.

EBI_nCS1 O EBI chip select 1 output pin.

4 PB.5 I/O General purpose digital I/O pin.

ADC0_CH13 A ADC0 channel 13 analog input.

SPI0_MOSI I/O SPI0 MOSI (Master Out, Slave In) pin.

SPI1_MOSI I/O SPI1 MOSI (Master Out, Slave In) pin.

ACMP0_P2 A Analog comparator 0 positive input 2 pin.

SC1_RST O Smart Card 1 reset pin.

EBI_AD6 I/O EBI address/data bus bit 6.

UART2_RXD I UART2 data receiver input pin.

5 PB.6 I/O General purpose digital I/O pin.

ADC0_CH14 A ADC0 channel 14 analog input.

SPI0_MISO I/O SPI0 MISO (Master In, Slave Out) pin.

SPI1_MISO I/O SPI1 MISO (Master In, Slave Out) pin.

ACMP0_P1 A Analog comparator 0 positive input 1 pin.

SC1_PWR O Smart Card 1 power pin.

EBI_AD5 I/O EBI address/data bus bit 5.

6 PB.7 I/O General purpose digital I/O pin.

ADC0_CH15 A ADC0 channel 15 analog input.

SPI0_CLK I/O SPI0 serial clock pin.

SPI1_CLK I/O SPI1 serial clock pin.

USCI2_CTL1 I/O USCI2 control 1 pin.

ACMP0_P0 A Analog comparator 0 positive input 0 pin.

SC1_DAT I/O Smart Card 1 data pin.

EBI_AD4 I/O EBI address/data bus bit 4.

7 nRESET I External reset input: active LOW, with an internal pull-up. Set this pin

Page 9: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 9 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

low reset to initial state.

8 PD.0 I/O General purpose digital I/O pin.

SPI0_I2SMCLK I/O SPI0 I2S master clock output pin

SPI1_I2SMCLK I/O SPI1 I2S master clock output pin

UART0_RXD I UART0 data receiver input pin.

USCI2_CTL0 I/O USCI2 control 0 pin.

ACMP1_N A Analog comparator 1 negative input pin.

SC1_CLK O Smart Card 1 clock pin.

INT3 I External interrupt 3 input pin.

9 AVSS P Ground pin for analog circuit.

10 VDD P Power supply for I/O ports and LDO source for internal PLL and digital circuit.

11 VSS P Ground pin for digital circuit.

12 PC.8 I/O General purpose digital I/O pin.

ADC0_CH16 A ADC0 channel 16 analog input.

UART0_nRTS O UART0 request to Send output pin.

13 PD.8 I/O General purpose digital I/O pin.

ADC0_CH17 A ADC0 channel 17 analog input.

UART0_nCTS I UART0 clear to Send input pin.

USCI2_CTL1 I/O USCI2 control 1 pin.

TM2 I/O Timer2 event counter input/toggle output pin.

EBI_nCS0 O EBI chip select 0 output pin.

14 PD.9 I/O General purpose digital I/O pin.

ADC0_CH18 A ADC0 channel 18 analog input.

UART0_RXD I UART0 data receiver input pin.

USCI2_CTL0 I/O USCI2 control 0 pin.

ACMP1_P3 A Analog comparator 1 positive input 3 pin.

TM3 I/O Timer3 event counter input/toggle output pin.

EBI_ALE O EBI address latch enable output pin.

15 PD.1 I/O General purpose digital I/O pin.

ADC0_CH19 A ADC0 channel 19 analog input.

PWM0_SYNC_IN I PWM0 counter synchronous trigger input pin.

UART0_TXD O UART0 data transmitter output pin.

USCI2_CLK I/O USCI2 clock pin.

ACMP1_P2 A Analog comparator 1 positive input 2 pin.

Page 10: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 10 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

TM0 I/O Timer0 event counter input/toggle output pin.

EBI_nRD O EBI read enable output pin.

16 PD.2 I/O General purpose digital I/O pin.

ADC0_ST I ADC0 external trigger input pin.

TM0_EXT I/O Timer0 external capture input/toggle output pin.

USCI2_DAT0 I/O USCI2 data 0 pin.

ACMP1_P1 A Analog comparator 1 positive input 1 pin.

PWM0_BRAKE0 I PWM0 Brake 0 input pin.

EBI_nWR O EBI write enable output pin.

INT0 I External interrupt 0 input pin.

17 PD.3 I/O General purpose digital I/O pin.

TM2 I/O Timer2 event counter input/toggle output pin.

SPI0_I2SMCLK I/O SPI0 I2S master clock output pin

TM1_EXT I/O Timer1 external capture input/toggle output pin.

USCI2_DAT1 I/O USCI2 data 1 pin.

ACMP1_P0 A Analog comparator 1 positive input 0 pin.

PWM0_BRAKE1 I PWM0 Brake 1 input pin.

EBI_MCLK O EBI external clock output pin.

INT1 I External interrupt 1 input pin.

18 PD.4 I/O General purpose digital I/O pin.

SPI1_CLK I/O SPI1 serial clock pin.

I2C0_SDA I/O I2C0 data input/output pin.

UART2_nRTS O UART2 request to Send output pin.

PWM0_BRAKE0 I PWM0 Brake 0 input pin.

TM0 I/O Timer0 event counter input/toggle output pin.

19 PD.5 I/O General purpose digital I/O pin.

CLKO O Clock Out

SPI1_MISO I/O SPI1 MISO (Master In, Slave Out) pin.

I2C0_SCL I/O I2C0 clock pin.

UART2_nCTS I UART2 clear to Send input pin.

PWM0_BRAKE1 I PWM0 Brake 1 input pin.

TM1 I/O Timer1 event counter input/toggle output pin.

20 PE.3 I/O General purpose digital I/O pin.

SPI1_MOSI I/O SPI1 MOSI (Master Out, Slave In) pin.

Page 11: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 11 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

UART2_RXD I UART2 data receiver input pin.

PWM0_CH3 I/O PWM0 channel 3 output/capture input.

21 PD.6 I/O General purpose digital I/O pin.

CLKO O Clock Out

SPI1_SS I/O SPI1 slave select pin.

UART0_RXD I UART0 data receiver input pin.

UART2_TXD O UART2 data transmitter output pin.

ACMP0_O O Analog comparator 0 output pin.

PWM0_CH5 I/O PWM0 channel 5 output/capture input.

EBI_nWR O EBI write enable output pin.

22 VBAT P Power supply by batteries for RTC.

23 PF.0 I/O General purpose digital I/O pin.

X32_OUT O External 32.768 kHz crystal output pin.

USCI2_CTL1 I/O USCI2 control 1 pin.

INT5 I External interrupt 5 input pin.

24 PF.1 I/O General purpose digital I/O pin.

X32_IN I External 32.768 kHz crystal input pin.

USCI2_CTL0 I/O USCI2 control 0 pin.

PWM1_BRAKE0 I PWM1 Brake 0 input pin.

25 PF.2 I/O General purpose digital I/O pin.

USCI2_CLK I/O USCI2 clock pin.

PWM1_BRAKE1 I PWM1 Brake 1 input pin.

26 PD.10 I/O General purpose digital I/O pin.

TM2 I/O Timer2 event counter input/toggle output pin.

USCI2_DAT0 I/O USCI2 data 0 pin.

27 PD.11 I/O General purpose digital I/O pin.

TM3 I/O Timer3 event counter input/toggle output pin.

USCI2_DAT1 I/O USCI2 data 1 pin.

28 PD.12 I/O General purpose digital I/O pin.

USCI1_CTL0 I/O USCI1 control 0 pin.

SPI1_SS I/O SPI1 slave select pin.

UART0_TXD O UART0 data transmitter output pin.

PWM1_CH0 I/O PWM1 channel 0 output/capture input.

EBI_ADR16 O EBI address bus bit 16.

Page 12: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 12 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

29 PD.13 I/O General purpose digital I/O pin.

USCI1_DAT1 I/O USCI1 data 1 pin.

SPI1_MOSI I/O SPI1 MOSI (Master Out, Slave In) pin.

UART0_RXD I UART0 data receiver input pin.

PWM1_CH1 I/O PWM1 channel 1 output/capture input.

EBI_ADR17 O EBI address bus bit 17.

30 PD.14 I/O General purpose digital I/O pin.

USCI1_DAT0 I/O USCI1 data 0 pin.

SPI1_MISO I/O SPI1 MISO (Master In, Slave Out) pin.

UART0_nCTS I UART0 clear to Send input pin.

PWM1_CH2 I/O PWM1 channel 2 output/capture input.

EBI_ADR18 O EBI address bus bit 18.

31 PD.15 I/O General purpose digital I/O pin.

USCI1_CLK I/O USCI1 clock pin.

SPI1_CLK I/O SPI1 serial clock pin.

UART0_nRTS O UART0 request to Send output pin.

PWM1_CH3 I/O PWM1 channel 3 output/capture input.

EBI_ADR19 O EBI address bus bit 19.

32 PD.7 I/O General purpose digital I/O pin.

USCI1_CTL1 I/O USCI1 control 1 pin.

SPI0_I2SMCLK I/O SPI0 I2S master clock output pin

PWM0_SYNC_IN I PWM0 counter synchronous trigger input pin.

TM1 I/O Timer1 event counter input/toggle output pin.

ACMP0_O O Analog comparator 0 output pin.

PWM0_CH5 I/O PWM0 channel 5 output/capture input.

EBI_nRD O EBI read enable output pin.

33 PF.3 I/O General purpose digital I/O pin.

XT1_OUT O External 4~24 MHz (high speed) crystal output pin.

I2C1_SCL I/O I2C1 clock pin.

34 PF.4 I/O General purpose digital I/O pin.

XT1_IN I External 4~24 MHz (high speed) crystal input pin.

I2C1_SDA I/O I2C1 data input/output pin.

35 VSS P Ground pin for digital circuit.

36 VDD P Power supply for I/O ports and LDO source for internal PLL and digital circuit.

Page 13: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 13 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

37 LDO_CAP A LDO output pin.

38 PC.9 I/O General purpose digital I/O pin.

SPI0_I2SMCLK I/O SPI0 I2S master clock output pin

I2C1_SCL I/O I2C1 clock pin.

USCI2_CTL1 I/O USCI2 control 1 pin.

PWM1_CH0 I/O PWM1 channel 0 output/capture input.

39 PC.10 I/O General purpose digital I/O pin.

SPI0_MOSI I/O SPI0 MOSI (Master Out, Slave In) pin.

I2C1_SDA I/O I2C1 data input/output pin.

USCI2_DAT1 I/O USCI2 data 1 pin.

PWM1_CH1 I/O PWM1 channel 1 output/capture input.

40 PC.11 I/O General purpose digital I/O pin.

SPI0_MISO I/O SPI0 MISO (Master In, Slave Out) pin.

USCI2_CLK I/O USCI2 clock pin.

PWM1_CH2 I/O PWM1 channel 2 output/capture input.

41 PC.12 I/O General purpose digital I/O pin.

SPI0_CLK I/O SPI0 serial clock pin.

USCI2_CTL0 I/O USCI2 control 0 pin.

PWM1_CH3 I/O PWM1 channel 3 output/capture input.

42 PC.13 I/O General purpose digital I/O pin.

SPI0_SS I/O SPI0 slave select pin.

USCI2_DAT0 I/O USCI2 data 0 pin.

PWM1_CH4 I/O PWM1 channel 4 output/capture input.

43 PC.14 I/O General purpose digital I/O pin.

PWM1_CH5 I/O PWM1 channel 5 output/capture input.

44 PC.0 I/O General purpose digital I/O pin.

SC0_DAT I/O Smart Card 0 data pin.

SPI0_CLK I/O SPI0 serial clock pin.

UART2_nCTS I UART2 clear to Send input pin.

USCI0_DAT0 I/O USCI0 data 0 pin.

ACMP0_WLAT I Analog comparator 0 window latch input pin

PWM0_CH0 I/O PWM0 channel 0 output/capture input.

EBI_AD8 I/O EBI address/data bus bit 8.

INT2 I External interrupt 2 input pin.

Page 14: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 14 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

45 PC.1 I/O General purpose digital I/O pin.

CLKO O Clock Out

SC0_CLK O Smart Card 0 clock pin.

UART2_nRTS O UART2 request to Send output pin.

USCI0_DAT1 I/O USCI0 data 1 pin.

ACMP1_WLAT I Analog comparator 1 window latch input pin

PWM0_CH1 I/O PWM0 channel 1 output/capture input.

EBI_AD9 I/O EBI address/data bus bit 9.

46 PC.2 I/O General purpose digital I/O pin.

SC0_RST O Smart Card 0 reset pin.

SPI0_SS I/O SPI0 slave select pin.

UART2_TXD O UART2 data transmitter output pin.

USCI0_CTL1 I/O USCI0 control 1 pin.

ACMP1_O O Analog comparator 1 output pin.

PWM0_CH2 I/O PWM0 channel 2 output/capture input.

EBI_AD10 I/O EBI address/data bus bit 10.

47 PC.3 I/O General purpose digital I/O pin.

SC0_PWR O Smart Card 0 power pin.

SPI0_MOSI I/O SPI0 MOSI (Master Out, Slave In) pin.

UART2_RXD I UART2 data receiver input pin.

USCI0_CTL0 I/O USCI0 control 0 pin.

PWM0_CH3 I/O PWM0 channel 3 output/capture input.

EBI_AD11 I/O EBI address/data bus bit 11.

48 PC.4 I/O General purpose digital I/O pin.

SC0_nCD I Smart Card 0 card detect pin.

SPI0_MISO I/O SPI0 MISO (Master In, Slave Out) pin.

I2C1_SCL I/O I2C1 clock pin.

USCI0_CLK I/O USCI0 clock pin.

PWM0_CH4 I/O PWM0 channel 4 output/capture input.

EBI_AD12 I/O EBI address/data bus bit 12.

49 PE.0 I/O General purpose digital I/O pin.

SPI0_CLK I/O SPI0 serial clock pin.

I2C1_SDA I/O I2C1 data input/output pin.

TM2_EXT I/O Timer2 external capture input/toggle output pin.

Page 15: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 15 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

SC0_nCD I Smart Card 0 card detect pin.

PWM0_CH0 I/O PWM0 channel 0 output/capture input.

EBI_nCS1 O EBI chip select 1 output pin.

INT4 I External interrupt 4 input pin.

50 PC.5 I/O General purpose digital I/O pin.

SPI0_I2SMCLK I/O SPI0 I2S master clock output pin

I2C1_SDA I/O I2C1 data input/output pin.

USCI0_DAT0 I/O USCI0 data 0 pin.

PWM0_CH5 I/O PWM0 channel 5 output/capture input.

EBI_AD13 I/O EBI address/data bus bit 13.

51 PC.6 I/O General purpose digital I/O pin.

USCI0_DAT1 I/O USCI0 data 1 pin.

ACMP1_O O Analog comparator 1 output pin.

PWM1_CH0 I/O PWM1 channel 0 output/capture input.

EBI_AD14 I/O EBI address/data bus bit 14.

52 PC.7 I/O General purpose digital I/O pin.

USCI0_CTL1 I/O USCI0 control 1 pin.

PWM1_CH1 I/O PWM1 channel 1 output/capture input.

EBI_AD15 I/O EBI address/data bus bit 15.

53 PE.4 I/O General purpose digital I/O pin.

I2C0_SCL I/O I2C0 clock pin.

I2C1_SCL I/O I2C1 clock pin.

USCI0_CTL0 I/O USCI0 control 0 pin.

SC0_PWR O Smart Card 0 power pin.

PWM1_BRAKE0 I PWM1 Brake 0 input pin.

EBI_nCS0 O EBI chip select 0 output pin.

INT0 I External interrupt 0 input pin.

54 PE.5 I/O General purpose digital I/O pin.

I2C0_SDA I/O I2C0 data input/output pin.

I2C1_SDA I/O I2C1 data input/output pin.

USCI0_CLK I/O USCI0 clock pin.

SC0_RST O Smart Card 0 reset pin.

PWM1_BRAKE1 I PWM1 Brake 1 input pin.

EBI_ALE O EBI address latch enable output pin.

Page 16: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 16 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

INT1 I External interrupt 1 input pin.

55 PE.6 I/O General purpose digital I/O pin.

ICE_CLK I Serial wired debugger clock pin.

I2C0_SCL I/O I2C0 clock pin.

UART0_RXD I UART0 data receiver input pin.

56 PE.7 I/O General purpose digital I/O pin.

ICE_DAT O Serial wired debugger data pin.

I2C0_SDA I/O I2C0 data input/output pin.

UART0_TXD O UART0 data transmitter output pin.

57 PA.8 I/O General purpose digital I/O pin.

CLKO O Clock Out

I2C1_SCL I/O I2C1 clock pin.

UART1_TXD O UART1 data transmitter output pin.

SC0_PWR O Smart Card 0 power pin.

SC1_RST O Smart Card 1 reset pin.

TM_BRAKE0 I Timer Brake 0 input pin.

PWM0_BRAKE0 I PWM0 Brake 0 input pin.

TM1 I/O Timer1 event counter input/toggle output pin.

58 PA.9 I/O General purpose digital I/O pin.

SPI1_I2SMCLK I/O SPI1 I2S master clock output pin

I2C1_SDA I/O I2C1 data input/output pin.

UART1_RXD I UART1 data receiver input pin.

SC0_RST O Smart Card 0 reset pin.

SC1_PWR O Smart Card 1 power pin.

TM_BRAKE1 I Timer Brake 1 input pin.

PWM1_BRAKE1 I PWM1 Brake 1 input pin.

TM2 I/O Timer2 event counter input/toggle output pin.

59 PA.7 I/O General purpose digital I/O pin.

SPI1_CLK I/O SPI1 serial clock pin.

TM0_EXT I/O Timer0 external capture input/toggle output pin.

TM_BRAKE1 I Timer Brake 1 input pin.

EBI_AD7 I/O EBI address/data bus bit 7.

60 PA.6 I/O General purpose digital I/O pin.

SPI1_MISO I/O SPI1 MISO (Master In, Slave Out) pin.

Page 17: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 17 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

TM1_EXT I/O Timer1 external capture input/toggle output pin.

TM_BRAKE2 I Timer Brake 2 input pin.

EBI_AD6 I/O EBI address/data bus bit 6.

61 PA.5 I/O General purpose digital I/O pin.

SPI1_MOSI I/O SPI1 MOSI (Master Out, Slave In) pin.

TM2_EXT I/O Timer2 external capture input/toggle output pin.

TM_BRAKE3 I Timer Brake 3 input pin.

EBI_AD5 I/O EBI address/data bus bit 5.

62 PA.4 I/O General purpose digital I/O pin.

SPI1_SS I/O SPI1 slave select pin.

TM3_EXT I/O Timer3 external capture input/toggle output pin.

EBI_AD4 I/O EBI address/data bus bit 4.

63 VSS P Ground pin for digital circuit.

64 VDD P Power supply for I/O ports and LDO source for internal PLL and digital circuit.

65 PE.1 I/O General purpose digital I/O pin.

TM3_EXT I/O Timer3 external capture input/toggle output pin.

SC0_nCD I Smart Card 0 card detect pin.

PWM0_CH1 I/O PWM0 channel 1 output/capture input.

66 PE.8 I/O General purpose digital I/O pin.

UART1_TXD O UART1 data transmitter output pin.

TM0 I/O Timer0 event counter input/toggle output pin.

I2C1_SCL I/O I2C1 clock pin.

SC0_PWR O Smart Card 0 power pin.

67 PE.9 I/O General purpose digital I/O pin.

UART1_RXD I UART1 data receiver input pin.

TM1 I/O Timer1 event counter input/toggle output pin.

I2C1_SDA I/O I2C1 data input/output pin.

SC0_RST O Smart Card 0 reset pin.

68 PE.10 I/O General purpose digital I/O pin.

SPI1_MISO I/O SPI1 MISO (Master In, Slave Out) pin.

SPI0_MISO I/O SPI0 MISO (Master In, Slave Out) pin.

UART1_nCTS I UART1 clear to Send input pin.

SC0_DAT I/O Smart Card 0 data pin.

SPI1_CLK I/O SPI1 serial clock pin.

Page 18: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 18 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

EBI_AD7 I/O EBI address/data bus bit 7.

TM0_EXT I/O Timer0 external capture input/toggle output pin.

69 PE.11 I/O General purpose digital I/O pin.

SPI1_MOSI I/O SPI1 MOSI (Master Out, Slave In) pin.

SPI0_MOSI I/O SPI0 MOSI (Master Out, Slave In) pin.

UART1_nRTS O UART1 request to Send output pin.

SC0_CLK O Smart Card 0 clock pin.

SPI1_MISO I/O SPI1 MISO (Master In, Slave Out) pin.

EBI_AD6 I/O EBI address/data bus bit 6.

TM1_EXT I/O Timer1 external capture input/toggle output pin.

70 PE.12 I/O General purpose digital I/O pin.

SPI1_SS I/O SPI1 slave select pin.

SPI0_SS I/O SPI0 slave select pin.

UART1_TXD O UART1 data transmitter output pin.

I2C0_SCL I/O I2C0 clock pin.

SPI1_MOSI I/O SPI1 MOSI (Master Out, Slave In) pin.

EBI_AD5 I/O EBI address/data bus bit 5.

TM2_EXT I/O Timer2 external capture input/toggle output pin.

71 PE.13 I/O General purpose digital I/O pin.

SPI1_CLK I/O SPI1 serial clock pin.

SPI0_CLK I/O SPI0 serial clock pin.

UART1_RXD I UART1 data receiver input pin.

I2C0_SDA I/O I2C0 data input/output pin.

SPI1_SS I/O SPI1 slave select pin.

EBI_AD4 I/O EBI address/data bus bit 4.

TM3_EXT I/O Timer3 external capture input/toggle output pin.

72 VDDIO P Power supply for PE.1, PE.8~PE.13.

73 USB_VBUS P Power supply from USB host or HUB.

74 USB_D- A USB differential signal D+.

75 USB_D+ A USB differential signal D-.

76 PF.7 I/O General purpose digital I/O pin.

77 USB_VDD33_CAP A Internal power regulator output 3.3V decoupling pin.

78 PB.12 I/O General purpose digital I/O pin.

PWM1_CH1 I/O PWM1 channel 1 output/capture input.

Page 19: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 19 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

79 PA.3 I/O General purpose digital I/O pin.

UART0_RXD I UART0 data receiver input pin.

UART0_nRTS O UART0 request to Send output pin.

I2C0_SCL I/O I2C0 clock pin.

SC0_PWR O Smart Card 0 power pin.

PWM1_CH2 I/O PWM1 channel 2 output/capture input.

EBI_AD3 I/O EBI address/data bus bit 3.

USCI1_CLK I/O USCI1 clock pin.

80 PA.2 I/O General purpose digital I/O pin.

UART0_TXD O UART0 data transmitter output pin.

UART0_nCTS I UART0 clear to Send input pin.

I2C0_SDA I/O I2C0 data input/output pin.

SC0_RST O Smart Card 0 reset pin.

PWM1_CH3 I/O PWM1 channel 3 output/capture input.

EBI_AD2 I/O EBI address/data bus bit 2.

USCI1_CTL0 I/O USCI1 control 0 pin.

81 PA.1 I/O General purpose digital I/O pin.

UART1_nRTS O UART1 request to Send output pin.

UART1_RXD I UART1 data receiver input pin.

USCI1_CTL1 I/O USCI1 control 1 pin.

SC0_DAT I/O Smart Card 0 data pin.

PWM1_CH4 I/O PWM1 channel 4 output/capture input.

EBI_AD1 I/O EBI address/data bus bit 1.

82 PA.0 I/O General purpose digital I/O pin.

UART1_nCTS I UART1 clear to Send input pin.

UART1_TXD O UART1 data transmitter output pin.

USCI1_CTL0 I/O USCI1 control 0 pin.

SC0_CLK O Smart Card 0 clock pin.

PWM1_CH5 I/O PWM1 channel 5 output/capture input.

EBI_AD0 I/O EBI address/data bus bit 0.

INT0 I External interrupt 0 input pin.

83 PA.12 I/O General purpose digital I/O pin.

SPI1_I2SMCLK I/O SPI1 I2S master clock output pin

UART2_RXD I UART2 data receiver input pin.

Page 20: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 20 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

UART1_RXD I UART1 data receiver input pin.

TM_BRAKE2 I Timer Brake 2 input pin.

84 PA.13 I/O General purpose digital I/O pin.

UART2_TXD O UART2 data transmitter output pin.

UART1_TXD O UART1 data transmitter output pin.

TM_BRAKE3 I Timer Brake 3 input pin.

85 PA.14 I/O General purpose digital I/O pin.

UART2_nCTS I UART2 clear to Send input pin.

USCI1_CTL1 I/O USCI1 control 1 pin.

TM2 I/O Timer2 event counter input/toggle output pin.

86 PA.15 I/O General purpose digital I/O pin.

UART2_nRTS O UART2 request to Send output pin.

USCI1_CLK I/O USCI1 clock pin.

TM3 I/O Timer3 event counter input/toggle output pin.

87 VSS P Ground pin for digital circuit.

88 VDD P Power supply for I/O ports and LDO source for internal PLL and digital circuit.

89 AVDD P Power supply for internal analog circuit.

90 VREF A ADC reference voltage input.

Note: This pin needs to be connected with a 1uF capacitor.

91 PB.0 I/O General purpose digital I/O pin.

ADC0_CH0 A ADC0 channel 0 analog input.

VDET_P0 A Voltage detector positive input 0 pin.

UART2_RXD I UART2 data receiver input pin.

TM2 I/O Timer2 event counter input/toggle output pin.

USCI1_DAT0 I/O USCI1 data 0 pin.

EBI_nWRL O EBI low byte write enable output pin.

INT1 I External interrupt 1 input pin.

TM1_EXT I/O Timer1 external capture input/toggle output pin.

92 PB.1 I/O General purpose digital I/O pin.

ADC0_CH1 A ADC0 channel 1 analog input.

VDET_P1 A Voltage detector positive input 1 pin.

UART2_TXD O UART2 data transmitter output pin.

TM3 I/O Timer3 event counter input/toggle output pin.

SC0_RST O Smart Card 0 reset pin.

Page 21: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 21 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

PWM0_SYNC_OUT O PWM0 counter synchronous trigger output pin.

EBI_nWRH O EBI high byte write enable output pin

USCI1_DAT1 I/O USCI1 data 1 pin.

93 PB.2 I/O General purpose digital I/O pin.

ADC0_CH2 A ADC0 channel 2 analog input.

SPI0_CLK I/O SPI0 serial clock pin.

SPI1_CLK I/O SPI1 serial clock pin.

UART1_RXD I UART1 data receiver input pin.

SC0_nCD I Smart Card 0 card detect pin.

TM_BRAKE0 I Timer Brake 0 input pin.

EBI_nCS0 O EBI chip select 0 output pin.

USCI0_DAT0 I/O USCI0 data 0 pin.

TM2_EXT I/O Timer2 external capture input/toggle output pin.

94 PB.3 I/O General purpose digital I/O pin.

ADC0_CH3 A ADC0 channel 3 analog input.

SPI0_MISO I/O SPI0 MISO (Master In, Slave Out) pin.

SPI1_MISO I/O SPI1 MISO (Master In, Slave Out) pin.

UART1_TXD O UART1 data transmitter output pin.

TM_BRAKE1 I Timer Brake 1 input pin.

EBI_ALE O EBI address latch enable output pin.

USCI0_DAT1 I/O USCI0 data 1 pin.

TM0_EXT I/O Timer0 external capture input/toggle output pin.

95 PB.4 I/O General purpose digital I/O pin.

ADC0_CH4 A ADC0 channel 4 analog input.

SPI0_SS I/O SPI0 slave select pin.

SPI1_SS I/O SPI1 slave select pin.

UART1_nCTS I UART1 clear to Send input pin.

ACMP0_N A Analog comparator 0 negative input pin.

SC1_nCD I Smart Card 1 card detect pin.

EBI_AD7 I/O EBI address/data bus bit 7.

USCI0_CTL1 I/O USCI0 control 1 pin.

UART2_RXD I UART2 data receiver input pin.

TM1_EXT I/O Timer1 external capture input/toggle output pin.

96 PB.8 I/O General purpose digital I/O pin.

Page 22: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 22 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Pin No. Pin Name Type Description

ADC0_CH5 A ADC0 channel 5 analog input.

UART1_nRTS O UART1 request to Send output pin.

TM_BRAKE2 I Timer Brake 2 input pin.

PWM0_CH2 I/O PWM0 channel 2 output/capture input.

USCI0_CTL0 I/O USCI0 control 0 pin.

97 PB.9 I/O General purpose digital I/O pin.

ADC0_CH6 A ADC0 channel 6 analog input.

USCI0_CLK I/O USCI0 clock pin.

98 PB.10 I/O General purpose digital I/O pin.

ADC0_CH7 A ADC0 channel 7 analog input.

99 PB.11 I/O General purpose digital I/O pin.

ADC0_CH8 A ADC0 channel 8 analog input.

100 PE.2 I/O General purpose digital I/O pin.

ADC0_CH9 A ADC0 channel 9 analog input.

UART1_nRTS O UART1 request to Send output pin.

TM_BRAKE3 I Timer Brake 3 input pin.

PWM0_CH2 I/O PWM0 channel 2 output/capture input.

USCI0_CTL0 I/O USCI0 control 0 pin.

Table 2-1 Pin Assignment for NUC126

Page 23: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 23 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

NuTiny-SDK-NUC126 PCB Placement 2.3

Users can refer to Figure 2-2 for the NuTiny-SDK-NUC126 PCB placement.

Figure 2-2 NuTiny-SDK-NUC126 PCB Placement

Page 24: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 24 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

3 HOW TO START NUTINY-SDK-NUC126 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-NUC126 Hardware Setup

Page 25: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 25 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 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-NUC126 board. It can be found on Figure 3-2 list directory and downloaded from Nuvoton NuMicro

® website.

Directory C:\Nuvoton\BSP Library\NUC126BSP_V3.00.001\SampleCode\StdDriver\GPIO_INT\KEIL

Project File

Figure 3-2 Example Directory

To use this example:

This sample code runs some functions about system manager controller and clock controller, and will show messages by Uart. Users can see the messages by following the steps of Chapter 5.

Start μVision®

Project-Open

Open the SYS.uvproj project file

Project - Build

Compile and link the SYS application

Flash – Download

Program the application code into on-chip Flash ROM

Start debug mode

Using the debugger commands, you may:

Review variables in the watch window

Single step through code

Reset the device

Run the application

Page 26: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 26 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

4 HOW TO START NUTINY-SDK-NUC126 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-NUC126 Hardware Setup

Page 27: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 27 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Example Program 4.4

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

® website.

Directory C:\Nuvoton\BSP Library\NUC126BSP_V3.00.003\SampleCode\StdDriver\GPIO_INT\IAR

Project File

Figure 4-2 Example Directory

To use this example:

This sample code runs some functions about system manager controller and clock controller, and will show messages by Uart. Users can see the messages by following the steps of Chapter 5.

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 28: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 28 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

5 STARTING TO USE NU-LINK-ME 3.0 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 COM&LPT Driver

Page 29: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 29 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Figure 5-3 Install Nuvoton Universal Serial Bus Controllers

VCOM Mode Setting on NuTiny-SDK-NUC126 5.2

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

After connected USB port in Nu-Link-Me to the PC, user can find a “Nuvoton Virtual Com Port” from Device Manager as Figure 5-4.

Figure 5-4 Nuvoton Virtual Com Port

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_NUC126.h (which can be found in \\NUC126BSP_CMSIS_V3.00.001\Library\Device\Nuvoton\NUC126\Include) to check the using UART in DEBUG_PORT. The setting has to be the same as the using UART in the NuTiny-EVB-NUC126.

Page 30: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 30 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 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 31: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 31 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Step 2

Step 3

Page 32: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 32 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

5.3.3 Build and Download Code to NuTiny-SDK-NUC126

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

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, the chip will reprogram application and print out debug message.

Page 33: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 33 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Figure 5-7 Serial Port Terminal Windows

Notice: Please switch SW2 on before the NuTiny-SDK-NUC126 connects to the PC. When the NuTiny-SDK-NUC126 connects to the PC with SW2 switch on, PC will detect VCOM as a USB device and the detection will only be processed once. VCOM will not function if switch on SW2 after the connection.

Page 34: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 34 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

6 NUTINY-SDK-NUC126 SCHEMATIC

NuTiny-EVB-NUC126 Schematic 6.1

12 D2

SS24A

R21 0

GND

R190

Title

Size Document Number Rev

Date: Sheet of

<Doc> <Rev Code>

<Title>

A3

1 1Wednesday , October 05, 2016

JP7

NC

1234

JP8

NC

1234

P80

P96P95

P92P93

P79

P69

P70

P99

P94

R14 0

CB20.1u

D-

P25

P68

R15 0

D+

X2

12MHz

P28

P23

DX

32O

P66

P67

P30P31

P7

TIC

ER

ST

P2

P1

P8

P5

P9

P6

P10

P14

P11

P12

P4

P3

P16

P17

P15

P18

P13

P98

P100

P20

P21

P19

P90P91

P88P89

P29

P85

P83P84

P97

P87

C240.1u

P75

US

B_D

+

P77

P86

P72

P82

P78

P76

P81

P64

P71

P73

US

B_V

BU

SP

74

US

B_D

-

P55

TIC

EC

LK

P60

P63

P65

P62

P56

TIC

ED

AT

P59

P57

P61

P58

P54

P39

P33 D12MO

P51

P52

P38 PC9P37

P35

P53

P32

P40

P43

P41

P36

P34 D12MI

P47

P42

P44

P27

P45

P26

P48

P46

P49P50

X3

32.768K

VCC_connect D12MO

P22

DX32I

DX32O

D12MI

P96

P78P76

P80P82P84P86P88P90

P94

P98P100

P92 P93

P99GND

P95

P77

P85

P79

P89

P81P83

P91

P87

P97

C250.1u

P26

P32

P28

P40

P46

P50

P42

P30

P48

P44

P38

P34P36

P39

P29

P33

P47

P27

P37

P45

P49

P35

P43

P70

P54

P74

P41

P31

P64

P56

P66P68

P62

P69

P51

P72

P58P60

P52

P59

P65

P73

P63

P67

P61

P55P57

P75

P53

P21

P11

P23

P3

P7

P71

P9

P13

P25

P15

P19

P14

P5

P24

P1

P17P16

P4

P8

P12

P18

P10

P20P22

P2

P6

C260.1u

C31

0.1u

R17 0

D-

D+

USB_D+

USB_D-

R18 0

C270.1u

PC

9

VBAT

0ohm

12

JP5

NC

12345678910

11121314151617181920212223242526

J3

NC

VBUS1

D-2

D+3

GND5

ID4 Shield

6

Shield7

Shield8

Shield9

CON1 mini USB 5pin

USB_MINI_B

GND5 NC4 DP3 DM2 VCC1

SHIELD6

SHIELD7

SHIELD8

SHIELD9

C22 20p

JP4

HEADER 5X2

1 23 45 67 89 10

J2

NC

12345

U2

NUC126VG4AE

LQFP100

PC.550

PE.049

PC.448

PC.347

PC.246

PC.145

PC.044

PC.1443

PC.1342

PC.1241

PC.1140

PC.1039

PC.938

LDO_CAP37

VDD36

VSS35

PF.4/XT1_I34

PF.3//XT1_O33

PD.732

PD.1531

PD.1430

PD.1329

PD.1228

PD.1127

PD.1026

PF

.2/T

AM

PE

R25

PF

.1/X

32_I

24

PF

.0/X

32_O

23

VB

AT

22

PD

.621

PE

.320

PD

.418

PD

.519

PD

.317

PD

.216

PD

.115

PD

.914

PD

.813

PC

.812

VD

D10

VS

S11

AV

SS

9P

D.0

8R

ES

ET

#7

PB

.76

PB

.65

PB

.54

PB

.15

3P

B.1

42

PB

.13

1

PE.2100 PB.11

99 PB.1098 PB.997 PB.896 PB.495 PB.394 PB.293 PB.192 PB.091 VREF90 AVDD89 VDD88 VSS87 PA.1586 PA.1485 PA.1384 PA.1283 PA.082 PA.181 PA.280 PA.379 PB.1278 USB_LDO_CAP77 PF.776

US

B_D

+75

US

B_D

-74

VB

US

73

VD

DIO

72

PE

.13

71

PE

.12

70

PE

.11

69

PE

.10

68

PE

.967

PE

.866

PE

.165

VD

D64

VS

S63

PA

.462

PA

.561

PA

.660

PA

.759

PA

.958

PA

.857

PE

.6/I

CE

_C

LK

55

PE

.554

PE

.453

PC

.752

PC

.651

PE

.7/I

CE

_D

AT

56

VDDIO

0ohm

12

JP6

NC

12345678910

11121314151617181920212223242526

VREF0ohm

1 2

JP10

NC

1 23 45 67 89 1011 1213 1415 1617 1819 2021 2223 2425 26

JP11

NC

1 23 45 67 89 1011 1213 1415 1617 1819 2021 2223 2425 26

USB_VBUS

VDD AVDD

ADAVSS

VDD

VDD

VDDVDD

VREF

VREF VDD

VDD

ADAVSS

VDD

AVDD

VDD

VDD

TICEDATTICECLK

Tiny _RX

VDD

TICERSTTiny _TX

GND

GND

GND

TICERST

R1610K

R22 27

C2910uF/10V

12

USB Device

R12100

C321u

Reset

C23 20p

Crystal

R13100

Debug Interface & Off Page

C2810uF/10V

12

C13 20p

USB_VBUS

C1510uF/10V

12

R23 27

C14 20p

C331u

LED

P24

DX

32I

SW1

PUSH BOTTOM (B)

12

POWER1GREEN

Connector

C301uF/16V

12

Power

D-D+

USB_VBUS

L4

FERRITE BEAD

L5

FERRITE BEAD

L6 FERRITE BEAD

12

IO1

RED

Tiny _TXTiny _RX

R200

Page 35: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 35 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

Nu-Link-Me V3.0 Schematic 6.2

ISPLED

RED

ICELED

GREEN

ICEDATICECLK

RXD

ICERST

ICE_CLKICE_RST

ICE_DAT

ICE_TX

ICE_TX

ICE CONNECT IF

DEBUG

TXD

ICERST

ICE_RX

12M_I

12M_O

ICE_RX

VCC_connect

ICECLK

Title

Size Document Number Rev

Date: Sheet of

1 3.0

Nu-Link-Me

A4

1 10Tuesday , October 04, 2016

NU

C_

RS

T#

DP

N13

DM

VCC_connect

ICEDAT

TX

DR

XD

N12VCOM_pin

NUC_RST# ICE_RST

5V

USB_D+USB_D-

DPDM

RP1

8P4R-330

1 23 45 67 8

1 2PD1

SS24A

RTDA1100K

C5

0.1u

SW2

SW DIP-4/SM(EHS104LD)

JPR1

1&2 (R0603 0 ohm)

123

R133

C4

1uF/16V

12

UP1AMS1117_3.3v

IN3

GN

D1

OU

T2

OU

T4

R233

R410K

VCOM_pin

RTCK1100K

12

ICP1

YELLOW

C120p

ICE_RXICE_TX

J1

mini USB 5pin

GND5 NC4 DP3 DM2 VCC1

SHIELD6

SHIELD7

SHIELD8

SHIELD9

C320p

12

IDLE1

RED

CB1

0.1u

12

ICE1

RED

RTDA333

CP110uF/10V

12

R3 33

1 2

D1 SS24A

JP3

NC

1234

12

BUSY1

GREEN

L2FERRITE BEAD

X1

12MHz

L3FERRITE BEAD

U1

NUC12SRE3DE

PA0/ADC044PA1/ADC145PA2/ADC246PA3/ADC347PA4/ADC448INT0/PB14

1

CPO1/PB132

CPO0/PB123

VB

US

17

VD

D3

318

D-

19

D+

20

PB

0/R

X0

21

PB

1/T

X0

22

PB

2/R

TS

023

PB

3/C

TS

024

PC

2/S

DI0

026

PC

1/S

PC

LK

027

PC

0/S

S0

028

PC11/SDO1033PC10/SDI1034PC9/SPCLK135PC8/SS1036PA15/PWM337PA14/PWM238PA13/PWM139

X32I4

X32O5

I2C1SCL/PA116

I2C0SDA/PA89

I2C1SDA/PA107

I2C0SCL/PA98

RX1/PB410

TX1/PB511

RTS1/PB612

CTS1/PB713

PC

3/S

DO

00

25

AVSS43

ICE_CLK42

ICE_DAT41

PA12/PWM040

LDO14

VSS16 VDD15

AD

C/P

A5

49

AD

C6

/PA

650

AD

C7

/PA

751

AV

DD

52

CP

N0

/PC

753

CP

P0

/PC

654

CP

N1

/PC

15

55

CP

P1

/PC

14

56

INT

1/P

B1

557

XT

1_O

ut

58

XT

1_In

59

/RE

SE

T60

VS

S1

61

VD

D1

62

PV

SS

63

ST

AD

C/T

M0

/PB

864

PE

529

PB

11/T

M3

30

PB

10/S

S0

1/T

M2

31

PB

9/S

S1

1/T

M1

32

C210uF/10V

12

C6

1u

RTDA20

ICECLK

JP2

NC

1 23 45 67 89 10

L1

FERRITE BEAD

JP1

NC

12345

RRSET1100K

VCC

VCC

VCC

VCC

ADAVSS

ICE_AVDD

VCC

VCC

ICE_AVDD

ADAVSS

USBVBUS

3.3V

5V

USBVBUS

VCC

USBVBUS

VCC

USBVBUS

VCC

VCC_connect

VCCGND

VCC

Tiny _TX

TICECLKTICEDAT

TICERSTICE_USB

12M Oscillators

RESET

ICE_Status

SWD connect

Tiny _RX

power switch

12M

_IPVSS

12M

_O

ISPLEDREDGREEN

ICELED

VB

US

US

B_

D+

US

B_

D-

ICERST

ICE_CLKICE_DAT

ICEDAT

VCOM switch

3.3V

Page 36: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 36 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 U

SE

R M

AN

UA

L

7 REVISION HISTORY

Date Revision Description

2017.05.23 1.00 1. Initially issued.

Page 37: NuMicro Family NuTiny-SDK-NUC126 User Manual€¦ · Model JPR1 JP8 V DD CON1 USB Port J1 ICE USB Port MCU Voltage Model 1 Select 3.3V (Default) DC 3.3V Output X Connect to PC DC

NUC126

May 23, 2017 Page 37 of 37 Rev 1.00

NU

TIN

Y-S

DK

-NU

C12

6 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.