background image

NuMaker-M252SD

 

 

Aug. 

02, 2019 

Page 

1

 of 38 

Rev 1.00 

N

UMA

K

E

R

-M

2

52
S

D

 U

S

E

R

 MA

N

UA
L

 

Ma
k

er 
Nu
-m

be
d

 NUC

47

Us
er Man

ua

 

 

 

ARM

®

 Cortex

®

-M 

32-bit Microcontroller

 

 

 

 

 

NuMaker-M252SD 

User Manual  

NuMicro

®

 M252 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.  

www.nuvoton.com

 

 

Summary of Contents for NuMicro M252 Series

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

Page 2: ...wer Sources 15 2 5 4 1 8V Power Sources 16 2 5 5 Power Connectors 16 2 5 6 USB Connectors 16 2 5 7 Power Switches 16 2 5 8 Power Supply Models 17 2 5 9 External Reference Voltage Connector 20 2 5 10 Voltage Adjustable Interface VAI Connector 20 2 5 11 Ammeter Connector 20 2 5 12 Extension Connectors 21 2 5 13 Push Buttons 21 2 5 14 LEDs 21 Nu Link2 Me 22 PCB Placement 23 3 Quick Start 24 Toolchain...

Page 3: ...ker M252SD Aug 02 2019 Page 3 of 38 Rev 1 00 NUMAKER M252SD USER MANUAL M N m U 3 6 3 NuEclipse 33 4 NuMaker M252SD Schematics 34 Nu Link2 Me 34 M252 platform 35 Extension Connector 36 5 REVISION HISTORY 37 ...

Page 4: ...tallation Setup 24 Figure 3 2 Nu Link USB Driver Installation 25 Figure 3 3 Open VCOM Function 26 Figure 3 4 ICE USB Connector 26 Figure 3 5 Device Manger 27 Figure 3 6 PuTTY Session Setting 27 Figure 3 7 Template Project Folder Path 28 Figure 3 8 Warning Message of Device not found 28 Figure 3 9 Project File Migrate to Version 5 Format 29 Figure 3 10 Debugger Setting in Options Window 29 Figure 3...

Page 5: ...le 2 5 3 3 V Power Sources 15 Table 2 6 1 8V Power Sources 16 Table 2 7 Power Connectors 16 Table 2 8 USB Connectors 16 Table 2 9 Power Switches 16 Table 2 10 Supply External Power through Nu Link2 Me 17 Table 2 11 Supply External Power for M252 platform 19 Table 2 12 External Reference Voltage Connector 20 Table 2 13 Voltage Adjustable Interface Connector 20 Table 2 14 Ammeter Connector 20 Table ...

Page 6: ...eter connector allows user to monitor the microcontroller s power consumption during development The Nu Link2 Me is a debugger and programmer that supports on line programming and debugging through SWD interface The on board 16 Mbit SPI Flash allows it able to off line programming the target microcontroller Nu Link2 Me provides virtual COM port VCOM function to print out messages on PC Nu Link2 Me...

Page 7: ...D USER MANUAL M N m U Arduino UNO compatible extension connector Vin USB FS connector on M252 platform ICE USB connector on Nu Link2 Me On board Nu Link2 Me debugger and programmer Debug through SWD interface On line off line programming Virtual COM port function ...

Page 8: ...nector Figure 2 1 Front View of NuMaker M252SD Figure 2 1 shows the main components and connectors from the front side of NuMaker M252SD The following lists components and connectors from the front view Target Chip M252SD2AE U1 USB FS Connector J2 Arduino UNO Compatible Extension Connectors NU1 NU2 NU3 NU4 M252 Extension Connectors JP3 JP4 JP5 and JP6 External VDD Power Connector JP1 External VSS ...

Page 9: ...gure 2 2 shows the main components and connectors from the rear side of NuMaker M252SD 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 2 2 Rear View of NuMaker M252SD ...

