Nuvoton ARM Cortex-M User Manual

Nuvoton ARM Cortex-M User Manual

32-bit microcontroller
Table of Contents

Advertisement

Quick Links

NuMaker-NUC131U
®
®
ARM
Cortex
-M
32-bit Microcontroller
NuMaker-NUC131U
User Manual
®
NuMicro
NUC131SD2AEU
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
May.
07, 2020
Page 1 of 46
Rev 1.00

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ARM Cortex-M and is the answer not in the manual?

Questions and answers

Summary of Contents for Nuvoton ARM Cortex-M

  • Page 1 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.
  • Page 2: Table Of Contents

    Status LEDs ....................24 3.10.2 Quick Start ..................25 Toolchains Supporting ................25 Nuvoton Nu-Link Driver Installation ..............25 BSP Firmware Download ................27 Hardware Setup ..................27 Find the Example Project ................29 Execute the Project under Toolchains ............. 29 Keil MDK .......................
  • Page 3 NuMaker-NUC131U IAR EWARM ....................33 4.6.2 NuEclipse ...................... 35 4.6.3 NuMaker-NUC131U Schematics .............. 41 Nu-Link2-Me ................... 41 NUC131U platform ................... 42 Extension Connector ................. 43 PCB Placement ..................44 REVISION HISTORY ................45 May. 07, 2020 Page 3 of 46 Rev 1.00...
  • Page 4 NuMaker-NUC131U List of Figures Figure 1-1 NuMaker-NUC131U Development Board ..............7 Figure 3-1 Front View of NuMaker-NUC131U ................. 9 Figure 3-2 Rear View of NuMaker-NUC131U ................10 Figure 3-3 NUC131SD2AEU Extension Connectors ..............11 Figure 3-4 Arduino UNO Compatible Extension Connectors ............14 Figure 3-5 External Power Supply Sources on Nu-Link2-Me ............
  • Page 5 NuMaker-NUC131U Figure 4-28 NuEclipse Debug Mode ....................40 Figure 4-29 Debug Message on Serial Port Terminal Windows ............ 40 Figure 5-1 Nu-Link2-Me Circuit ...................... 41 Figure 5-2 NUC131U platform Circuit .................... 42 Figure 5-3 Extension Connectors Circuit ..................43 Figure 5-4 Front Placement ......................44 Figure 5-5 Rear Placement ......................
  • Page 6 NuMaker-NUC131U List of Tables Table 3-1 Extension Connectors ....................11 Table 3-2 NUC131SD2AEU Full-pin Extension Connectors and GPIO Function List ....13 Table 3-3 Arduino UNO Extension Connectors and NUC131SD2AEU Mapping GPIO List ..15 Table 3-4 Vin Power Source ......................16 Table 3-5 5 V Power Sources ......................
  • Page 7: Overview

    NUC131SD2AEU, the Arduino UNO compatible headers and able to adopt multiple power supply. Furthermore, the Nuvoton-designed ammeter connector can measure the power consumption instantly, which is essential for the prototype evaluation. Finally yet importantly, the NUC131U platform is implemented a CAN bus interface with an AEC-Q100 qualified high-speed CAN transceiver to realize new CAN design.
  • Page 8: Features

    NuMaker-NUC131U FEATURES ®  NuMicro NUC131SD2AEU microcontroller with function compatible with:  NUC131SC2AEU  NUC131SD2AEU extension connectors  Arduino UNO compatible extension connectors  Ammeter connector for measuring the microcontroller’s power consumption  AEC-Q100 qualified high-speed CAN transceiver  Flexible board power supply: ...
  • Page 9: Hardware Configuration

    NuMaker-NUC131U HARDWARE CONFIGURATION Front View Arduino UNO Compatible Extension Connectors Switch Reset Button External V Connector Ammeter VCOM Switch External V Connector ICE USB Connector USB PWR Connector ICE Chip: M48SSIDAE CAN Transceiver ICE Status LED Off-line Program Button External V Connector NUC131U Platform Nu-Link2-Me...
  • Page 10: Rear View

    NuMaker-NUC131U Rear View Figure 3-2 shows the main components and connectors from the rear side of NuMaker-NUC131U. The following lists components and connectors from the rear view:  Nu-Link2-Me  MCUVCC Power Switch (ICEJPR1)  ICEVCC Power Switch (ICEJPR2) ICEVCC Power Switch MCUVCC Power Switch Figure 3-2 Rear View of NuMaker-NUC131U May.
  • Page 11: Extension Connectors

    NuMaker-NUC131U Extension Connectors Table 3-1 presents the extension connectors. Connector Description JP3, JP4, JP5 and JP6 Full pins extension connectors on the NuMaker-NUC131U. NU1, NU2, NU3 and NU4 Arduino UNO compatible pins on the NuMaker-NUC131U. Table 3-1 Extension Connectors 3.3.1 Pin Assignment for Extension Connectors The NuMaker-NUC131U provides the NUC131SD2AEU onboard and extension connectors (JP3, JP4, JP5 and JP6).
  • Page 12 NuMaker-NUC131U NUC131SD2AEU Header Pin No. Function JP3.1 JP3.2 PB.14/INT0 JP3.3 JP3.4 PB.13 JP3.5 JP3.6 PB.12/CLKO/BPWM1_CH3 JP3.7 JP3.8 PF.5/I2C0_SCL/PWM1_CH5 JP3.9 JP3.10 PF.4/I2C0_SDA/PWM1_CH4 JP3.11 JP3.12 PA.11/I2C1_SCL/PWM1_CH3 JP3.13 JP3.14 PA.10/I2C1_SDA/PWM1_CH2 JP3.15 JP3.16 PA.9/I2C0_SCL/UART1_nCTS JP3.17 JP3.18 PA.8/I2C0_SDA/UART1_nRTS JP3.19 JP3.20 PB.4/UART1_RXD JP3.21 JP3.22 PB.5/UART1_TXD JP3.23 JP3.24 PB.6/UART1_nRTS JP3.25...
  • Page 13: Table 3-2 Nuc131Sd2Aeu Full-Pin Extension Connectors And Gpio Function List

    NuMaker-NUC131U JP4.7 JP4.8 PC.8/PWM0_BRAKE0 JP4.9 JP4.10 PA.15/PWM0_CH3 JP4.11 JP4.12 PA.14/PWM0_CH2 JP4.13 JP4.14 PA.13/PWM0_CH1/UART5_TXD JP4.15 JP4.16 PA.12/PWM0_CH0/UART5_RXD JP4.17 JP4.18 PF.7/ICE_DAT JP4.19 JP4.20 PF.6/ICE_CLK JP4.21 JP4.22 AVSS JP4.23 JP4.24 PA.0/ADC_CH0/I2C1_SCL/UART5_TXD/PWM0_CH4 JP4.25 JP4.26 PA.1/ADC_CH1/I2C1_SDA/UART5_RXD/PWM0_CH5 JP4.27 JP4.28 PA.2/ADC_CH2/UART3_TXD/PWM1_CH0 JP4.29 JP4.30 PA.3/ADC_CH3/UART3_RXD/PWM1_CH1 JP4.15 JP4.32 PA.4/ADC_CH4 JP6.1 JP6.2 PA.5/ADC_CH5/UART3_RXD...
  • Page 14: Arduino Uno Compatible Extension Connectors

    NuMaker-NUC131U 3.3.2 Arduino UNO Compatible Extension Connectors Figure 3-4 shows the Arduino UNO compatible extension connectors. MOSI GPIO PC.3 PB.13 MISO RESET PC.2 PC.1 nRESET PB.10 PWM0_CH0 PA.12 UART5_RXD PA.0 ADC_CH0 I2C1_SCL UART5_TXD UART5_TXD PWM0_CH1 PA.13 PA.1 ADC_CH1 I2C1_SDA UART5_RXD I2C1_SDA PWM1_CH2 PA.10 PA.2...
  • Page 15: Table 3-3 Arduino Uno Extension Connectors And Nuc131Sd2Aeu Mapping Gpio List

    NuMaker-NUC131U NuMaker-NUC131U NuMaker-NUC131U Header Header Compatible to GPIO Pin of Compatible to GPIO Pin of Arduino UNO NUC131SD2AEU Arduino UNO NUC131SD2AEU NU3.1 PA.12 NU2.6 PA.0 NU3.2 PA.13 NU2.5 PA.1 NU3.3 PA.10 NU2.4 PA.2 NU3.4 PA.11 NU2.3 PA.3 NU3.5 PA.14 NU2.2 PA.4 NU3.6 PA.15...
  • Page 16: Power Supply Configuration

    NuMaker-NUC131U Power Supply Configuration The NuMaker-NUC131U is able to adopt multiple power supply. External power source include NU1 Vin (7 V to 12 V), VDD (depends on target chip operating voltage), and PC through USB connector. By using switches and voltage regulator, multiple power domains can be created on the NuMaker- NUC131U.
  • Page 17: Power Sources

    NuMaker-NUC131U 3.4.3 3.3 V Power Sources Table 3-6 presents the 3.3 V power sources. Voltage Regulator 5 V Source Description ICEUP1 converts USB_HS_VBUS to 3.3 V and supplies ICEUP1 USB_HS_VBUS 3.3 V to NUC131U platform or ICE chip. UP1 converts USB_VBUS to 3.3 V and supplies 3.3 V to NUC131U platform.
  • Page 18: Usb Connectors

    NuMaker-NUC131U 3.4.6 USB Connectors Table 3-9 presents the USB connector. Connector Description ICE USB connector on Nu-Link2-Me for power supply, debugging and ICEJ3 programming from PC. USB FS connector on NuMaker-NUC131U for power supply. Table 3-9 USB Connectors 3.4.7 Power Switches Table 3-10 presents the power switches.
  • Page 19: Power Supply Models

    NuMaker-NUC131U 3.4.8 Power Supply Models 3.4.8.1 External Power Supply through Nu-Link2-Me to Target Chip The external power supply source on Nu-Link2-Me is shown in Figure 3-5. ICE USB Connector (ICEJ3) Nu-Link2-Me Figure 3-5 External Power Supply Sources on Nu-Link2-Me To use ICEJ3 on Nu-Link2-Me as external power supply source, please follow the below steps: 1.
  • Page 20: Figure 3-6 External Power Supply Sources On Nuc131U Platform

    NuMaker-NUC131U 3.4.8.2 External Power Supply through NUC131U platform to Target Chip The external power supply sources on NUC131U platform are shown in Figure 3-6. External V Connector (JP1) USB Power Connector (J2) External V Connector (JP2) NU1 pin8 (Vin) Figure 3-6 External Power Supply Sources on NUC131U platform To use Vin or J2 as external power supply source, please follow the below steps: 1.
  • Page 21: Figure 3-7 Detach The Nu-Link2-Me From Numaker-Nuc131U

    NuMaker-NUC131U External V Connector (JP1) USB Power Connector (J2) " External V Connector (JP2) Detach Nu-Link2-Me NU1 pin8 (Vin) Figure 3-7 Detach the Nu-Link2-Me from NuMaker-NUC131U Table 3-12 presents all power models when supplies external power through NUC131U platform. The NUC131U platform external power sources are highlighted in yellow.
  • Page 22: Can Bus Interface

    NuMaker-NUC131U CAN Bus Interface The NuMaker-NUC131U is implemented a CAN bus interface with an AEC-Q100 qualified high-speed CAN transceiver TJA1057GT/3. Table 3-13 presents the CAN bus interface and Table 3-14 presents the CAN transceiver pin connection. Component Description CAN transceiver TJA1057GT/3. For more information, please refer to TJA1057 product data sheet.
  • Page 23: Ammeter Connector

    NuMaker-NUC131U Ammeter Connector Table 3-16 presents the ammeter connector. Connector Description Connector for user to measure the target chip power consumption easily. AMMETER User needs to remove the R16 resistor. Table 3-16 Ammeter Connector Remove the R16 Resistor Figure 3-8 Wiring between Ammeter Connector and Ammeter Push Buttons Table 3-17 presents the push buttons.
  • Page 24: Nu-Link2-Me

    NuMaker-NUC131U 3.10 Nu-Link2-Me The Nu-Link2-Me is an attached on-board debugger and programmer. The Nu-Link2-Me supports on- chip debugging, online and offline ICP programming through SWD interface. The Nu-Link2-Me also supports virtual COM port (VCOM) for printing debug messages on PC. Besides, the programming status could be shown on the built-in LEDs.
  • Page 25: Quick Start

    KEIL MDK Nuvoton edition M0/M23  IAR EWARM  NuEclipse GCC (for Windows)  NuEclipse GCC (for Linux) Nuvoton Nu-Link Driver Installation Download and install the latest Nuvoton Nu-Link Driver.  Download and install Nu-Link_Keil_Driver when using Keil MDK.  Download and install Nu-Link_IAR_Driver when using IAR EWARM.
  • Page 26: Figure 4-2 Nu-Link Usb Driver Installation

    NuMaker-NUC131U Figure 4-2 Nu-Link USB Driver Installation May. 07, 2020 Page 26 of 46 Rev 1.00...
  • Page 27: Bsp Firmware Download

    NuMaker-NUC131U BSP Firmware Download Download and unzip the Board Support Package (BSP). Hardware Setup 1. Open the virtual COM (VCOM) function by changing Nu-Link2-Me VCOM Switch No. 1 and 2 to Figure 4-3 Open VCOM Function 2. Connect the ICE USB connector shown in Figure 4-4 to the PC USB port through USB cable. Figure 4-4 ICE USB Connector May.
  • Page 28: Figure 4-5 Device Manger

    NuMaker-NUC131U 3. Find the “Nuvoton Virtual COM Port” on the Device Manger as Figure 4-5. Figure 4-5 Device Manger 4. Open a serial port terminal, PuTTY for example, to print out debug message. Set the speed to 115200. Figure 4-6 presents the PuTTY session setting.
  • Page 29: Find The Example Project

    NuMaker-NUC131U Find the Example Project Use the “Template” project as an example. The project can be found under the BSP folder as shown in Figure 4-7.  NUC131_Series_BSP_CMSIS_V3.XX.XXX  SampleCode  Template   Keil  Figure 4-7 Template Project Folder Path Execute the Project under Toolchains Open and execute the project under the toolchain.
  • Page 30: Figure 4-9 Project File Migrate To Version 5 Format

    Figure 4-9 Project File Migrate to Version 5 Format 2. Make sure the debugger is “Nuvoton Nu-Link Debugger” as shown in Figure 4-10 and Figure 4-11. Note: If the dropdown menu in Figure 4-10 does not contain “Nuvoton Nu-Link Debugger” item, please rework section 4.2.
  • Page 31: Figure 4-11 Programming Setting In Options Window

    NuMaker-NUC131U Figure 4-11 Programming Setting in Options Window 3. Rebuild all target files. After successfully compile the project, download code to the flash memory. Click “Start/Stop Debug Section” button can enter debug mode. 1. Rebuild 2. Successfully compile 3. Download 4.
  • Page 32: Figure 4-13 Keil Mdk Debug Mode

    NuMaker-NUC131U 4. Figure 4-13 shows the debug mode under Keil MDK. Click “Run” and the debug message will be printed out as shown in Figure 4-14. User can debug the project under debug mode by checking source code, assembly language, peripherals’ registers, and setting breakpoint, step run, value monitor, etc.
  • Page 33: Figure 4-15 Iar Ewarm Window

    NuMaker-NUC131U 4.6.2 IAR EWARM This section provides steps to beginners on how to run a project by using IAR EWARM. 1. Double click the “Template.eww” to open the project. 2. Make sure the toolbar contain “Nu-Link” item as shown in Figure 4-15. Note: If the toolbar does not contain “Nu-Link”...
  • Page 34: Figure 4-17 Iar Ewarm Debug Mode

    NuMaker-NUC131U 4. Figure 4-17 shows the debug mode under IAR EWARN. Click “Go” and the debug message will be printed out as shown in Figure 4-18. User can debug the project under debug mode by checking source code, assembly language, peripherals’ registers, and setting breakpoint, step run, value monitor, etc.
  • Page 35: Figure 4-19 Import The Project In Nueclipse

    NuMaker-NUC131U 4.6.3 NuEclipse This section provides steps to beginners on how to run a project by using NuEclipse. Please make sure the filenames and project folder path contain neither invalid character nor space. 1. Double-click NuEclipse.exe to open the toolchain. 2.
  • Page 36: Figure 4-21 Open Project Properties Window

    NuMaker-NUC131U 3. Click the “Template” project and find the project properties as shown in Figure 4-21. Make sure the settings are the same as settings in Figure 4-22. Figure 4-21 Open Project Properties Window Figure 4-22 Project Properties Settings May. 07, 2020 Page 36 of 46 Rev 1.00...
  • Page 37: Figure 4-23 Build Project

    NuMaker-NUC131U 4. Click the “Template” project and build the project. Figure 4-23 Build Project 5. After the project is built, click the “Template” project and set the “Debug Configuration” as shown in Figure 4-24. Follow the settings presented in Figure 4-25, Figure 4-26 and Figure 4-27 to enter debug mode.
  • Page 38: Figure 4-25 Main Tab Configuration

    NuMaker-NUC131U Note 1: Double click the “GDB Nuvoton Nu-Link Debugging” to create the subitem. Note 2: After the project is built, the “*.elf” file will be shown in “C/C++ Application” frame. Figure 4-25 Main Tab Configuration Figure 4-26 Debugger Tab Configuration May.
  • Page 39: Figure 4-27 Startup Tab Configuration

    NuMaker-NUC131U Note 1: User must follow those settings highlighted in green, and can configure other settings depend on the needs. Figure 4-27 Startup Tab Configuration May. 07, 2020 Page 39 of 46 Rev 1.00...
  • Page 40: Figure 4-28 Nueclipse Debug Mode

    NuMaker-NUC131U 6. Figure 4-28 shows the debug mode under NuEclipse. Click “Resume” and the debug message will be printed out as shown in Figure 4-29. User can debug the project under debug mode by checking source code, assembly language, peripherals’ registers, and setting breakpoint, step run, value monitor, etc.
  • Page 41: Figure 5-1 Nu-Link2-Me Circuit

    NuMaker-NUC131U NUMAKER-NUC131U SCHEMATICS Nu-Link2-Me Figure 5-1 shows the Nu-Link2-Me circuit. 3.3V ICER1 O f f - page C onnect or 200 1% USB_HS_CAP R0603 ICE5V ICEC1 ICEC2 ICE5V 0.1u MCUVCC_DIODE C0603 C0603 MCUVCC_DIODE SWDH_DAT TICEDAT SWDH_CLK TICECLK SWDH_RST# TICERST ICE_RX_S MCU_TX ICE_TX_S MCU_RX...
  • Page 42: Figure 5-2 Nuc131U Platform Circuit

    NuMaker-NUC131U NUC131U platform Figure 5-2 shows the NUC131U platform circuit. P1 - P16 P33 - P48 PB14_LED_R PB14_LED_R PC11 PB13_NU5_GPIO PC10 PB12_NU4_D8 PA15_NU3_D5 PA11_NU3_D3 PA14_NU3_D4 PA10_NU3_D2 PA13_NU3_D1/TX PA9_NU4_SCL PA12_NU3_D0/RX PF7_ICE_DAT PA8_NU4_SDA TICEDAT PF6_ICE_CLK TICECLK AVSS PA0_NU2_A5/SCL/TX PA1_NU2_A4/SDA/RX LDO_CAP LDO_CAP PA2_NU2_A3 VDD_1 VDD_MCU PA3_NU2_A2...
  • Page 43: Figure 5-3 Extension Connectors Circuit

    NuMaker-NUC131U Extension Connector Figure 5-3 shows extension connectors of NuMaker-NUC131U. P1 - P16 P33 - P48 PB14_LED_R PC11 PB13_NU5_GPIO PC10 PA9_NU4_SCL I2C_SCL PB12_NU4_D8 PA8_NU4_SDA I2C_SDA VREF VREF PA15_NU3_D5 PA11_NU3_D3 PA14_NU3_D4 TICERST PC1_NU4_D13/CLK MCU_RESET PA10_NU3_D2 PA13_NU3_D1/TX NU1_3VCC PC2_NU4_D12/MISO 3VCC PA9_NU4_SCL PA12_NU3_D0/RX NU1_5VCC PC3_NU4_D11/MOSI 5VCC...
  • Page 44: Figure 5-4 Front Placement

    NuMaker-NUC131U PCB Placement Figure 5-4 and Figure 5-5 show the front and rear placement of NuMaker-NUC131U. Figure 5-4 Front Placement Figure 5-5 Rear Placement May. 07, 2020 Page 44 of 46 Rev 1.00...
  • Page 45 NuMaker-NUC131U REVISION HISTORY Date Revision Description 2020.05.07 1.00 Initial version May. 07, 2020 Page 45 of 46 Rev 1.00...
  • Page 46 NuMaker-NUC131U 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”.

This manual is also suitable for:

Numaker-nuc131uNumicro nuc131sd2aeu

Table of Contents