background image

NuMaker-M251KG

 

 

Aug. 

08, 2020 

Page 

28

 of 49 

Rev 1.00 

NuMa

k

er

-M

25
1

K

G

 U

S

E

R

 MA
NU

A

L

 

Ma
k

er Nu

-m

be
d

 NUC

47

Us
er Man

ua

 

QUICK START 

 

Toolchains Supporting 

Install the preferred toolchain. Please make sure at least one of the toolchains has been installed. 

 

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. 

 

Skip this step when using NuEclipse. 

Please  install  the  Nu-Link  USB  Driver  as  well  at  the  end  of  the  installation.  The  installation  is 
presented in Figure 4-1 and Figure 4-2. 

 

Figure 4-1 Nu-Link USB Driver Installation Setup 

Summary of Contents for NuMaker-M251KG

Page 1: ...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 s...

Page 2: ...V Power Sources 20 3 4 3 3 3 V Power Sources 20 3 4 4 1 8V Power Sources 20 3 4 5 Power Connectors 21 3 4 6 USB Connectors 21 3 4 7 Power Switches 21 3 4 8 Power Supply Models 22 External Reference Vo...

Page 3: ...3 of 49 Rev 1 00 NuMaker M251KG USER MANUAL M m U 4 6 1 Keil MDK 32 4 6 2 IAR EWARM 36 4 6 3 NuEclipse 37 5 NuMaker M251KG Schematics 44 Nu Link2 Me 44 M251 platform 45 Extension Connector 46 PCB Pla...

Page 4: ...Figure 4 6 PuTTY Session Setting 31 Figure 4 7 Template Project Folder Path 32 Figure 4 8 Warning Message of Device not found 32 Figure 4 9 Project File Migrate to Version 5 Format 33 Figure 4 10 Deb...

Page 5: ...M m U Figure 4 28 NuEclipse Debug Mode 43 Figure 4 29 Debug Message on Serial Port Terminal Windows 43 Figure 5 1 Nu Link2 Me Circuit 44 Figure 5 2 M251 platform Circuit 45 Figure 5 3 Extension Conne...

Page 6: ...e 3 6 3 3 V Power Sources 20 Table 3 7 1 8V Power Sources 20 Table 3 8 Power Connectors 21 Table 3 9 USB Connectors 21 Table 3 10 Power Switches 21 Table 3 11 Supply External Power through Nu Link2 Me...

Page 7: ...sion connectors of M251KG6AE the Arduino UNO compatible headers and able to adopt multiple power supply Furthermore the Nuvoton designed ammeter connector can measure the power consumption instantly w...

Page 8: ...onnectors Arduino UNO compatible extension connectors Ammeter connector for measuring the microcontroller s power consumption Fixable board power supply External VDD power connector Arduino UNO compat...

Page 9: ...1 Front View of NuMaker M251KG Figure 3 1 shows the main components and connectors from the front side of NuMaker M251KG The following lists components and connectors from the front view Target Chip...

Page 10: ...ar View Figure 3 2 shows the main components and connectors from the rear side of NuMaker M251KG The following lists components and connectors from the rear view Nu Link2 Me MCUVCC Power Switch ICEJPR...

Page 11: ...r M251KG NU1 NU2 NU3 and NU4 Arduino UNO compatible pins on the NuMaker M251KG Table 3 1 Extension Connectors 3 3 1 Pin Assignment for Extension Connectors The NuMaker M251KG provides the M251KG6AE ta...

Page 12: ...JP3 7 7 PC 10 EBI_ADR6 PWM1_CH2 JP3 8 8 PC 9 EBI_ADR7 PWM1_CH3 JP3 9 9 PB 1 EADC0_CH1 OPA0_N EBI_ADR8 UART2_TXD USCI1_CLK I2C1_SCL QSPI0_MISO1 PWM0 _CH4 PWM1_CH4 PWM0_BRAKE0 JP3 10 10 PB 0 EADC0_CH0...

Page 13: ...5 15 47 PC 8 EBI_ADR16 I2C0_SDA UART1_RXD PWM1_CH1 BPWM1_CH4 JP5 16 48 PC 7 EBI_AD9 UART0_nCTS I2C1_SMBAL PWM1_CH2 BPWM1_CH0 TM0 INT3 JP5 17 49 PC 6 EBI_AD8 UART0_nRTS I2C1_SMBSUS PWM1_CH3 BPWM1_CH1 T...