Page 10: ...S PWM0_CH2 PA 3 D10 SPI0_MOSI PWM0_CH5 PA 0 D11 SPI0_MISO PWM0_CH4 PA 1 D12 SPI0_CLK PWM0_CH3 PA 2 D13 VSS VSS VREF VREF I2C0_SDA PC 0 SDA I2C0_SCL PC 1 SCL UART1_RXD PWM0_CH3 PB 2 D0 UART1_TXD PWM0_CH2 PB 3 D1 I2C1_SDA PWM1_CH1 PC 4 D2 I2C1_SCL PWM1_CH0 PC 5 D3 PWM1_CH2 PC 3 D4 PWM1_CH3 PC 2 D5 PWM1_CH4 PA 7 D6 PWM1_CH5 PA 6 D7 VIN VSS VSS 5V 3V RST IOREF VDD NC A5 PB 1 EADC0_CH1 I2C1_SCL UART2_T...

Page 11: ...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 D8 PA 5 NU1 6 VSS NU4 2 D9 PA 4 NU1 5 5V NU4 3 D10 PA 3 NU1 4 3V NU4 4 D11 PA 0 NU1 3 RST nRESET NU4 5 D12 PA 1 NU1 2 IOREF VDD NU4 6 D13 PA 2 NU1 1 NC NU4 7 VSS VSS NU4 8 VREF VREF NU4 9 SDA PC 0 NU4 10 SCL PC 1...

Page 12: ... Assignment for Extension Connectors The NuMaker M252SD provides the M252SD2AE target chip onboard and full pins extension connectors JP3 JP4 JP5 and JP6 The Figure 2 4 shows the M252SD2AE extension connectors JP3 Pin1 Pin16 JP6 Pin49 Pin64 JP5 Pin17 Pin32 JP4 Pin33 Pin48 Figure 2 4 M252SD2AE Extension Connectors ...

Page 13: ... PF 5 UART2_RXD UART2_nCTS PWM0_CH0 BPWM0_CH4 X32_IN EADC0_ST JP3 29 JP3 30 15 PF 4 UART2_TXD UART2_nRTS PWM0_CH1 BPWM0_CH5 X32_OUT JP3 31 JP3 32 16 PF 3 UART0_TXD I2C0_SCL XT1_IN JP5 JP5 1 JP5 2 17 PF 2 UART0_RXD I2C0_SDA QSPI0_CLK XT1_OUT BPWM1_CH1 JP5 3 JP5 4 18 PC 7 UART0_nCTS I2C1_SMBAL PWM1_CH2 BPWM1_CH0 TM0 INT3 JP5 5 JP5 6 19 PC 6 UART0_nRTS I2C1_SMBSUS PWM1_CH3 BPWM1_CH1 TM1 INT2 JP5 7 JP...

Page 14: ...6 4 50 LDO_CAP JP6 5 JP6 6 51 VDD JP6 7 JP6 8 52 PC 14 SPI0_I2SMCLK USCI0_CTL0 QSPI0_CLKTM1 JP6 9 JP6 10 53 PB 15 EADC0_CH15 SPI0_SS USCI0_CTL1 UART0_nCTS PSIO0_CH0 PWM1_CH0 T M0_EXT PWM0_BRAKE1 JP6 11 JP6 12 54 PB 14 EADC0_CH14 SPI0_CLK USCI0_DAT1 UART0_nRTS PSIO0_CH1 PWM1_CH1 TM1_EXT CLKO JP6 13 JP6 14 55 PB 13 EADC0_CH13 ACMP0_P3 ACMP1_P3 SPI0_MISO USCI0_DAT0 UART0_TXD P SIO0_CH2 PWM1_CH2 TM2_E...

Page 15: ...SB connector on NuMaker M252SD supplies 5 V power from PC to M252 platform and Nu Link2 Me NU1 pin5 NU1_5VCC ICEJ3 J2 or NU1 pin8 supplies 5 V power to NU1 pin5 NU1 pin5 supplies 5 V power to target chip or Arduino adapter board Note M252 operating voltage range is from 1 8 V to 5 5 V Do not switch SW2 1 NU1 5VCC to ON Table 2 4 5V Power Sources 2 5 3 3 3 V Power Sources Table 2 5 presents the 3 3...

Page 16: ... connector on the NuMaker M252SD JP2 VSS connector on the NuMaker M252SD Table 2 7 Power Connectors 2 5 6 USB Connectors Table 2 8 presents the USB connectors Connector Comment ICEJ3 ICE USB connector on Nu Link2 Me for power supply debugging and programming from PC J2 USB FS connector on NuMaker M252SD for power supply Table 2 8 USB Connectors 2 5 7 Power Switches Table 2 9 presents the power swi...

