Nuvoton NuMaker-M2L31KI User Manual

Nuvoton NuMaker-M2L31KI User Manual

Evaluation board for numicro m2l31 series
Table of Contents

Advertisement

Quick Links

NuMaker-M2L31KI
NuMicro
®
Family
Arm
®
Cortex
®
-M23-based Microcontroller
NuMaker-M2L31KI
User Manual
Evaluation Board for NuMicro
®
M2L31 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 and
microprocessor 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
Jun. 20, 2024
Page 1 of 50
Rev 1.00

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NuMaker-M2L31KI and is the answer not in the manual?

Questions and answers

Summary of Contents for Nuvoton NuMaker-M2L31KI

  • 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 and microprocessor based system design. Nuvoton assumes no responsibility for errors or omissions.
  • Page 2: Table Of Contents

    3.8.2 Status LEDs ........................28 4 QUICK START ....................29 4.1 Toolchains Supporting ....................29 4.2 Nuvoton Nu-Link Driver Installation ................29 4.3 BSP Firmware Download ................... 31 4.4 Hardware Setup ......................31 4.5 Find the Example Project ................... 33 4.6 Execute the Project under Toolchains ..............
  • Page 3 NuMaker-M2L31KI 5.3 Extension Connectors ....................47 5.4 PCB Placement ......................48 6 REVISION HISTORY ..................49 Jun. 20, 2024 Page 3 of 50 Rev 1.00...
  • Page 4 Figure 3-5 External Power Supply Sources on Nu-Link2-Me ............22 Figure 3-6 External Power Supply Sources on M2L31 Target Board ..........23 Figure 3-7 Detach the Nu-Link2-Me from NuMaker-M2L31KI ............24 Figure 3-8 Wiring between Ammeter Connector and Ammeter ............. 26 Figure 3-9 Project Path of SYS_PowerDown_MinCurrent ............
  • Page 5 NuMaker-M2L31KI Figure 4-27 Startup Tab Configuration ..................43 Figure 4-28 NuEclipse Debug Mode ....................44 Figure 4-29 Debug Message on Serial Port Terminal Windows ............ 44 Figure 5-1 Nu-Link2-Me Circuit ...................... 45 Figure 5-2 M2L31 Target Board Circuit ..................46 Figure 5-3 Extension Connectors Circuit ..................
  • Page 6 NuMaker-M2L31KI List of Tables Table 3-1 Extension Connectors ....................11 Table 3-2 M2L31KIDAE Full-pin Extension Connectors and GPIO Function List ......16 Table 3-3 Arduino UNO Extension Connectors and M2L31KIDAE Mapping GPIO List....18 Table 3-4 Vin Power Source ......................19 Table 3-5 5 V Power Sources ......................
  • Page 7: Overview

    The NuMaker-M2L31KI evaluation board supports USB PD 3.0 sink mode power delivery protocol, including different voltage levels such as 5 V, 9 V, 15 V, and 20 V, capable of receiving up to 100W of power.
  • Page 8: Features

    NuMaker-M2L31KI FEATURES ⚫ NuMicro M2L31KIDAE used as main microcontroller with function compatible with: M2L31KIDAE – M2L31KGDAE – M2L31SIDAE – M2L31SGDAE – M2L31CIDAE – M2L31CGDAE – M2L31LIDAE – M2L31LGDAE – M2L31YIDAE – M2L31YGDAE – ⚫ M2L31KIDAE full pins extension connectors ⚫...
  • Page 9: Hardware Configuration

    PD3.0 Select Connector M2L31KIDAE M2L31KIDAE Extension Connectors Figure 3-1 Front View of NuMaker-M2L31KI Figure 3-1 shows the main components and connectors from the front side of NuMaker-M2L31KI. The following lists components and connectors from the front view: ⚫ Target chip: M2L31KIDAE (U1) ⚫...
  • Page 10: Rear View

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

    Arduino UNO compatible pins on the NuMaker-M2L31KI. Table 3-1 Extension Connectors 3.3.1 Pin Assignment for Extension Connectors The NuMaker-M2L31KI provides the M2L31KIDAE onboard and extension connectors (JP3, JP4, JP5 and JP6). Figure 3-3 shows the M2L31KIDAE extension connectors. Pin33 ~ Pin64...
  • Page 12 NuMaker-M2L31KI M2L31KIDAE Header Pin No. Function PB.5/EADC0_CH5/LPADC0_CH5/ACMP1_N/OPA1_P1/EBI_ADR0/SPI1_MISO/I2C0_SCL/UART5_T JP3.1 XD/USCI1_CTL0/EPWM0_CH0/UART2_TXD/TM0/INT0/LPI2C0_SCL/LPTM0 PB.4/EADC0_CH4/LPADC0_CH4/ACMP1_P1/OPA2_N0/EBI_ADR1/SPI1_MOSI/I2C0_SDA/UART5_ JP3.2 RXD/USCI1_CTL1/EPWM0_CH1/UART2_RXD/TM1/INT1/LPI2C0_SDA/LPTM1 PB.3/EADC0_CH3/LPADC0_CH3/ACMP0_N/OPA2_P0/EBI_ADR2/I2C1_SCL/SPI1_CLK/UART1_TX JP3.3 D/UART5_nRTS/USCI1_DAT1/EPWM0_CH2/PWM0_BRAKE0/TM2/INT2/LPIO7 PB.2/EADC0_CH2/LPADC0_CH2/ACMP0_P1/OPA0_O/EBI_ADR3/I2C1_SDA/SPI1_SS/UART1_RX JP3.4 D/UART5_nCTS/USCI1_DAT0/EPWM0_CH3/TM3/INT3/LPIO6 PC.12/EBI_ADR4/UART0_TXD/I2C0_SCL/UART6_TXD/SPI3_MISO/ECAP1_IC2/EPWM1_CH0/ACM JP3.5 P0_O/LPUART0_TXD/LPI2C0_SCL PC.11/EBI_ADR5/UART0_RXD/I2C0_SDA/UART6_RXD/SPI3_MOSI/ECAP1_IC1/EPWM1_CH1/AC JP3.6 MP1_O/LPUART0_RXD/LPI2C0_SDA JP3.7 PC.10/EBI_ADR6/UART6_nRTS/SPI3_CLK/UART3_TXD/CANFD1_TXD/ECAP1_IC0/EPWM1_CH2 JP3.8 PC.9/EBI_ADR7/UART6_nCTS/SPI3_SS/UART3_RXD/CANFD1_RXD/EPWM1_CH3 PB.1/EADC0_CH1/LPADC0_CH1/ACMP2_N/OPA0_N0/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PE.8/EBI_ADR10/SPI2_CLK/USCI1_CTL1/UART2_TXD/PWM0_BRAKE0/EPWM0_CH0/EPWM0_BR JP5.9 AKE0/ECAP0_IC0 PE.9/EBI_ADR11/SPI2_MISO/USCI1_CTL0/UART2_RXD/PWM0_BRAKE1/EPWM0_CH1/EPWM0_B JP5.10 RAKE1/ECAP0_IC1 PE.10/EBI_ADR12/SPI2_MOSI/USCI1_DAT0/UART3_TXD/PWM1_BRAKE0/EPWM0_CH2/EPWM1_ JP5.11 BRAKE0/ECAP0_IC2 PE.11/EBI_ADR13/SPI2_SS/USCI1_DAT1/UART3_RXD/UART1_nCTS/PWM1_BRAKE1/EPWM0_C JP5.12 H3/EPWM1_BRAKE1/ECAP1_IC2 JP5.13 PE.12/EBI_ADR14/SPI2_I2SMCLK/USCI1_CLK/UART1_nRTS/EPWM0_CH4/ECAP1_IC1 PE.13/EBI_ADR15/I2C0_SCL/UART4_nRTS/UART1_TXD/EPWM0_CH5/EPWM1_CH0/PWM1_CH5/ JP5.14...
  • Page 14 NuMaker-M2L31KI M2L31KIDAE Header Pin No. Function JP5.30 PE.14/EBI_AD8/UART2_TXD/CANFD0_TXD/UART6_TXD/EPWM0_CH1/TM2/CLKO/INT4/TK_TK9 JP5.31 PE.15/EBI_AD9/UART2_RXD/CANFD0_RXD/UART6_RXD JP5.32 nRESET PF.0/UART1_TXD/I2C1_SCL/UART0_TXD/EPWM1_CH4/PWM1_CH0/ICE_DAT/UTCPD0_FRSTX2/ JP4.1 UTCPD0_DISCHG/LPUART0_TXD/LPIO2 PF.1/UART1_RXD/I2C1_SDA/UART0_RXD/SPI3_I2SMCLK/EPWM1_CH5/PWM1_CH1/ICE_CLK/UT JP4.2 CPD0_FRSTX1/UTCPD0_DISCHG/LPUART0_RXD/LPIO3 JP4.3 PD.9/EBI_AD7/I2C2_SCL/UART2_nCTS/UART7_TXD JP4.4 PD.8/EBI_AD6/I2C2_SDA/UART2_nRTS/UART7_RXD PC.5/EBI_AD5/QSPI0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QEI1_INDEX/EPWM0_CH0/PWM0_CH5 PE.6/SPI3_I2SMCLK/USCI0_CTL0/UART5_RXD/CANFD1_RXD/EQEI1_A/EPWM0_CH1/PWM0_CH JP6.2 PE.5/EBI_nRD/SPI3_SS/USCI0_CTL1/UART6_TXD/UART7_nRTS/EQEI1_B/EPWM0_CH2/PWM0_ JP6.3 PE.4/EBI_nWR/SPI3_CLK/USCI0_DAT1/UART6_RXD/UART7_nCTS/EQEI0_INDEX/EPWM0_CH3/P JP6.4 WM0_CH2 PE.3/EBI_MCLK/SPI3_MISO/USCI0_DAT0/UART6_nRTS/UART7_TXD/EQEI0_A/EPWM0_CH4/PW JP6.5 M0_CH1 PE.2/EBI_ALE/SPI3_MOSI/USCI0_CLK/UART6_nCTS/UART7_RXD/EQEI0_B/EPWM0_CH5/PWM0 JP6.6 _CH0 JP6.7 JP6.8 JP6.9 PE.1/EBI_AD10/QSPI0_MISO0/SPI1_MISO/UART3_TXD/I2C1_SCL/UART4_nCTS/LPIO1 JP6.10 PE.0/EBI_AD11/QSPI0_MOSI0/SPI1_MOSI/UART3_RXD/I2C1_SDA/UART4_nRTS/LPIO0 JP6.11 PH.8/EBI_AD12/QSPI0_CLK/SPI1_CLK/UART3_nRTS/I2C1_SMBAL/I2C2_SCL/UART1_TXD JP6.12 PH.9/EBI_AD13/QSPI0_SS/SPI1_SS/UART3_nCTS/I2C1_SMBSUS/I2C2_SDA/UART1_RXD JP6.13 PH.10/EBI_AD14/QSPI0_MISO1/SPI1_I2SMCLK/UART4_TXD/UART0_TXD/LPUART0_TXD JP6.14 PH.11/EBI_AD15/QSPI0_MOSI1/UART4_RXD/UART0_RXD/EPWM0_CH5/LPUART0_RXD...
  • Page 16: Table 3-2 M2L31Kidae Full-Pin Extension Connectors And Gpio Function List

    NuMaker-M2L31KI M2L31KIDAE Header Pin No. Function PB.8/EADC0_CH8/LPADC0_CH8/EBI_ADR19/USCI1_CLK/UART0_RXD/UART1_nRTS/UART7_RX JP6.30 D/PWM1_CH3/LPUART0_RXD PB.7/EADC0_CH7/LPADC0_CH7/ACMP2_P3/OPA2_N1/EBI_nWRL/USCI1_DAT0/UART1_TXD/EBI JP6.31 _nCS0/PWM1_CH4/EPWM1_BRAKE0/EPWM1_CH4/INT5/PWM1_BRAKE0/ACMP0_O PB.6/EADC0_CH6/LPADC0_CH6/ACMP2_P2/OPA2_P1/EBI_nWRH/USCI1_DAT1/UART1_RXD/EBI JP6.32 _nCS1/PWM1_CH5/EPWM1_BRAKE1/EPWM1_CH5/INT4/PWM1_BRAKE1/ACMP1_O Table 3-2 M2L31KIDAE Full-pin Extension Connectors and GPIO Function List Jun. 20, 2024 Page 16 of 50 Rev 1.00...
  • Page 17: 3.3.2 Arduino Uno Compatible Extension Connectors

    NuMaker-M2L31KI 3.3.2 Arduino UNO Compatible Extension Connectors Figure 3-4 shows the Arduino UNO compatible extension connectors. MOSI GPIO PD.0 PB.14 SPI0_MOSI UART1_RXD PWM0_CH3 PA.8 UART1_TXD PWM0_CH2 PA.9 EPWM1_CH1 PC.4 EPWM1_CH0 PC.5 PWM1_CH2 PA.7 PWM1_CH3 PA.6 PWM0_CH1 PA.10 PWM0_CH0 PA.11 EPWM1_CH4 PB.1...
  • Page 18: Table 3-3 Arduino Uno Extension Connectors And M2L31Kidae Mapping Gpio List

    NuMaker-M2L31KI NuMaker-M2L31KI NuMaker-M2L31KI Header Header Compatible to GPIO Pin of Compatible to GPIO Pin of M2L31 Arduino UNO M2L31 Arduino UNO NU3.1 NU2.6 NU3.2 NU2.5 NU3.3 NU2.4 NU3.4 NU2.3 NU3.5 NU2.2 NU3.6 NU2.1 NU3.7 PA10 NU1.8 NU3.8 PA11 NU1.7 NU4.1 NU1.6...
  • Page 19: Power Supply Configuration

    NuMaker-M2L31KI Power Supply Configuration The NuMaker-M2L31KI is able to adopt multiple power supplies. External power sources include NU1 Vin (7 V to 48 V), V (depending on the target chip operating voltage), and PC through USB connector. By using switches and voltage regulator, multiple power domains can be created on the NuMaker-M2L31KI.
  • Page 20: Power Sources

    1.8 V to M2L31 target board or ICE chip. Table 3-7 1.8 V Power Sources 3.4.5 Power Connectors Table 3-8 presents the power connectors. Connector Description connector on the NuMaker-M2L31KI. connector on the NuMaker-M2L31KI. Table 3-8 Power Connectors Jun. 20, 2024 Page 20 of 50 Rev 1.00...
  • Page 21: Usb Connectors

    ICE USB connector on Nu-Link2-Me for power supply, debugging and ICEJ2 programming from PC. USB PWR connector on NuMaker-M2L31KI is for USB PD3.0 power supply or general 5 V V power supply. If it connects with USB PD adapter or USB PD port, the V voltage can be required from 3.3 V to...
  • Page 22: Figure 3-5 External Power Supply Sources On Nu-Link2-Me

    NuMaker-M2L31KI ICE USB Connector (ICEJ4) Nu-Link2-Me Figure 3-5 External Power Supply Sources on Nu-Link2-Me To use ICEJ4 as external power supply source with Nu-Link2-Me, please follow the steps below: Solder the resistor on ICEJPR1 (MCUVCC) depending on the target chip operating voltage.
  • Page 23: Figure 3-6 External Power Supply Sources On M2L31 Target Board

    NuMaker-M2L31KI External V Connector (JP1) USB Power Connector (J2) External V Connector (JP2) NU1 pin8 (Vin) Figure 3-6 External Power Supply Sources on M2L31 Target Board To use Vin or J2 as external power supply source, please follow the steps below: Switch the SW2 depending on the target chip operating voltage.
  • Page 24: Figure 3-7 Detach The Nu-Link2-Me From Numaker-M2L31Ki

    NuMaker-M2L31KI 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-M2L31KI Jun. 20, 2024 Page 24 of 50 Rev 1.00...
  • Page 25: Ammeter Connector

    NuMaker-M2L31KI Table 3-12 presents all power models when supplies external power through M2L31 target board. The M2L31 target board external power sources are highlighted in yellow. ICEJPR1 ICEJPR2 Target Chip ICE Chip Model ICEJ2 (MCUVCC) (ICEVCC) Voltage Selection Voltage Selection...
  • Page 26: Push Buttons

    NuMaker-M2L31KI Figure 3-8 Wiring between Ammeter Connector and Ammeter  M2L31xxxAN_Series_BSP_CMSIS_V3.XX.XXX  SampleCode  StdDriver  SYS_PowerDown_MinCurrent Figure 3-9 Project Path of SYS_PowerDown_MinCurrent Push Buttons Table 3-14 presents the push buttons. Component Description ICESW1 Offline program button to start offline ICP programming the target chip.
  • Page 27: Leds

    NuMaker-M2L31KI LEDs Table 3-15 presents the LEDs. Component Description LEDG1 The power LED indicates that the NuMaker-M2L31KI is powered. LEDR1 The LED is connected to the target chip PC.14. ICES0, ICES1, ICES2 Nu-Link2-Me status LED. and ICES3 Table 3-15 LEDs Nu-Link2-Me The Nu-Link2-Me is an attached on-board debugger and programmer.
  • Page 28: Status Leds

    NuMaker-M2L31KI 3.8.2 Status LEDs Table 3-15 presents the status LEDs patterns for different operation on Nu-Link2-Me. Status LED Operation Status ICES0 ICES1 ICES2 ICES3 Boot Flash x 3 Flash x 3 Flash x 3 Flash x 3 Idle One Nu-Link2-Me is selected to connect...
  • Page 29: 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 30: Figure 4-2 Nu-Link Usb Driver Installation

    NuMaker-M2L31KI Figure 4-2 Nu-Link USB Driver Installation Jun. 20, 2024 Page 30 of 50 Rev 1.00...
  • Page 31: Bsp Firmware Download

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

    NuMaker-M2L31KI Find the “Nuvoton Virtual COM Port” on the Device Manger as Figure 4-5. Figure 4-5 Device Manger 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 33: Find The Example Project

    NuMaker-M2L31KI 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.  M2L31xxxAE_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 34: Figure 4-9 Project File Migrate To Version 5 Format

    Make sure the debugger is “Nuvoton Nu-Link Debugger” as shown in Figure 4-10 and Figure 4-11. Figure 4-10 Debugger Setting in Options Window Note: If the dropdown menu in Figure 4-10 does not contain “Nuvoton Nu-Link Debugger” item, please rework section 4.2. Jun. 20, 2024 Page 34 of 50 Rev 1.00...
  • Page 35: Figure 4-11 Programming Setting In Options Window

    NuMaker-M2L31KI Figure 4-11 Programming Setting in Options Window Rebuild all target files. After successfully compiling the project, download code to the Flash memory. Click “Start/Stop Debug Section” button to enter debug mode. 1. Rebuild 2. Successfully compile 3. Download 4. Start/Stop Debug Figure 4-12 Compile and Download the Project Jun.
  • Page 36: Figure 4-13 Keil Mdk Debug Mode

    NuMaker-M2L31KI 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 37: Iar Ewarm

    NuMaker-M2L31KI 4.6.2 IAR EWARM This section provides steps to beginners on how to run a project by using IAR EWARM. Double click the “Template.eww” to open the project. Make sure the toolbar contains “Nu-Link” item as shown in Figure 4-15.
  • Page 38: Figure 4-17 Iar Ewarm Debug Mode

    NuMaker-M2L31KI 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 39: Nueclipse

    NuMaker-M2L31KI 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. Double-click “NuEclipse.exe" to open the toolchain. Import the “Template” project by following the steps presented in Figure 4-19 and Figure 4-20.
  • Page 40: Figure 4-21 Open Project Properties Window

    NuMaker-M2L31KI 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 Jun. 20, 2024 Page 40 of 50 Rev 1.00...
  • Page 41: Figure 4-23 Build Project

    NuMaker-M2L31KI Click the “Template” project and build the project. Figure 4-23 Build Project 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 42: Figure 4-25 Main Tab Configuration

    NuMaker-M2L31KI Note 1: Double-click the “GDB Nuvoton Nu-Link Debugging” to create the sub item. 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 Jun.
  • Page 43: Figure 4-27 Startup Tab Configuration

    NuMaker-M2L31KI Note: User must follow those settings highlighted in green, and configure other settings depending on the needs. Figure 4-27 Startup Tab Configuration Jun. 20, 2024 Page 43 of 50 Rev 1.00...
  • Page 44: Figure 4-28 Nueclipse Debug Mode

    NuMaker-M2L31KI 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 45: Numaker-M2L31Ki Schematics

    NuMaker-M2L31KI NUMAKER-M2L31KI SCHEMATICS Nu-Link2-Me Figure 5-1 shows the Nu-Link2-Me circuit. 3.3V USB 2.0 HIGH SPEED DEVICES ICER1 USB_HS_VBUS O f f - page C onnect or 200 1% USB_HS_CAP R0603 USB_HS_VBUS ICE5V ICEJ5 ICEJ4 USB_TY PE_C_SMD(12401548E4#2A) ICEC1 ICEC2 ICEC13 ICE5V 0.1u...
  • Page 46: M2L31 Target Board

    NuMaker-M2L31KI M2L31 Target Board Figure 5-2 shows the M2L31 target board circuit. P1 - P32 P65 - P96 O f f - page C onnect or ICE_TXD0 ICE_MCU_TX ICE_RXD0 ICE_MCU_RX PF0_ICE_DAT ICE_VDD PB5_NU2_A2 TICEDAT MCUVCC_DIODE PF1_ICE_CLK ICE_DAT PB4_NU2_A3 TICECLK ICE_TICEDAT...
  • Page 47: Figure 5-3 Extension Connectors Circuit

    NuMaker-M2L31KI Extension Connectors Figure 5-3 shows extension connectors of NuMaker-M2L31KI. P1 - P32 P65 - P96 PB5_NU2_A2 PB4_NU2_A3 TICEDAT TICECLK PA5_NU4_SCL I2C_SCL PB3_NU2_A5/SCL/TX PB2_NU2_A4/SDA/RX PA4_NU4_SDA I2C_SDA PC12 PC11 PC5_NU3_D3 PC4_NU3_D2 VREF VREF PC10 PC3_NU5_MISO/CCDB2 PC2_NU5_MOSI/CCDB1 MCUVCC_DIODE PB1_NU3_D8 PB0_NU3_D9 PC1_NU5_CLK/CC2 PC0_NU5_SS/CC1...
  • Page 48: Figure 5-4 Front Placement

    NuMaker-M2L31KI PCB Placement Figure 5-4 and Figure 5-5 show the front and rear placement of NuMaker-M2L31KI. Figure 5-4 Front Placement Figure 5-5 Rear Placement Jun. 20, 2024 Page 48 of 50 Rev 1.00...
  • Page 49 NuMaker-M2L31KI REVISION HISTORY Date Revision Description 2024.06.20 1.00 Initial version. Jun. 20, 2024 Page 49 of 50 Rev 1.00...
  • Page 50 NuMaker-M2L31KI 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”.

Table of Contents