Page 14: ...5 69 PC 5 EBI_AD5 QSPI0_MISO1 UART2_TXD I2C1_SCL PWM1_CH0 PSIO0_CH0 JP4 6 70 PC 4 EBI_AD4 QSPI0_MOSI1 UART2_RXD I2C1_SDA PWM1_CH1 USCI2_CTL1 PSIO0_CH1 JP4 7 71 PC 3 EBI_AD3 QSPI0_SS UART2_nRTS I2C0_S...

Page 15: ..._CH2 JP6 5 101 PE 3 EBI_MCLK SC0_DAT USCI0_DAT0 PWM0_CH4 BPWM0_CH1 JP6 6 102 PE 2 EBI_ALE SC0_CLK USCI0_CLK USCI2_CTL0 PWM0_CH5 BPWM0_CH0 JP6 7 103 NC JP6 8 104 NC JP6 9 105 PE 1 EBI_AD10 QSPI0_MISO0...

Page 16: ...UART0_nRTS I2C1_SDA BPWM1_CH1 JP6 29 125 PB 9 EADC0_CH9 EBI_ADR18 USCI1_CTL1 UART0_TXD UART1_nCTS I2C1_SMBAL BPWM1_C H2 JP6 30 126 PB 8 EADC0_CH8 EBI_ADR19 USCI1_CLK UART0_RXD UART1_nRTS I2C1_SMBSUS...

Page 17: ...I0_MOSI PWM0_CH5 PA 0 D11 SPI0_MISO PWM0_CH4 PA 1 D12 SPI0_CLK PWM0_CH3 PA 2 D13 VSS VSS VREF VREF UART2_RXD I2C0_SDA PC 0 SDA UART2_TXD I2C0_SCL PC 1 SCL UART1_RXD PWM0_CH3 PB 2 D0 UART1_TXD PWM0_CH2...

Page 18: ...1 PB 3 NU2 5 A4 PB 0 NU3 3 D2 PC 4 NU2 4 A3 PB 4 NU3 4 D3 PC 5 NU2 3 A2 PB 5 NU3 5 D4 PC 3 NU2 2 A1 PB 6 NU3 6 D5 PC 2 NU2 1 A0 PB 7 NU3 7 D6 PA 7 N U 1 NU1 8 VIN NU3 8 D7 PA 6 NU1 7 VSS N U 3 NU4 1 D...

Page 19: ...ng voltage and PC through USB connector By using switches and voltage regulator multiple power domains can be created on the NuMaker M251KG 3 4 1 VIN Power Source Table 3 4 presents the Vin power sour...

Page 20: ...rd Table 3 5 5V Power Sources 3 4 3 3 3 V Power Sources Table 3 6 presents the 3 3 V power sources Voltage Regulator 5V Source Comment ICEUP1 USB_HS_VBUS ICEUP1 converts USB_HS_VBUS to 3 3 V and suppl...

Page 21: ...s the USB connectors Connector Comment ICEJ3 ICE USB connector on Nu Link2 Me for power supply debugging and programming from PC J2 USB PWR connector on NuMaker M251KG for power supply Table 3 9 USB C...

Page 22: ...on ICEJPR2 ICEVCC depends on the ICE chip operating voltage 3 Switch the SW2 to OFF 4 Connect the external power supply to JP1 Table 3 11 presents all power models when supplies external power throug...

Page 23: ...he external power supply to Vin or J2 To use JP1 as external power supply source please follow the below steps 1 Switch the SW2 to OFF 2 Remove the resistor on ICEJPR1 MCUVCC 3 Solder the resistor on...

Page 24: ...NU1 3VCC 3 3 V output Remove resistor 3 3 V 3 3 V 4 3 3 V X Connect to PC X NU1 3VCC 3 3 V output Remove resistor 3 3 V 3 3 V 5 1 8 V 3 6 V X X Connect to PC OFF DC Input 1 8 V 3 6 V Remove resistor 1...

Page 25: ...VDDIO pin of the target chip as power source of PA 0 PA 5 User needs to remove the R15 resistor Table 3 14 Voltage Adjustable Interface Connector Battery Voltage VBAT Connector Table 3 14 presents the...

Page 26: ...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 s...

Page 27: ...x 3 Flash x 3 Flash x 3 Flash x 3 Connected to IDE NuTool Flash x 3 Flash x 3 Flash x 3 On ICE online Not connected to a target chip On Flash x 3 Flash x 3 ICE online Connected to a target chip On On...

Page 28: ...M 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...

Page 29: ...NuMaker M251KG Aug 08 2020 Page 29 of 49 Rev 1 00 NuMaker M251KG USER MANUAL M m U Figure 4 2 Nu Link USB Driver Installation...