Page 17: ...oltage 3 Switch the SW2 to OFF 4 Connect the external power supply to JP1 Table 2 10 presents all power models when supplies external power through Nu Link2 Me The Nu Link2 Me external power sources are highlighted in yellow Model Target Chip Voltage ICEJ3 ICEJPR1 MCUVCC Selection 1 ICEJPR2 ICEVCC Selection 2 ICE Chip Voltage SW2 Selection J2 Vin JP1 1 1 8 V Connect to PC 1 8 V 1 8 V 1 8 V Off Ign...

Page 18: ...ge 4 Connect the 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 ICEJPR2 ICEVCC depends on the ICE chip operating voltage 4 Connect ICEJ3 to PC 5 Connect the external power supply to JP1 To use Vin or J2 as external power supply source with Nu Link2 M...

Page 19: ...tput Remove resistor 3 3 V 3 3 V 6 5 V 7 V 12 V Input X Ignore NU1 5VCC 5 V output Remove resistor 3 3 V 3 3 V 7 5 V X Connect to PC Ignore NU1 5VCC 5 V output Remove resistor 3 3 V 3 3 V 8 1 8 V 5 5 V Ignore 5 Ignore 5 Connect to PC OFF DC Input 1 8 V 5 5 V Remove resistor 1 8 V 3 3 V 1 8 V 3 3 V 9 1 8 V 5 5 V Ignore 5 Ignore 5 Nu Link2 Me removed OFF DC Input 1 8 V 5 5 V X X X X Unused Note 1 Th...

Page 20: ...Voltage Adjustable Interface VAI Connector Table 2 13 presents the voltage adjustable interface connector Connector Comment VDDIO Connector for user to easily connect to the VDDIO pin of the target chip as power source of PA 0 PA 5 User needs to remove the R15 resistor Table 2 13 Voltage Adjustable Interface Connector 2 5 11 Ammeter Connector Table 2 14 presents the ammeter connector Connector Com...

Page 21: ...ker M252SD Table 2 15 Extension Connectors 2 5 13 Push Buttons Table 2 16 presents the push buttons Component Comment ICESW1 Off line program button to start off line programming the target chip SW1 Reset button to reset the target chip Table 2 16 Push Buttons 2 5 14 LEDs Table 2 17 presents the LEDs Component Comment Power LED The power LED indicates that the NuMaker M252SD is powered PB14 LED Th...

Page 22: ...get microcontroller Additionally the Nu Link2 Me provides virtual COM port VCOM function to print out messages on PC Table 2 18 presents how to set the VCOM function by ICESW2 ICESW2 Pin Function Comment 1 TXD On Connect target chip PB 13 UART0_TXD to Nu Link2 Me Off Disconnect target chip PB 13 UART0_TXD to Nu Link2 Me 2 RXD On Connect target chip PB 12 UART0_RXD to Nu Link2 Me Off Disconnect tar...

Page 23: ...Aug 02 2019 Page 23 of 38 Rev 1 00 NUMAKER M252SD USER MANUAL M N m U PCB Placement Figure 2 9 and Figure 2 10 show the front and rear placement of NuMaker M252SD Figure 2 9 Front Placement Figure 2 10 Rear Placement ...

Page 24: ... EWARM NuEclipse GCC Windows NuEclipse GCC 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 prese...

Page 25: ...NuMaker M252SD Aug 02 2019 Page 25 of 38 Rev 1 00 NUMAKER M252SD USER MANUAL M N m U Figure 3 2 Nu Link USB Driver Installation ...

Page 26: ...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 ON Figure 3 3 Open VCOM Function 2 Connect the ICE USB connector shown in Figure 3 4 to the PC USB port through USB cable Figure 3 4 ICE USB Connector 3 Find the Nuvoton Virtual COM Port on the Device Manger as Figure 3 5 ...

Page 27: ...v 1 00 NUMAKER M252SD USER MANUAL M N m U Figure 3 5 Device Manger 4 Open a serial port terminal PuTTY for example to print out debug message Set the speed to 115200 Figure 3 6 presents the PuTTY session setting Figure 3 6 PuTTY Session Setting ...

