7 REVISION HISTORY ............................................................................ 29
Nov 28, 2018 Page 3 of 30 Rev 1.00
Page 4
NUTINY-SDK-M4521 USER MANUAL
1 OVERVIEW
NuTiny-SDK-M4521 is the specific development tool for NuMicro® M4521 series. Users can use
NuTiny-SDK-M4521 to develop and verify the application program easily.
NuTiny-SDK-M4521 includes two portions. One is NuTiny-EVB-M4521 and the other is Nu-LinkMe. NuTiny-EVB-M4521 is the evaluation board and Nu-Link-Me is its Debug Adaptor. Thus,
users do not need other additional ICE or debug equipments.
M4521
Nov 28, 2018 Page 4 of 30 Rev 1.00
Page 5
NUTINY-SDK-M4521 USER MANUAL
2 NUTINY-SDK-M4521 INTRODUCTION
VDD (JP1)
Reset Button
(SW1)
I/O LED
Power LED
Target Chip
Virtual COM Port
Function Switch
(SW2)
ICE Controller
USB Connector
(J2)
ICE Controller
VCC : 3.3V or 5V
(JPR1)
Extended Connector (JP5, JP7)
GND (JP4)
Extended Connector (JP6, JP8)
USB Connector
(J3)
NuTiny-SDK-M4521 uses the M4521SE6AE as the target microcontroller. Figure 2-1 is NuTinySDK-M4521 for M4521 series, the left portion is called NuTiny-EVB-M4521 and the right portion is
Debug Adaptor called Nu-Link-Me.
NuTiny-EVB-M4521 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 M4521 series features. The
NuTiny-EVB-M4521 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. The Nu-Link-Me V3.0 also supports VCOM function,
which gives users more flexibility when debug. To use Nu-Link-Me Debug adaptor with IAR or
Keil, please refer to “Nuvoton NuMicro
ICE driver user manual” in detail. These two documents will be stored in the local hard disk when
the user installs each driver. To use Nu-Link-Me 3.0 VCOM function, please refer to Chapter 5.
®
IAR ICE driver user manual “or Nuvoton NuMicro® Keil
M4521
Figure 2-1 NuTiny-SDK-M4521 (PCB Board)
Nov 28, 2018 Page 5 of 30 Rev 1.00
Page 6
NUTINY-SDK-M4521 USER MANUAL
NuTiny -SDK-M4521 Jumper Description 2.1
Model
JPR1
JP1 VDD
J2 ICE USB Port
MCU Voltage
Model 1
Select 3.3V
(Default)
DC 3.3V Output
Connect to PC
DC 3.3V
Model 2
Select 5.0V
DC 5.0V Output
Connect to PC
DC 5.0V
Model 3
Select 3.3V or 5.0V
DC 2.5V ~ 5.0V
Input
Connect to PC
Voltage by JP1
Input
Model 4*
X
DC 2.5V ~ 5.0V
Input
X
Voltage by JP1
Input
2.1.1 Power Setting
JP1: VDD Voltage connecter in NuTiny-EVB-M4521
J2: USB port in Nu-Link-Me
JPR1: Select 5.0V or 3.3V for system power
X: Unused.
Note*: Need to separate NuTiny-EVB-M4521 and Nu-Link-Me.
M4521
2.1.2 Debug Connector
JP2: Connector in target board (NuTiny-EVB-M4521) for connecting with Nuvoton ICE
adaptor (Nu-Link-Me)
JP11: Connector in ICE adaptor (Nu-Link-Me) for connecting with a target board (NuTiny-
EVB-M4521)
2.1.3 USB Connector
J2: Micro USB Connector in Nu-Link-Me connected to a PC USB port
J3: Micro USB Connector in NuTiny-EVB-M4521 for application use
2.1.4 Extended Connector
JP5, JP6, JP7, and JP8: Show all chip pins in NuTiny-EVB-M4521
2.1.5 Reset Button
SW1: Reset button in NuTiny-EVB-M4521
2.1.6 Power Connector
JP1: VDD connector in NuTiny-EVB-M4521
JP4: GND connector in NuTiny-EVB-M4521
2.1.7 Virtual COM Port Function Switch
Nov 28, 2018 Page 6 of 30 Rev 1.00
SW2: Switch SW2 on/off before power on to enable/disable VCOM function.
SW2 connects pin 6(PD.0/RXD) and pin 10(PD.1/TXD) in NuTiny-EVB-M4521 with pin
22(PB.1/TXD) and pin 21(PB.0/RXD) in Nuvoton ICE adaptor (Nu-Link-Me V3.0). SW2
Page 7
NUTINY-SDK-M4521 USER MANUAL
connects pin 30(VCOM) in Nuvoton ICE adaptor (Nu-Link-Me V3.0) to GND to enable VCOM
Switch Pin
Number
Disable VCOM Mode
Enable VCOM Mode
1
Off
On 2 Off
On 3 Off
On
4 X X
function.
X: Unused.
M4521
Nov 28, 2018 Page 7 of 30 Rev 1.00
Page 8
NUTINY-SDK-M4521 USER MANUAL
Pin Assignment for Extended Connector 2.2
Pin No.
Pin Name
Type
Description
1
PB.15
I/O
General purpose digital I/O pin.
EADC_CH12
A
EADC analog input channel 12.
EBI_nCS1
O
EBI chip select 1 enable output pin.
2
PB.5
I/O
General purpose digital I/O pin.
EADC_CH13
A
EADC analog input channel 13.
SPI0_MOSI0
I/O
SPI0 1st MOSI (Master Out, Slave In) pin.
SPI1_MOSI
I/O
SPI1 MOSI (Master Out, Slave In) pin.
EBI_AD6
I/O
EBI address/data bus bit 6.
UART2_RXD
I/O
Data receiver input pin for UART2.
3
PB.6
I/O
General purpose digital I/O pin.
EADC_CH14
A
EADC analog input channel 14.
SPI0_MISO0
I/O
SPI0 1st MISO (Master In, Slave Out) pin.
SPI1_MISO
I/O
SPI1 MISO (Master In, Slave Out) pin.
EBI_AD5
I/O
EBI address/data bus bit 5.
4
PB.7
I/O
General purpose digital I/O pin.
EADC_CH15
A
EADC analog input channel 15.
SPI0_CLK
I/O
SPI0 serial clock pin.
SPI1_CLK
I/O
SPI1 serial clock pin
EBI_AD4
I/O
EBI address/data bus bit 4.
STADC
I/O
ADC external trigger input.
5
nRESET
I
External reset input: active LOW, with an internal pull-up.
Set this pin low reset to initial state.
6
PD.0
I/O
General purpose digital I/O pin.
EADC_CH6
A
EADC analog input channel 6.
UART0_RXD
I
Data receiver input pin for UART0.
INT3 I External interrupt3 input pin.
T3
I/O
Timer3 event counter input / toggle output.
7
AVSS P Ground pin for analog circuit.
8
PD.8
I/O
General purpose digital I/O pin.
EADC_CH7
A
EADC analog input channel 7.
EBI_nCS0
O
EBI chip select 0 enable output pin.
9
PD.9
I/O
General purpose digital I/O pin.
NuTiny-EVB-M4521 provides M4521SE6AE on board and the extended connector for LQFP64pin. Table 2-1 is the pin assignment for M4521SE6AE.
Program the application code into onchip Flash ROM
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
This example demonstrates the ease of downloading and debugging an application on a NuTinySDK-M4521 board. It can be found on Figure 3-2 list directory and downloaded from Nuvoton
NuMicro® website.
M4521
To use this example:
This sample code runs some functions about system manager controller and clock controller, and
will show messages by Uart. Users can see the messages by following the steps of Chapter 5.
Nov 28, 2018 Page 18 of 30 Rev 1.00
Figure 3-2 Example Directory
Page 19
NUTINY-SDK-M4521 USER MANUAL
4 HOW TO START NUTINY-SDK-M4521 ON THE IAR EMBEDDED
WORKBENCH
IAR Embedded Workbench Software Download and Install 4.1
Please connect to IAR company website (http://www.iar.com) to download the IAR Embedded
Workbench and install the EWARM.
Nuvoton Nu-Link Driver Download and Install 4.2
Please visit the Nuvoton company NuMicro® website (http://www.nuvoton.com/NuMicro ) to
download the “NuMicro® IAR EWARM Driver” file. 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.
Program the application code into on-chip
Flash ROM
File-Open-Workspace
Open the SYS.eww workspace file
Single step through code
Project - Make
Compile and link the SYS application
Reset the device
Run the application
This example demonstrates the ease of downloading and debugging an application on a
NuTiny-SDK-M4521 board. It can be found on Figure 4-2 list directory and downloaded from
Nuvoton NuMicro® website.
M4521
Figure 4-2 Example Directory
To use this example:
This sample code runs some functions about system manager controller and clock controller, and
will show messages by Uart. Users can see the messages by following the steps of Chapter 5.
Nov 28, 2018 Page 20 of 30 Rev 1.00
Page 21
NUTINY-SDK-M4521 USER MANUAL
5 STARTING TO USE NU-LINK-ME 3.0 VCOM FUNCTION
Downloading and Installing VCOM Driver 5.1
Please connect to Nuvoton NuMicro® website (http://www.nuvoton.com/NuMicro) to download
the “NuMicro
downloaded, please unzip the file and execute the “ICP Programming Tool.exe”. Simply follow
the installation and optional steps to install ICP Programming Tool and Nu-Link USB Driver,
which included VCOM driver.
®
ICP Programming Tool” file. After the ICP Programming Tool driver is
M4521
Nov 28, 2018 Page 21 of 30 Rev 1.00
Figure 5-1 Optional Step after ICP Programming Tool Installation
Figure 5-2 Install Nuvoton COM&LPT Driver
Page 22
NUTINY-SDK-M4521 USER MANUAL
Figure 5-3 Install Nuvoton Universal Serial Bus Controllers
VCOM Mode Setting on NuTiny-SDK-M4521 5.2
Before the NuTiny-SDK-M4521 is connected to the PC, please enable SW2 VCOM function by
switching on SW2. The NuTiny-EVB-M4521 transmits through UART0 to VCOM to send out
data. Switch SW2 off when using UART0 function without VCOM function.
M4521
After connected USB port in Nu-Link-Me to the PC, user can find a “Nuvoton Virtual Com Port”
from Device Manager as Figure 5-4.
Figure 5-4 Nuvoton Virtual Com Port
Setup on the Development Tool 5.3
The example is demonstrated on the Keil μVision® IDE.
5.3.1 Check the Using UART on the Keil μVision® IDE
Please open the project and find system_M4521.h (which can be found in
\\M4521_BSP_CMSIS_V3.00.000\Library\Device\Nuvoton\M4521\Include) to check the using
UART in DEBUG_PORT. The setting has to be the same as the using UART in the NuTinyEVB-M4521.
Nov 28, 2018 Page 22 of 30 Rev 1.00
Page 23
NUTINY-SDK-M4521 USER MANUAL
Figure 5-5 The Using UART on Keil μVision® IDE
Step 1
5.3.2 Check the Target Device and Debug Setting
The target device has to be the same as the setting in Debug. Please click “Target Option” to
open the Option windows, and find the setting in “Device”, “Debug”, and “Utilities” page. Please
follow the steps below to check the setting.
M4521
Nov 28, 2018 Page 23 of 30 Rev 1.00
Page 24
M4521
NUTINY-SDK-M4521 USER MANUAL
Step 2
Step 3
Nov 28, 2018 Page 24 of 30 Rev 1.00
Page 25
NUTINY-SDK-M4521 USER MANUAL
5.3.3 Build and Download Code to NuTiny-SDK-M4521
Please build the project and download code to NuTiny-SDK-M4521.
5.3.4 Open the Serial Port Terminal
User can use serial port terminal, PuTTY for example, to print out debug message.
M4521
Figure 5-6 Set Baud Rate
5.3.5 Reset Chip
After pushing the reset button, the chip will reprogram application and print out debug message.
Nov 28, 2018 Page 25 of 30 Rev 1.00
Page 26
M4521
NUTINY-SDK-M4521 USER MANUAL
Figure 5-7 Serial Port Terminal Windows
Notice: Please switch SW2 on before the NuTiny-SDK-M4521 connects to the PC. When the NuTinySDK-M4521 connects to the PC with SW2 switch on, PC will detect VCOM as a USB device and the
detection will only be processed once. VCOM will not function if switch on SW2 after the connection.
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”.
Insecure 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 in the event that third parties lay
claims to Nuvoton as a result of customer’s Insecure Usage, customer shall indemnify the
damages and liabilities thus incurred by Nuvoton.
Nov 28, 2018 Page 30 of 30 Rev 1.00
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.