Download NuTiny-SDK-NUC123 User Manual
Transcript
NuTiny-SDK-NUC123 User Manual ARM Cortex™-M0 32-BIT MICROCONTROLLER NuTiny-SDK-NUC123 User Manual for NuMicro™ NUC123 Series 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. Aug. 30, 2012 Revision V1.0 NuTiny-SDK-NUC123 User Manual Table of Contents 1 Overview ........................................................................................................ 3 2 Introduction to NuTiny-SDK-NUC123 ...................................................................... 3 2.1 2.2 2.3 3 Starting to Use NuTiny-SDK-NUC123 with Keil μVision® IDE .......................................... 7 3.1 3.2 3.3 3.4 4 Downloading and Installing Keil uVision® IDE Software..............................................7 Downloading and Installing Nuvoton Nu-Link Driver ..................................................7 Hardware Setup ...................................................................................................7 Smpl_NuTiny-NUC123 Example Program .................................................................8 Starting to Use NuTiny-SDK-NUC123 with IAR Embedded Workbench ............................. 9 4.1 4.2 4.3 4.4 5 Downloading and Installing IAR Embedded Workbench Software ................................9 Downloading and Installing Nuvoton Nu-Link Driver ..................................................9 Hardware Setup ...................................................................................................9 Smpl_NuTiny-NUC123 Example Program ............................................................... 10 NuTiny-SDK-NUC123 Schematics ....................................................................... 11 5.1 5.2 NuTiny-EVB-NUC123 Schematic ........................................................................... 11 Nu-Link-Me Schematic ........................................................................................ 12 Downloading NuMicro™ Related Files from Nuvoton Website ....................................... 13 6 6.1 6.2 6.3 7 Jumper Description ...............................................................................................4 Pin Assignment for Extended Connectors .................................................................5 PCB Placement .....................................................................................................6 Downloading NuMicro™ Keil μVision® IDE Driver ..................................................... 13 Downloading NuMicro™ IAR EWARM Driver............................................................. 15 Downloading NuMicro™ NUC123 Series BSP Software Library ................................... 17 Revision History .............................................................................................. 19 Aug. 30, 2012 2 Revision V1.0 NuTiny-SDK-NUC123 User Manual 1 Overview ™ The NuTiny-SDK-NUC123 is a specific development tool for NuMicro NUC123 series. User can use NuTiny-SDKNUC123 to develop and verify the application program easily. The NuTiny-SDK-NUC123 includes two parts: NuTinyEVB-NUC123 and Nu-Link-Me. The NuTiny-EVB-NUC123 is the evaluation board and Nu-Link-Me is its Debug Adaptor. Therefore, user does not need other additional ICE or debug equipment. 2 Introduction to NuTiny-SDK-NUC123 The NuTiny-SDK-NUC123 uses the NUC123SD4AN0 as the target microcontroller. Figure 2-1 shows the NuTiny-SDKNUC123 for NUC123 series, in which the left portion is called NuTiny-EVB-NUC123 and the right portion is called NuLink-Me. The NuTiny-EVB-NUC123 is similar to other development boards. User can use it to develop and verify applications to emulate the real behavior. The on-board chip covers NUC123 series features. The NuTiny-EVB-NUC123 can be a real system controller to design users’ target systems. The Nu-Link-Me is a Debug Adaptor, which 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. To use the Nu-Link-Me Debug ™ ™ Adaptor with IAR or Keil, please refer to the “Nuvoton NuMicro IAR ICE Driver User Manual“ or “Nuvoton NuMicro Keil ICE Driver User Manual” for details. The two documents will be stored in the local hard disk when each driver is installed. Figure 2-1 NuTiny-SDK-NUC123 (Purple PCB Board) Aug. 30, 2012 3 Revision V1.0 NuTiny-SDK-NUC123 User Manual 2.1 2.1.1 Jumper Description Power Settings J1: USB port in NuTiny-EVB-NUC123 JP1: VCC voltage connecter in NuTiny-EVB-NUC123 J2: USB port in Nu-Link-Me POWER Mode J2 USB Port J1 USB Port Mode 1 Connected to PC X Mode 2 X Connect to PC Mode 3 X X JP1 VCC DC 3.3 V or 5 V [1] Output DC 4.8 V or 5 V [2] Output DC 2.5 V ~ 5.5 V Input MCU Voltage DC 3.3 V or 5 V [1] DC 4.8 V or 5 V [2] DC 2.5 V ~ 5.5 V Decided by JP1 VCC Input X: Unused. Note [1]: It depends on the setting (VCC via connecting to 3.3 V or 5 V) at JPR jumper in the Nu-Link-Me. Note [2]: A diode device (4.8 V) must be put or both pins should be short (5 V) at D1 in the NuTiny-EVB-NUC123. 2.1.2 Debug Connectors JP3: The connector in the target board (NuTiny-EVB-NUC123) for connecting with Nuvoton ICE adaptor (NuLink or Nu-Link-Me) JP9: The connector in the ICE adaptor (Nu-Link-Me) for connecting with a target board (e.g. NuTiny-EVBNUC123) 2.1.3 USB Connectors J1: Mini USB connector in NuTiny-EVB-NUC123 for application use J2: Mini USB connector in Nu-Link-Me connected to a PC USB port 2.1.4 Extended Connectors JP5, JP6, JP7 and JP8: Show all chip pins in NuTiny-EVB-NUC123 2.1.5 Reset Button SW1: Reset button in NuTiny-EVB-NUC123 2.1.6 Power Connectors JP1: VCC connector in NuTiny-EVB-NUC123 JP2: GND connector in NuTiny-EVB-NUC123 Aug. 30, 2012 4 Revision V1.0 NuTiny-SDK-NUC123 User Manual 2.2 Pin Assignment for Extended Connectors The NuTiny-EVB-NUC123 provides the NUC123SD4AN0 target chip on board and the extended connectors (JP5, JP6, JP7 and JP8) for LQFP 64-pin. No Pin Name No Pin Name No Pin Name 1 PB.14/ INT 0 17 VBUS 33 2 PB.13 18 VDD33 34 19 D- 35 20 D+ 36 PC.11/MOSI10 52 21 PB.0/RXD0 37 PC.10/MISO10 53 3 4 5 PB.12/SPISS10/ CLKO PA.11/SPICLK1/ MOSI20/I2C1SCL PA.10/MISO10/ MISO20/I2C1SDA VSS No PC.13/MOSI11/ PWM3/CLKO PC.12/MISO11/ PWM2/I2SMCLK 49 50 51 6 PD.8/MOSI10 22 PB.1/TXD0 38 VDD 54 7 PD.9 23 PB.2/RTS0/ T2EX 39 PC.9/SPICLK1 55 8 PD.10/CLKO 9 10 11 12 13 14 15 16 Pin Name PD.0/ADC0/ SPISS20/SPISS11 PD.1/ADC1/ SPICLK2/SPISS01 PD.2/ADC2/ MISO20/MISO01 PD.3/ADC3/ MOSI20/MOSI01 PD.4/ADC4/ MISO21 PD.5/ADC5/ MOSI21 PB.15/ INT 1 / T0EX PB.3/CTS0/ 40 PC.8/SPISS10 56 PF.0/XT1_OUT T3EX PA.15/PWM3/ 25 PC.5/MOSI01/ 41 57 PF.1/XT1_IN PD.11/ INT 1 TXD0 I2SMCLK/CLKO PB.4/RXD1/ PC.4/MISO01/ 26 42 VSS 58 /RESET SPISS20/SPISS11 RXD0 PB.5/TXD1 PC.3/MOSI00/ 43 59 27 PA.14/PWM2 VSS SPICLK2 I2SDO PB.6/RTS1 PC.2/MISO00/ 28 44 PA.13/PWM1 60 VDD MOSI20 I2SDI PB.7/CTS1 PF.2/ADC6/ 29 PC.1/SPICLK0/ 45 PA.12/PWM0 61 MISO20 I2SBCLK I2C0SDA/PS2DAT PC.0/SPISS00/ PF.3/ADC7/ LDO 30 46 ICE_DAT 62 I2SLRCLK I2C0SCL/PS2CLK PB.10/SPISS01/ 31 47 VDD ICE_CK 63 PVSS TM2 PB.9/SPISS11/ VSS 32 48 AVDD 64 PB.8/TM0 TM1 Table 2-1 NUC123SD4AN0 LQFP 64-pin Assignment for Extended Connectors Aug. 30, 2012 24 5 Revision V1.0 NuTiny-SDK-NUC123 User Manual 2.3 PCB Placement The following figure shows the NuTiny-SDK-NUC123 PCB placement. Figure 2-2 NuTiny-SDK-NUC123 PCB Placement Aug. 30, 2012 6 Revision V1.0 NuTiny-SDK-NUC123 User Manual 3 3.1 Starting to Use NuTiny-SDK-NUC123 with Keil μVision® IDE Downloading and Installing Keil uVision® IDE Software ® Please visit the Keil company website (http://www.keil.com) to download the Keil μVision IDE and install the RVMDK. 3.2 Downloading and Installing Nuvoton Nu-Link Driver ™ ™ ® Please visit Nuvoton NuMicro website (http://www.nuvoton.com/NuMicro) to download the “NuMicro Keil μVision IDE ™ ® driver” file. Please refer to 6.1 Downloading NuMicro Keil μVision IDE Driver for the detailed download flow. After the Nu-Link driver is downloaded, please unzip the file and execute the “Nu-Link_Keil_Driver.exe” to install the driver. 3.3 Hardware Setup The hardware setup is shown in the following figure. Figure 3-1 NuTiny-SDK-NUC123 Hardware Setup Aug. 30, 2012 7 Revision V1.0 NuTiny-SDK-NUC123 User Manual 3.4 Smpl_NuTiny-NUC123 Example Program This example, as shown in the directory in Figure 3-2, demonstrates downloading and debugging an application on a ™ NuTiny-SDK-NUC123 board. The example file can be downloaded from Nuvoton NuMicro website as described in 6.3 ™ Downloading NuMicro NUC123 Series BSP Software Library. Directory Project File Figure 3-2 Smpl_NuTiny_NUC123 Example Directory To use the example: The PB.4 LED on the NuTiny-EVB-NUC123 board will be toggled On. Start μVision ® Project - Open Open the Smpl_NuTiny_NUC123.uvproj project file Project - Build Compile and link the Smpl_NuTiny-NUC123 application Flash – Download Program the application code into on-chip Flash ROM Aug. 30, 2012 8 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 Revision V1.0 NuTiny-SDK-NUC123 User Manual 4 Starting to Use NuTiny-SDK-NUC123 with IAR Embedded Workbench 4.1 Downloading and Installing IAR Embedded Workbench Software Please connect to IAR company website (http://www.iar.com) to download the IAR Embedded Workbench and install the EWARM. 4.2 Downloading and Installing Nuvoton Nu-Link Driver ™ ™ Please connect to the Nuvoton Company NuMicro website (http://www.nuvoton.com/NuMicro) to download “NuMicro IAR ICE driver user manual” file. Please refer to Chapter 6.2 for the detail download flow. When the Nu-Link driver has been well downloaded, please unzip the file and execute the “Nu-Link_IAR_Driver.exe” to install the driver. 4.3 Hardware Setup The hardware setup is shown in the following figure. Figure 4-1 NuTiny- SDK-NUC123 Hardware Setup Aug. 30, 2012 9 Revision V1.0 NuTiny-SDK-NUC123 User Manual 4.4 Smpl_NuTiny-NUC123 Example Program This example, as shown in the directory in Figure 4-2, demonstrates downloading and debugging an application on a ™ NuTiny-SDK-NUC123 board. The example file can be downloaded from Nuvoton NuMicro website as described in 6.3 ™ Downloading NuMicro NUC123 Series BSP Software Library. Directory Project File Figure 4-2 Smpl_NuTiny-NUC123 Example Directory To use this example: The PB.4 LED will toggle on the NuTiny-EVB-NUC123 board. Start IAR Embedded Workbench File-Open-Workspace Open the Smpl_NuTiny_NUC123.eww workspace file Project – Download and Debug Program the application code into on-chip Flash ROM Single step through code Reset the device Run the application Project - Make Compile and link the Smpl_NuTiny-NUC123 application Aug. 30, 2012 10 Revision V1.0 NuTiny-SDK-NUC123 User Manual NuTiny-SDK-NUC123 Schematics 5 5.1 NuTiny-EVB-NUC123 Schematic DVCC5 TICEDAT TICECLK TICERST VCC5 ICEDAT ICECLK ICERST DVCC5 JP1 RESET RESET D12MI D12MO 1 2 C1 10uF/10V HEADER 2 Reset JP2 U6 1 2 DVCC5 JP3 1 3 5 7 9 2 4 6 8 10 ICEDAT ICECLK ICERST 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 TANT-A VCC5 P64 P63 P62 P61 P60 P59 P58 P60 P57 P56 P55 P54 P53 P52 P51 P50 P49 TICEDAT TICECLK TICERST ICERST TM0/PB.8 PVSS ICE_CK/PS2CLK/I2C0SCL/ADC7/PF.3 ICE_DAT/PS2DAT/I2C0SDA/ADC6/PF.2 VDD VSS RESET XT1_IN/PF.1 XT1_OUT/PF.0 T0EX/INT1/PB.15 MOSI21/ADC5/PD.5 MISO21/ADC4/PD.4 MOSI01/MOSI20/ADC3/PD.3 MISO01/MISO20/ADC2/PD.2 SPISS01/SPICLK2/ADC1/PD.1 SPISS11/SPISS20/ADC0/PD.0 R1 10K R0603 HEADER 2 DVCC5 DAVDD L1 L0603 HEADER 5X2 ICE INTERFACE C3 20p R2 33 D12MO R0603 C0603 C5 20p P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 P15 P16 X2 12MHz XTAL3-1 D12MI PB.14/INT0 PB.13 PB.12/SPISS10/CLKO PA.11/I2C1SCL/MOSI20/SPICLK1 PA.10/I2C1SDA/MISO20/MISO10 PD.8/MOSI10 PD.9 PD.10/CLKO PD.11/INT1 PB.4/RXD1/SPISS11/SPISS20 PB.5/TXD1/SPICLK2 PB.6/RTS1/MOSI20 PB.7/CTS1/MISO20 LDO VDD VSS CT1 1uF/6.3V TANT-R Crystal DVCC5 DVCC5 P10 2 R5 IO1 KPT-2012 1 KP-2012 DAVDD AVDD ICE_CK ICE_DAT PWM0/PA.12 PWM1/PA.13 PWM2/PA.14 VSS CLKO/I2SMCLK/PWM3/PA.15 SPISS10/PC.8 SPICLK1/PC.9 VDD MISO10/PC.10 MOSI10/PC.11 I2SMCLK/PWM2/MISO11/PC.12 CLKO/PWM3/MOSI11/PC.13 VSS 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 P48 P47 P46 P45 P44 P43 P42 P41 P40 P39 P38 P37 P36 P35 P34 P33 ICECLK ICEDAT NUC123LQFP64 500 R0603 PR1 DVBUS 500 R0603 P17 P18 P19 P20 P21 P22 P23 P24 P25 P26 P27 P28 P29 P30 P31 P32 POWER1 KPT-2012 1 KP-2012 DVBUS DM1 DP1 VCC5 VCC R6 33 R0603 1 2 3 4 USBDUSBD+ HEADER 4 D1 NC 1 2 VCC5 J1 RB060L mini USB 5pin JP4 USBDUSBD+ 2 VCC5 VBUS VDD33 DD+ PB.0/RXD0 PB.1/TXD0 PB.2/RTS0/T2EX PB.3/CTS0/T3EX PC.5/MOSI01/TXD0 PC.4/MISO01/RXD0 PC.3/MOSI00/I2SDO PC.2/MISO00/I2SDI PC.1/SPICLK0/I2SBCLK PC.0/SPISS00/I2SLRCLK PB.10/SPISS01/TM2 PB.9/SPISS11/TM1 VCC5 C0603 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 SW1 PUSH BOTTOM SW 1 2 3 4 5 DM1 DP1 R7 R0603 33 DVBUS VCC DM DP NC GND SHIELD SHIELD SHIELD SHIELD USB_MINI_B 6 7 8 9 L3 GND L0805 C6 0.1U C0603 P1 P3 P5 P7 P9 P11 P13 P15 JP5 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 HEADER 8X2 P2 P4 P6 P8 P10 P12 P14 P16 P17 P19 P21 P23 P25 P27 P29 P31 JP6 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 HEADER 8X2 P18 P20 P22 P24 P26 P28 P30 P32 P33 P35 P37 P39 P41 P43 P45 P47 JP7 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 P34 P36 P38 P40 P42 P44 P46 P48 P49 P51 P53 P55 P57 P59 P61 P63 HEADER 8X2 Size A3 Date: 11 1 3 5 7 9 11 13 15 2 4 6 8 10 12 14 16 P50 P52 P54 P56 P58 P60 P62 P64 HEADER 8X2 Title Aug. 30, 2012 JP8 Nuvoton NU_TINY_123 Document Number Rev 1.0 Friday , August 10, 2012 Sheet of Revision V1.0 NuTiny-SDK-NUC123 User Manual 5.2 Nu-Link-Me Schematic 2 ISPLED 2 ICP1 KPT-2012 1 KP-2012 1 3 5 7 NUC_RST# PVSS 2 4 6 8 8P4RA TICEDAT TICECLK TICERST GREEN 2 BUSY 1 KPT-2012 1 KP-2012 ICELED ISPLED RED GREEN HEADER 5X2 CB1 0.1u C0603 C8 20p R0603 C0603 X3 12MHz XTAL3-1 C9 20p 12M_I C0603 PA4/ADC4 PA3/ADC3 PA2/ADC2 PA1/ADC1 PA0/ADC0 AVSS ICE_CK ICE_DAT PA12/PWM0 PA13/PWM1 PA14/PWM2 PA15/PWM3 PC8/SS10 PC9/SPCLK1 PC10/SDI10 PC11/SDO10 NUC12SRE3AN VBUS VDD33 DD+ PB0/RX0 PB1/TX0 PB2/RTS0 PB3/CTS0 PC3/SDO00 PC2/SDI00 PC1/SPCLK0 PC0/SS00 PE5 PB11/TM3 PB10/SS01/TM2 PB9/SS11/TM1 VCC5 INT0/PB14 CPO1/PB13 CPO0/PB12 X32I X32O I2C1SCL/PA11 I2C1SDA/PA10 I2C0SCL/PA9 I2C0SDA/PA8 RX1/PB4 TX1/PB5 RTS1/PB6 CTS1/PB7 LDO VDD VSS 2 4 6 8 10 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 VCC5 ICE_CLK ICE_DAT RTCK1 100K R0603 ADAVSS TICERST TICECLK RTDA2 RTDA3 RTDA1 100K R0603 RRSET1 100K R0603 TICEDAT TICERST 0 1K R0603 R0603 VCC5 VCC5 VCC5 USB_D+ USB_D- VBUS 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 CT2 10uF/6.3V TANT-R 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 3 5 7 9 TICEDAT TICECLK TICERST R9 33 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 2 STADC/TM0/PB8 PVSS VDD1 VSS1 /RESET XT1_In XT1_Out INT1/PB15 CPP1/PC14 CPN1/PC15 CPP0/PC6 CPN0/PC7 AVDD ADC7/PA7 ADC6/PA6 ADC/PA5 RED U2 SS24A RB060L TANT-A AVDD 12M_O IDLE1 KPT-2012 1 KP-2012 D2 JP9 ICE_RST C7 10uF/10V NUC_RST# 12M_I 12M_O ICELED RP1 8P4R-330 2 R8 10K R0603 VCC5 ICE1 KPT-2012 1 KP-2012 1 VCC5 VCC5 ICE CONNECT IF VCC5 USBVBUS R11 33 R0603 USBVBUS C10 AVDD VCC5 L5 L0603 1u C0603 J2 mini USB 5pin 1 2 3 4 5 DM DP R12 33 R0603 CB2 0.1u C0603 VCC DM DP NC GND SHIELD SHIELD SHIELD SHIELD RTIDA1 100K R0603 HEADER 5 6 7 8 9 1 2 3 4 5 L4 USB_MINI_B ICE_DAT ICE_CLK ICE_RST RICK1 100K R0603 DEBUG JP10 L0805 L6 L0603 ADAVSS USBVBUS VCC5 VCC JP11 1 2 3 4 DM DP GND HEADER 4 VCC5 P5V 3 2 1 OUT JPR P3V HEADER 3 CP1 10uF/10V RB060L TANT-B Aug. 30, 2012 Title Nuvoton NU_TINY_123 Size A3 Document Number 4 PD2 SS24A 1 2 3 1 2 USBVBUS IN GND OUT UP6 RT9164A-3.3v 12 Date: Rev 1.0 Monday , July 30, 2012 Sheet of Revision V1.0 NuTiny-SDK-NUC123 User Manual 6 6.1 Downloading NuMicro™ Related Files from Nuvoton Website Downloading NuMicro™ Keil μVision® IDE Driver Step1 ™ Visit the Nuvoton NuMicro website: http://www.nuvoton.com/NuMicro Step2 Click here to enter Device Driver and Software Library. Aug. 30, 2012 13 Revision V1.0 NuTiny-SDK-NUC123 User Manual Step 3 Click here to download the file. Step 4 ™ ® Download the NuMicro Keil μVision IDE driver. Aug. 30, 2012 14 Revision V1.0 NuTiny-SDK-NUC123 User Manual 6.2 Step1 Downloading NuMicro™ IAR EWARM Driver ™ Visit the Nuvoton NuMicro website: http://www.nuvoton.com/NuMicro. Step2 Click here to enter Device Driver and Software Library. Aug. 30, 2012 15 Revision V1.0 NuTiny-SDK-NUC123 User Manual Step 3 Click here to download the file. Step 4 ™ ® Download the NuMicro IAR Embedded Workbench driver. Aug. 30, 2012 16 Revision V1.0 NuTiny-SDK-NUC123 User Manual 6.3 Downloading NuMicro™ NUC123 Series BSP Software Library Step1 ™ Visit the Nuvoton NuMicro website: http://www.nuvoton.com/NuMicro. Step2 Click here to enter Device Driver and Software Library. Aug. 30, 2012 17 Revision V1.0 NuTiny-SDK-NUC123 User Manual Click here to download the file. Step 3 Step 4 ™ Download the NuMicro NUC123 series software library. Aug. 30, 2012 18 Revision V1.0 NuTiny-SDK-NUC123 User Manual 7 Revision History Revision Date Description 1.0 Aug. 16, 2012 Preliminary version Important Notice Nuvoton products are not designed, intended, authorized or warranted for use as components in systems or equipment intended for surgical implantation, atomic energy control instruments, airplane or spaceship instruments, transportation instruments, traffic signal instruments, combustion control instruments, or for other applications intended to support or sustain life. Further more, Nuvoton products are not intended for applications wherein failure of Nuvoton products could result or lead to a situation wherein personal injury, death or severe property or environmental damage could occur. Nuvoton customers using or selling these products for use in such applications do so at their own risk and agree to fully indemnify Nuvoton for any damages resulting from such improper use or sales. Please note that all data and specifications are subject to change without notice. All the trademarks of products and companies mentioned in this datasheet belong to their respective owners. Aug. 30, 2012 19 Revision V1.0