Page 30: ...he 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 ON Figure 4 3 Open VCOM Function 2 Connect the ICE USB connector show...

Page 31: ...v 1 00 NuMaker M251KG USER MANUAL M m U 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 sessio...

Page 32: ...the Project under Toolchains Open and execute the project under the toolchain The section 4 6 1 0 and 4 6 3 describe the steps of executing project in Keil MDK IAR EWARM and NuEclipse respectively 4...

Page 33: ...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 Nuvot...

Page 34: ...compile the project download code to the flash memory Click Start Stop Debug Section button can enter debug mode 1 3 2 4 1 Rebuild 3 Download 4 Start Stop Debug 2 Successfully compile Figure 4 12 Com...

Page 35: ...uMaker M251KG USER MANUAL M m U source code assembly language peripherals registers and setting breakpoint step run value monitor etc 2 Stop 3 1 2 1 Run 3 Reset Figure 4 13 Keil MDK Debug Mode Figure...

Page 36: ...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 item please rework section Figure 4 15 IAR EWARM Window 3 Mak...

Page 37: ...rs and setting breakpoint step run value monitor etc 1 2 3 1 Go 3 Reset 2 Break Figure 4 17 IAR EWARM Debug Mode Figure 4 18 Debug Message on Serial Port Terminal Windows 4 6 3 NuEclipse This section...

Page 38: ...rt the Project in NuEclipse 7 6 5 M251_252_Series_BSP_CMSIS_V3 XX XXX SampleCod e Templ M251_252__Series_BSP_CMSIS_V3 XX XXX SampleCode Te mplate G 7 Figure 4 20 Import Projects Windows 3 Click the Te...

Page 39: ...Aug 08 2020 Page 39 of 49 Rev 1 00 NuMaker M251KG USER MANUAL M m U 1 2 3 Figure 4 21 Open Project Properties Window 1 2 3 Figure 4 22 Project Properties Settings 4 Click the Template project and bui...

Page 40: ...72 User Manual 1 2 3 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...

Page 41: ...USER MANUAL M m U 4 1 5 2 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...

Page 42: ...f 49 Rev 1 00 NuMaker M251KG USER MANUAL Maker Nu mbed NUC472 User Manual 8 10 11 9 1 Note 1 User must follow those settings highlighted in green and can configure other settings depend on the needs F...

Page 43: ...9 User can debug the project under debug mode by checking source code assembly language peripherals registers and setting breakpoint step run value monitor etc For more information about how to use Nu...

Page 44: ...XT_O HXT_I ICEC10 20p C0603 ICEC11 20p C0603 12M Crystal ICEX1 12MHz SMD X3225B 1 XIN 2 GND 4 GND 3 XOUT 3 3V SPIM_MISO0 ICEU2 W25Q16JVSSIQ SOP8 5 23 1 27MM CS 1 DO 2 WP 3 GND 4 DI 5 CLK 6 HOLD 7 VCC...

Page 45: ...EBI_ADR12 USCI1_DAT0 PWM0_CH2 PWM1_BRAKE0 43 PE 11 EBI_ADR13 USCI1_DAT1 UART1_nCTS PWM0_CH3 PWM1_BRAKE1 44 PE 12 EBI_ADR14 USCI1_CLK UART1_nRTS PWM0_CH4 45 PE 13 EBI_ADR15 I2C0_SCL UART1_TXD PWM0_CH5...

Page 46: ...r PFM M251KG v1 0 Ext Connector Custom 3 3 Wednesday June 17 2020 PB2_NU3_D0 RX PC12 PC10 PB1_NU2_A5 SCL TX PC11 PC9 PB0_NU2_A4 SDA RX GND VDD_MCU PA11_NU5_CLK PA10_NU5_MOSI PA9_NU5_MISO PA8_NU5_SS PD...

Page 47: ...Aug 08 2020 Page 47 of 49 Rev 1 00 NuMaker M251KG USER MANUAL M m U PCB Placement Figure 5 4 and Figure 5 5 show the front and rear placement of NuMaker M251KG Figure 5 4 Front Placement Figure 5 5 R...

Page 48: ...NuMaker M251KG Aug 08 2020 Page 48 of 49 Rev 1 00 NuMaker M251KG USER MANUAL Maker Nu mbed NUC472 User Manual 6 REVISION HISTORY Date Revision Description 2019 08 18 1 00 1 Initially issued...

Page 49: ...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 fo...

Reviews: