Download NuTiny-SDK-NUC140 User Manual
Transcript
NuTiny-SDK-NUC140 User Manual ARM Cortex™-M0 32-BIT MICROCONTROLLER NuTiny-SDK-NUC140 User Manual For NuMicro™ NUC140 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. - 1 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 1 Overview ..................................................................................................... 3 2 NuTiny-SDK-NUC140 Introduction ................................................................... 3 2.1 2.2 2.3 NuTiny -SDK-NUC140 Jumper Description................................................................. 4 Pin Assignment for Extended Connector ................................................................... 5 NuTiny-SDK-NUC140 PCB Placement ....................................................................... 6 How to Start NuTiny -SDK-NUC140 on the Keil μVision® IDE ............................... 7 3 3.1 3.2 3.3 3.4 4 Keil uVision® IDE Software Download and Install ....................................................... 7 Nuvoton Nu-Link Driver Download and Install............................................................ 7 Hardware Setup .................................................................................................... 7 Smpl_NuTiny-NUC140 Example Program .................................................................. 8 How to Start NuTiny-SDK-NUC140 on the IAR Embedded Workbench ................... 9 4.1 4.2 4.3 4.4 IAR Embedded Workbench Software Download and Install .......................................... 9 Nuvoton Nu-Link Driver Download and Install............................................................ 9 Hardware Setup .................................................................................................... 9 Smpl_NuTiny-NUC140 Example Program ................................................................ 10 5 NuTiny-EVB-NUC140 Schematic .................................................................... 11 6 Download NuMicro™ Family Related Files from Nuvoton Company ................................ 13 6.1 6.2 6.3 7 Download NuMicro™ Keil μVision® IDE Driver ........................................................... 13 Download NuMicro™ IAR EWARM Driver .................................................................. 15 Download NuMicro™ NUC100 Series BSP Software Library ......................................... 17 Revision History ............................................................................................ 19 - 2 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 1 Overview NuTiny-SDK-NUC140 is the specific development tool for NuMicro NUC140 series. Users can use NuTiny-SDKNUC140 to develop and verify the application program easily. NuTiny-SDK-NUC140 includes two portions. One is NuTiny-EVB-NUC140 and the other is Nu-Link-Me. NuTiny-EVBNUC140 is the evaluation board and Nu-Link-Me is its Debug Adaptor. Thus, users do not need other additional ICE or debug equipments. 2 NuTiny-SDK-NUC140 Introduction NuTiny-SDK-NUC140 uses the NUC140VE3AN as the target microcontroller. Figure 2-1 is NuTiny-SDK-NUC140 for NUC140 series, the left portion is called NuTiny-EVB-NUC140 and the right portion is Debug Adaptor called Nu-LinkMe. NuTiny-EVB-NUC140 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 NUC140 series features. The NuTiny-EVB-NUC140 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. 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. Figure 2-1 NuTiny-SDK-NUC140 (Blue PCB Board) - 3 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 2.1 2.1.1 NuTiny -SDK-NUC140 Jumper Description Power Setting z z z z J1: USB port in NuTiny-EVB-NUC140 JP1: VCC5 Voltage connecter in NuTiny-EVB-NUC140 J2: USB port in Nu-Link-Me JPR1: Select 5V or 3V for system power POWER model J1 USB port J2 USB port JP2 VCC5 MCU Voltage Model 1 Connect to PC X DC 5V output DC 5V Model 2 X Connect to PC DC 5V output DC 5V Model 3 X X DC 2.8-5.5V input Voltage by VCC input X: Unused. 2.1.2 Debug Connector z JP4: Connector in target board (NuTiny-EVB-NUC140) for connecting with Nuvoton ICE adaptor (Nu-Link-Me) z JP9: Connector in ICE adaptor (Nu-Link-Me) for connecting with a target board (for example NuTiny-EVB-NUC140) 2.1.3 USB Connector z J1: Mini USB Connector in NuTiny-EVB-100 for application use z J2: Mini USB Connector in Nu-Link-Me connected to a PC USB port 2.1.4 Extended Connector z JP3, JP5, JP7 and JP8: Show all chip pins in NuTiny-EVB-NUC140 2.1.5 Reset Button z SW1: Reset button in NuTiny-EVB-NUC140 2.1.6 Power Connector z JP1: VCC connector in NuTiny-EVB-NUC140 z JP2: GND connector in NuTiny-EVB-NUC140 - 4 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 2.2 Pin Assignment for Extended Connector NuTiny-EVB-NUC140 provides NUC140VE3AN on board and the extended connector for LQFP-100 pin. Table 2-1 is the pin assignment for NUC140VE3AN. Pin No 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Pin Name PE15 PE14 PE13 PB14 PB13 PB12 X32O X32I PA11 PA10 PA9 PA8 PD8 PD9 PD10 PD11 PD12 PD14 PB4 PB5 PB6 PB7 LDO VDD VSS Pin No 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 Pin Name PE8 PE7 VBUS VDD33 DD+ PB0 PB1 PB2 PB3 PD6 PD7 PD14 PD15 PC5 PC4 PC3 PC2 PC1 PC0 PE6 PE5 PB11 PB10 PB9 Pin No 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 Pin Name PE4 PE3 PE2 PE1 PE0 PC13 PC12 PC11 PC10 PC9 PC8 PA15 PA14 PA13 PA12 ICE_DAT ICE_CK VDD VSS AVSS PA0 PA1 PA2 PA3 PA4 Pin No 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Pin Name PA5 PA6 PA7 Vref AVDD PD0 PD1 PD2 PD3 PD4 PD5 PC7 PC6 PC15 PC14 PB15 XT1_Out XT1_In /RESET VSS VDD PS2DAT PS2CLK PVSS PB8 Table 2-1 Pin Assignment for NUC 140 Series - 5 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 2.3 NuTiny-SDK-NUC140 PCB Placement Users can refer to Figure 2-2 for the NuTiny-SDK-NUC140 PCB placements. Figure 2-2 NuTiny-SDK-NUC140 PCB Placement - 6 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 3 How to Start NuTiny -SDK-NUC140 on the Keil μVision® IDE 3.1 Keil uVision® IDE Software Download and Install Please visit the Keil company website (http://www.keil.com) to download the Keil μVision® IDE and install the RVMDK. 3.2 Nuvoton Nu-Link Driver Download and Install Please visit the Nuvoton company NuMicro™ website (http://www.nuvoton.com/NuMicro ) to download “NuMicro™ Keil μVision® IDE driver” file. Please refer to Chapter 6.1 for the detail download flow. 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. 3.3 Hardware Setup The hardware setup is shown as Figure 3-1 Figure 3-1 NuTiny-SDK-NUC140 Hardware Setup - 7 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 3.4 Smpl_NuTiny-NUC140 Example Program This example demonstrates the ease of downloading and debugging an application on a NuTiny-SDK-NUC140 board. It can be found on Figure 3-2 list directory and downloaded from Nuvoton NuMicro™ website following on Chapter 6.3. Directory Project File Figure 3-2 Smpl_NuTiny_140 Example Directory To use this example: The PA.11 LED will toggle on the NuTiny-EVB-NUC140 board. Start μVision® Project-Open Open the Smpl_NuTiny_100.uvproj project file Project - Build Compile and link the Smpl_NuTiny-NUC100 application Flash – Download Program the application code into on-chip Flash ROM - 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 Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 4 How to Start NuTiny-SDK-NUC140 on the IAR Embedded Workbench 4.1 IAR Embedded Workbench Software Download and Install Please connect to IAR company website (http://www.iar.com) to download the IAR Embedded Workbench and install the EWARM. 4.2 Nuvoton Nu-Link Driver Download and Install 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 as Figure 4-1 Figure 4-1 NuTiny- SDK-NUC140-100 Hardware Setup - 9 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 4.4 Smpl_NuTiny-NUC140 Example Program This example demonstrates the ease of downloading and debugging an application on a NuTiny-SDK-NUC140 board. It can be found on Figure 4-2 list directory and downloaded from Nuvoton NuMicro™ website following on Chapter 6.3. Directory Project File Figure 4-2 Smpl_NuTiny-NUC140 Example Directory To use this example: The PB.0 LED will toggle on the NuTiny-EVB-NUC140 board. Start IAR Embedded Workbench File-Open-Workspace Open the Smpl_NuTiny_100.eww workspace file Project - Make Compile and link the Smpl_NuTiny-100 application - 10 - Project – Download and Debug Program the application code into on-chip Flash ROM. Single step through code Reset the device Run the application Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 5 NuTiny-EVB-NUC140 Schematic DVCC5 SW1 PUSH BOTTOM SW R1 10K R0603 TICEDAT TICECLK TICERST TICEDAT TICECLK TICERST ICERST VCC5 RESET ICEDAT ICECLK ICERST DVCC5 JP1 1 2 C1 10uF/10V TANT-A HEADER 2 Reset 1 2 DVCC5 JP4 1 3 5 7 9 2 4 6 8 10 HEADER 2 ICEDAT ICECLK ICERST DVCC5 DAVDD L1 L0603 HEADER 5X2 JP3 GND P74 P72 P70 P68 P66 P64 P62 P60 P58 P56 P54 P52 JP2 26 24 22 20 18 16 14 12 10 8 6 4 2 L3 ICE INTERFACE JP5 25 23 21 19 17 15 13 11 9 7 5 3 1 P75 P73 P71 P69 P67 P65 P63 P61 P59 P57 P55 P53 P51 GND P49 P47 P45 P43 P41 P39 P37 P35 P33 P31 P29 P27 HEADER 13X2 L0603 26 24 22 20 18 16 14 12 10 8 6 4 2 P50 P48 P46 P44 P42 P40 P38 P36 P34 P32 P30 P28 P26 25 23 21 19 17 15 13 11 9 7 5 3 1 HEADER 13X2 ADAVSS C2 20p C3 20p DX32O C0603 C0603 X1 32.768K C4 20p C5 20p XTAL-3.4MM-2P DX32I C0603 C0603 JP8 D12MO P1 P3 P5 P7 P9 P11 P13 P15 P17 P19 P21 P23 P25 X2 12MHz XTAL3-1 D12MI Crystal 1 3 5 7 9 11 13 15 17 19 21 23 25 JP7 2 4 6 8 10 12 14 16 18 20 22 24 26 P2 P4 P6 P8 P10 P12 P14 P16 P18 P20 P22 P24 GND P76 P78 P80 P82 P84 P86 P88 P90 P92 P94 P96 P98 P100 1 3 5 7 9 11 13 15 17 19 21 23 25 P77 P79 P81 P83 P85 P87 P89 P91 P93 P95 P97 P99 GND 2 4 6 8 10 12 14 16 18 20 22 24 26 DVCC5 HEADER 13X2 DVBUS P10 2 IO1 KPT-2012 1 KP-2012 R2 500 R0603 POWER1 KPT-2012 1 KP-2012 VCC5 VCC GND USBDUSBD+ R3 100 R0603 R4 100 R0603 1 2 3 4 HEADER 4 PR1 2 HEADER 13X2 JP6 DM1 DP1 DVCC5 500 R0603 DVBUS D1 NC 1 2 VCC5 J1 RB060L mini USB 5pin DM1 DP1 1 2 3 4 5 VCC DM DP NC GND SHIELD SHIELD SHIELD SHIELD L4 6 7 8 9 L0805 Title Nuvoton NU_TINY_140 Size Document Number Custom USB_MINI_B Date: - 11 - Tuesday , March 15, 2011 Rev 1.0 Sheet of Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual ADAVSS DVCC5 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 TM1/SPI1_CS1/PB.9 TM0/SPI0_CS1/PB.10 TM3/PB.11 PE.5 PE.6 SPI0_SC0 /PC.0 SPI0_CLK /PC.1 SPI0_DI_0 /PC.2 SPI0_DO_0/PC.3 SPI0_DI_1 /PC.4 SPI0_DO_1/PC.5 PD.15 PD.14 CAN0_TX/PD.7 CAN0_RX/PD.6 CTS0/PB.3 RTS0/PB.2 TX0 /PB.1 RX0 /PB.0 USB_D+ USB_DUSB_LDO33_OUT USB_LDO_IN_5V PE.7 PE.8 NUC140VE3CN DX32O DX32I D12MO D12MI RESET ADC5/PA.5 ADC6/PA.6 ADC7/SPI2_CS1/PA.7 VREF AVDD SPI2_CS0/PD.0 SPI2_CLK/PD.1 SPI2_DI_0/PD.2 SPI2_DO_0/PD.3 SPI2_DI_1/PD.4 SPI2_DO_1/PD.5 CPN0/PC.7 CPP0/PC.6 CPN1/PC.15 CPP1/PC.14 INT0/PB.15 XT_OUT XT_IN RESET VSS1 VDD1 PS2DAT PS2CLK PVSS TM0/PB.8 PE.15 PE.14 PE.13 INT0/SPI3_CS1/PB.14 CPO_1/PB.13 CPO_0/PB.12 X32_O X32_I I2C1_SCL/PA.11 I2C1_SDA/PA.10 I2C0_SCL/PA.9 I2C0_SDA/PA.8 SPI3_CS0/PD.8 SPI3_CLK/PD.9 SPI3_DI_0/PD.10 SPI3_DO_0/PD.11 SPI3_DI_1/PD.12 SPI3_DO_1/PD.13 RX1/PB.4 TX1/PB.5 RTS1/PB.6 CTS1/PB.7 LDO_OUT LDO_IN_5V VSS L0603 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 P50 P49 P48 P47 P46 P45 P44 P43 P42 P41 P40 P39 P38 P37 P36 P35 P34 P33 P32 P31 P30 P29 P28 P27 P26 USBD+ USBDDVBUS C6 1u 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 DVCC5 DAVDD P76 P77 P78 P79 P80 P81 P82 P83 P84 P85 P86 P87 P88 P89 P90 P91 P92 P93 P94 P95 P96 P97 P98 P99 P100 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 P14 P15 P16 P17 P18 P19 P20 P21 P22 P23 P24 P25 L2 ADC4/PA.4 ADC3/PA.3 ADC2/PA.2 ADC1/PA.1 ADC0/PA.0 AVSS VSS VDD ICE_CLK ICE_DAT PWM0/PA.12 PWM1/PA.13 PWM2/PA.14 PWM3/PA.15 SPI1_CS0/PC.8 SPI1_CLK/PC.9 SPI1_DI_0/PC.10 SPI1_DO_0/PC.11 SPI1_DI_1/PC.12 SPI1_DO_1/PC.13 PE.0 PE.1 PE.2 PE.3 PE.4 U1 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 P75 P74 P73 P72 P71 P70 P69 P68 P67 P66 P65 P64 P63 P62 P61 P60 P59 P58 P57 P56 P55 P54 P53 P52 P51 ICECLK ICEDAT DVCC5 CT1 10uF/6.3V TANT-R VCC CB1 0.1u C0603 Title Nuvoton NU_TINY_140 Size Document Number Custom Date: - 12 - Wednesday , April 13, 2011 Rev 1.0 Sheet of Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual Download NuMicro™ Family Related Files from Nuvoton Company 6 6.1 Download 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 - 13 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual Step 3 To download the file. Step 4 Download the NuMicro Keil μVision® IDE driver - 14 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 6.2 Step1 Download NuMicro™ IAR EWARM Driver Visit the Nuvoton NuMicro™ website: http://www.nuvoton.com/NuMicro Step2 Click here to enter Device Driver and Software Library - 15 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual Step 3 To download the file Step 4 Download the NuMicro™ IAR Embedded Workbench® driver - 16 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 6.3 Download NuMicro™ NUC100 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 - 17 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual To download the file Step 3 Step 4 Download the NuMicro™ NUC100 series software library - 18 - Publication Release Date: Apr. 20, 2011 Revision V1.0 NuTiny-SDK-NUC140 User Manual 7 Revision History Version Date Page Description 1.0 April 20, 2011 -- Initial Release 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. - 19 - Publication Release Date: Apr. 20, 2011 Revision V1.0