Page 28: ...e the Project under Toolchains Open and execute the project under the toolchain The section 3 6 1 0 and 3 6 3 describe the steps of executing project in Keil MDK IAR EWARM and NuEclipse respectively 3 6 1 Keil MDK This section provides steps to beginners on how to run a project by using Keil MDK 1 Double click the Template uvproj to open the project Note If Figure 3 8 warning message jumps out ple...

Page 29: ... 9 Project File Migrate to Version 5 Format 2 Make sure the debugger is Nuvoton Nu Link Debugger as shown in Figure 3 10 and Figure 3 11 Note If the dropdown menu in Figure 3 10 does not contain Nuvoton Nu Link Debugger item please rework section 3 2 2 1 Figure 3 10 Debugger Setting in Options Window ...

Page 30: ...y 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 3 12 Compile and Download the Project 4 Figure 3 13 shows the debug mode under Keil MDK Click Run and the debug message will be printed out as shown in Figure 3 14 User can debug the project under debug mode...

Page 31: ...UMAKER M252SD USER MANUAL M N 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 3 13 Keil MDK Debug Mode Figure 3 14 Debug Message on Serial Port Terminal Windows ...

Page 32: ...eww to open the project 2 Make sure the toolbar contain Nu Link item as shown in Figure 3 15 Note If the toolbar does not contain Nu Link item please rework section 3 2 Figure 3 15 IAR EWARM Window 3 Make target file as presented in Figure 3 16 After successfully compile the project download code to the flash memory and enter debug mode 1 3 2 1 Make 3 Download and Debug 2 Successfully compile Figu...

Page 33: ... in Figure 3 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 1 2 3 1 Go 3 Reset 2 Break Figure 3 17 IAR EWARM Debug Mode Figure 3 18 Debug Message on Serial Port Terminal Windows 3 6 3 NuEclipse For more information about how to use NuEclipse please refer to the NuEclipse User Manual ...

Page 34: ... 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 8 3 3V SPI FLASH ICEC12 0 1u C0603 SN74LV2T45DCUR ICEU4 SOP8 3 1 0 5 GND 4 A2 3 VCCA 1 DIR 5 A1 2 B2 6 B1 7 VCCB 8 SPIM_CLK_LV SN74LV2T45DCUR ICEU3 SOP8 3 1 0 5 GND 4 A2 3 VCCA 1 DIR 5 A1 2 B2 6 B1 7 VCCB...

Page 35: ..._OUT 15 PF 3 EBI_nCS0 UART0_TXD I2C0_SCL XT1_IN 16 PF 2 EBI_nCS1 UART0_RXD I2C0_SDA XT1_OUT 17 PC 7 EBI_AD9 UART0_nCTS PWM1_CH2 TM0 INT3 18 PC 6 EBI_AD8 UART0_nRTS PWM1_CH3 TM1 INT2 19 PA 7 EBI_AD7 UART0_TXD I2C1_SCL PWM1_CH4 ACMP0_WLAT TM2 INT1 20 PA 6 EBI_AD6 UART0_RXD I2C1_SDA PWM1_CH5 ACMP1_WLAT TM3 INT0 21 VSS 22 VDD 23 PD 15 PWM0_CH5 TM3 INT1 24 PA 5 UART0_nCTS UART0_TXD I2C0_SCL PWM0_CH0 25...

Page 36: ...P49 MCU_TX MCU_RX PB15_NU5_GPIO P51 PB14_LED_R P53 P58 P57 P52 PA5_NU3_D8 PA4_NU3_D9 PA7_NU3_D6 P56 P55 P59 P60 P54 PA6_NU3_D7 P61 P63 P62 P64 External Connector P50 P53 P58 P57 P52 P51 P49 P56 P55 P59 P60 P54 P61 P63 P62 P64 UNO Interface P1 P16 P17 P32 P2 P4 P3 P1 P12 P11 P10 P9 P8 P7 P6 P5 P16 P15 P14 P13 JP3 HEADER 2 54 16X2 NC 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 ...

Page 37: ...NuMaker M252SD Aug 02 2019 Page 37 of 38 Rev 1 00 NUMAKER M252SD USER MANUAL M N m U 5 REVISION HISTORY Date Revision Description 2019 08 02 1 00 1 Initially issued ...

Page 38: ...usage includes 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 for vehicular use traffic signal instruments all types of safety devices and other applications intended to support or sustain life All Insecure Usage shall be made at customer s risk and ...

Reviews: