Download NuTiny-SDK-M058S User Manual

Transcript
NuTiny-SDK-M058S User Manual
ARM Cortex™-M0
32-bit Microcontroller
NuTiny-SDK-M058S User Manual
For NuMicro M058S 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.
Oct. 31, 2013
1 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
Table of Contents
1
Overview ........................................................................................... 3
2
Introduction to NuTiny-SDK- M058S ..................................................... 3
2.1
2.2
2.3
NuTiny-SDK- M058S Jumper Description .................................................. 4
Pin Assignment for Extended Connectors .................................................. 5
NuTiny-SDK-M058S PCB Placement ......................................................... 6
Starting to Use NuTiny-SDK-M058S on the Keil μVision® IDE .................. 7
3
3.1
3.2
3.3
3.4
Downloading and Installing Keil μVision® IDE Software............................... 7
Downloading and Installing Nuvoton Nu-Link Driver .................................... 7
Hardware Setup ................................................................................... 7
Smpl_NuTiny-M051 Example Program ...................................................... 8
4
Starting to Use NuTiny-SDK-M058S on the IAR Embedded
Workbench ............................................................................................... 9
4.1
4.2
4.3
4.4
Downloading and Installing IAR Embedded Workbench Software .................. 9
Downloading and Installing Nuvoton Nu-Link Driver .................................... 9
Hardware Setup ................................................................................... 9
Smpl_NuTiny-M051 Example Program .................................................... 10
5
NuTiny-EVB-M058S Schematics ......................................................... 11
6
Downloading NuMicro™ Related Files from Nuvoton Website ................. 13
6.1
6.2
6.3
7
Downloading NuMicro™ Keil μVision® IDE Driver ..................................... 13
™
Downloading NuMicro IAR EWARM Driver................................................. 14
Downloading NuMicro™ M051 series BSP Software Library ............................. 15
Revision History ............................................................................... 16
Oct. 31, 2013
2 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
1
Overview
The NuTiny-SDK-M058S is a specific development tool for NuMicro M058S
series by which users can develop and verify the application program easily.
The NuTiny-SDK-M058S includes two portions: NuTiny-EVB-M058S (an
evaluation board) and Nu-Link-Me (Debug Adaptor). With the NuTiny-SDKM058S, users do not need additional ICE or debug equipment.
2
Introduction to NuTiny-SDK- M058S
The following figure shows the NuTiny-SDK-M058S for M058S series, in
which the left portion is called NuTiny-EVB-M058S and the right portion is
Debug Adaptor called Nu-Link-Me.
The NuTiny-EVB-M058S is similar to other development board. Users can
use it to develop and verify applications to emulate the real behavior. In fact,
the real chip M058S is mounted on the board. The NuTiny-EVB-M058S can
be a real system controller to design user target system.
The Nu-Link-Me is a Debug Adaptor which connects the USB port of your PC
to your target system (via Serial Wired Debug Port) and allows you to
program and debug embedded programs on the target hardware. To use the
Nu-Link-Me Debug adaptor with Keil or IAR, please refer to “Nuvoton
NuMicro™ IAR ICE Driver User Manual” or Nuvoton NuMicro™ Keil ICE
Driver User Manual” for details.
LQFP-64 pin extended connector
ICE Chip
Reset Key
IO LED
Power LED
LQFP-64 pin extended connector
Target Chip
ICE Chip UCB Connector
Figure 2-1 NuTiny-SDK-M058S (Green PCB Board)
Oct. 31, 2013
3 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
2.1
NuTiny-SDK- M058S Jumper Description
2.1.1 Power Settings
 JP1: VCC5 Voltage connecter in NuTiny-EVB-M058S
 J2: USB port in Nu-Link-Me
Model
Model 1
J1 USB Port
X
J2 USB Port
Connect to PC
Model 2
X
X
JP1 VCC5
MCU Voltage
DC 3.3V output
DC 3.3V
DC 2.5 V ~ 5.5 V Voltage by VCC5
Input
input
X: Unused.
2.1.2 Debug Connectors
 JP3: Target ICE Connector in NuTiny-EVB-M058S
 JP9: Nuvoton ICE Connector in Nu-Link-Me
2.1.3 USB Connectors
 J2: Mini USB Connecter in Nu-Link-Me
2.1.4 Extended Connectors
 JP5, JP6, JP7 and JP8: Show all of chip pins in NuTiny-EVB-M058S
2.1.5 Buttons
 SW1: Reset button in NuTiny-EVB-M058S
2.1.6 Power Connectors
 JP1: VCC connecter in NuTiny-EVB-M058S
 JP2: GND connecter in NuTiny-EVB-M058S
Oct. 31, 2013
4 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
2.2
Pin Assignment for Extended Connectors
The NuTiny-EVB- M058S provides the M058SSAN target chip on board and
the extended connectors (JP5, JP6, JP7 and JP8) for LQFP64-pin. The
following table is the pin assignment for M058SSAN.
Pin No
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Pin Name
Pin No
Pin Name
P1.5, MOSI_0, AIN5
33
P2.5
P1.6, MISO_0, AIN6
34
P2.6
P1.7, SPICLK0, AIN7
35
P2.7
/RST
36
P4.4, SCL1
P3.0, RXD
37
P4.5, SDA1
P5.0, T0EX
38
P4.6, ICE_CLK
P5.1, T1EX
39
P4.7, ICE_DAT
P5.2, SDA0
40
P6.0
P5.3, SCL0
41
P6.1
P3.1, TXD
42
P6.2
P3.2, /INT0, STADC, T0EX
43
P6.3
P3.3, /INT1, T1EX
44
P0.7, SPICLK0
P3.4, T0, SDA0
45
P0.6, MISO_0
P3.5 T1 SCL0, CKO
46
P0.5, MOSI_0
P4.3, PWM3
47
P0.4, SPISS0
P3.6, CKO
48
P4.1, PWM1, T3EX
P3.7
49
P0.3, RTS, RXD
XTAL2
50
P0.2, CTS, TXD
XTAL1
51
P0.1
VSS
52
P0.0
VDD
53
VSS
LDO_CAP
54
VDD
P5.4
55
P6.4
P5.5
56
P6.5
P5.6
57
P6.6
P5.7
58
P6.7
P2.0, PWM0
59
P1.0, T2, AIN0
P2.1, PWM1
60
P1.1, T3, AIN1
P2.2, PWM2
61
P1.2, AIN2
P2.3, PWM3
62
P1.3, AIN3
P2.4
63
P1.4, SPISS0, AIN4
P4.0, PWM0
64
P4.2, PWM2
Table 2-1 Pin Assignment for M058SSAN
Oct. 31, 2013
5 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
2.3
NuTiny-SDK-M058S PCB Placement
The following figure shows the NuTiny-SDK- M058S PCB placement.
Figure 2-2 NuTiny-SDK-M058S PCB Placement
Oct. 31, 2013
6 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
3
Starting to Use NuTiny-SDK-M058S on the Keil μVision® IDE
3.1
Downloading and Installing Keil μVision® IDE Software
Please visit the Keil company website (http://www.keil.com) to download the
Keil μVision® IDE and install the RVMDK.
3.2
Downloading and Installing Nuvoton Nu-Link Driver
Please visit Nuvoton NuMicro™ website (http://www.nuvoton.com/NuMicro)
to download the “NuMicro™ Keil μVision® IDE Driver” file. Please refer to
section 6.1 for the detailed download flow. After the Nu-Link driver is
downloaded, please unzip the file and execute the “NuLink_Driver_for_keil_RVMDK_V1.23.6103.zip” to install the driver.
3.3
Hardware Setup
The hardware setup is shown in the following figure.
Figure 3-1 NuTiny-SDK-M058S Hardware Setup
Oct. 31, 2013
7 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
3.4
Smpl_NuTiny-M051 Example Program
This example demonstrates how to download and debug an application on a
NuTiny-SDK-M058S board.
The example file can be found in the directory list shown in the following
figure.
Directory
Project File
Figure 3-2 Smpl_NuTiny-M051 Example Directory
To use this example:




Start μVision®
Project – Open
Open the Smpl_NuTiny-M051.uvproj
project file
Project – Build
Compile and link the Smpl_NuTinyM051 application
Flash – Download
Program the application code into onchip Flash ROM

Start Debug mode
When using the debugger commands,
you may:

Review variables in the watch
window

Single step through code

Reset the device

Run the application
The P3.6 LED on the NuTiny-EVBM058 board will be toggled on.
Oct. 31, 2013
8 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
4
Starting to Use NuTiny-SDK-M058S on the IAR Embedded
Workbench
4.1
Downloading and Installing IAR Embedded Workbench Software
Please visit the IAR company website (http://www.iar.com) to download the
IAR Embedded Workbench and install the EWARM.
4.2
Downloading and Installing Nuvoton Nu-Link Driver
Please visit the Nuvoton Company NuMicro™ website
™
(http://www.nuvoton.com/NuMicro) to download the “NuMicro IAR ICE
Driver User Manual” file. Please refer to section 6.2 for the detail download
flow. When the download had finished, please unzip the file and execute the
“Nu_Link_Driver_for_IAR_RVMDK_V1.23.6103.zip” to install the driver.
4.3
Hardware Setup
The hardware setup is shown in the following figure.
Figure 4-1 NuTiny-SDK-M058S Hardware Setup
Oct. 31, 2013
9 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
4.4
Smpl_NuTiny-M051 Example Program
The example demonstrates how to download and debug an application on a
NuTiny-SDK-M058S board.
The example can be found in the directory list shown in the following figure.
(Sample code can be downloaded from Nuvoton website).
Directory
Project File
Figure 4-2 Smpl_NuTiny-M051 Example Directory
To use this example:



Start IAR Embedded
Workbench

File-Open-Workspace
Open the Smpl_NuTiny-M051.eww
workspace file
Project - Make
Compile and link the Smpl_NuTinyM051 application
Project – Download and Debug
Program the application code into onchip Flash ROM

Single step through code

Reset the device

Run the application
The P3.6 LED on the NuTiny-EVB-M058S board will be toggled on.
Oct. 31, 2013
10 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
5
NuTiny-EVB-M058S Schematics
DVCC5
TICECON1
TICEDAT
TICECLK
TICERST
TICECON1
TICEDAT
TICECLK
TICERST
ICECON1
ICEDAT
ICECLK
ICERST
P22
DVCC5
RESET
JP1
C1
10uF/10V
TP1
SIP/1P
TP2
SIP/1P
DAVDD
1
2
Reset
HEADER 2
1
TANT-A
RESET
1
ICERST
1
SW1
PUSH BOTTON
SW
R1
10K
R0603
TP3
SIP/1P
JP2
DVCC5
JP3
1
3
5
7
9
2
4
6
8
10
GND
1
2
ICECON1
ICEDAT
ICECLK
ICERST
DAVDD
DVCC5
HEADER 2
P64
P63
P62
P61
P60
P59
P58
P57
P56
P55
P54
P53
P52
P51
P50
P49
HEADER 5X2
ICE INTERFACE
C3 20p
DVCC5
DAVDD
R2 33
L1
D12MI
L0603
Crystal
ADAVSS
DVCC5
RESET
P1
P3
P5
P7
P9
P11
P13
P15
2
IO1
KPT-2012
1 KP-2012
JP5
1
3
5
7
9
11
13
15
2
4
6
8
10
12
14
16
R3
500
R0603
2
P2
P4
P6
P8
P10
P12
P14
P16
P17
P19
P21
P23
P25
P27
P29
P31
HEADER 8X2
P33
P35
P37
P39
P41
P43
P45
P47
JP7
1
3
5
7
9
11
13
15
2
4
6
8
10
12
14
16
PR1
500
R0603
POWER1
KPT-2012
1 KP-2012
JP6
1
3
5
7
9
11
13
15
2
4
6
8
10
12
14
16
HEADER 8X2
P49
P51
P53
P55
P57
P59
P61
P63
JP8
1
3
5
7
9
11
13
15
2
4
6
8
10
12
14
16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
P1.5/AIN5/MOSI
P1.6/AIN6/MISO
P1.7/AIN7/SPICLK
RST
P3.0/RXD
AVSS
P5.1
P5.2
P5.3
P3.1/TXD
P3.2/INT0/STADC/T0EX
P3.3/INT1/T1EX
P3.4/T0/SDA0
P3.5/T1/SCL0
P4.3/PWM3+
P3.6/CKO
P18
P20
P22
P24
P26
P28
P30
P32
HEADER 8X2
P34
P36
P38
P40
P42
P44
P46
P48
ADAVSS
P16
P1
P2
P3
P4
P5
P6
P7
P8
P9
P10
P11
P12
P13
P14
P15
P16
T3EX/PWM1+/P4.1
SPISS0+/P0.4
MOSI+/P0.5
MISO+/P0.6
SPICLK+/P0.7
P6.3
P6.2
P6.1
P6.0
ICE_DAT/P4,7
ICE_CLK/P4.6
I2C1SDA/P4.5
I2C1SCL/P4.4
PWM7/P2.7
PWM6/P2.6
PWM5/P2.5
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
ICEDAT
ICECLK
P48
P47
P46
P45
P44
P43
P42
P41
P40
P39
P38
P37
P36
P35
P34
P33
P3.7
P7.0/TTAL2
P7.1/XTAL1
VSS
VDD
LDO
P5.4
P5.5
P5.6
P5.7
P2.0/PWM0
P2.1/PWM1
P2.2/PWM2
P2.3/PWM3
P2.4/PWM4
P4.0/PWM0+/T2EX
DVCC5
M058SSAN_LQFP64
P17
P18
P19
P20
P21
P22
P23
P24
P25
P26
P27
P28
P29
P30
P31
P32
C0603
PWM2+/P4.2
SPISS0/AIN4/P1.4
AIN3/P1.3
AIN2/P1.2
T3/AIN1/P1.1
T2/AIN0/P1.0
P6.7
P6.6
Vref
AVDD
VDD
VSS
P0.0
P0.1
TXD+/CTS0/P0.2
RXD+/RTS0/P0.3
L2
P50
P52
P54
P56
P58
P60
P62
P64
D12MO
D12MI
C5 20p
U6
L0603
XTAL3-1
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
X2
12MHz
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
D12MO
R0603
C0603
HEADER 8X2
DVCC5
CT1
1uF/6.3V
TANT-R
Title
Nuvoton NuTiny-EVB-M058SSAN(LQFP64)
Size
A3
Date:
Oct. 31, 2013
11 of 16
Document Number
Rev
2.0
Wednesday , July 10, 2013
Sheet
of
Rev. 1.00
NuTiny-SDK-M058S User Manual
ICECON1
VCC5
ISPLED 2
ICP1
KPT-2012
1 KP-2012
NUC_RST#
12M_I
12M_O
ICELED 2
NUC_RST#
RP1
1 8P4R-330 2
3
4
5
6
7
8
PVSS
8P4RA
2
R8
10K
R0603
VCC5
ICE1
KPT-2012
1 KP-2012
ICE_RST
TICEDAT
TICECLK
TICERST
C7
10uF/10V
GREEN 2
BUSY 1
KPT-2012
1 KP-2012
U2
ICELED
ISPLED
RED
GREEN
CB1
0.1u
C0603
1
3
5
7
9
2
4
6
8
10
C8
20p
R9
33
R0603
C0603
X3
12MHz
XTAL3-1 C9
20p
12M_I
PA4/ADC4
PA3/ADC3
PA2/ADC2
PA1/ADC1
PA0/ADC0
AVSS
ICE_CK
ICE_DAT
PA12/PWM0
PA13/PWM1
PA14/PWM2
PA15/PWM3
PC8/SS10
PC9/SPCLK1
PC10/SDI10
PC11/SDO10
NUC12SRE3AN
VBUS
VDD33
DD+
PB0/RX0
PB1/TX0
PB2/RTS0
PB3/CTS0
PC3/SDO00
PC2/SDI00
PC1/SPCLK0
PC0/SS00
PE5
PB11/TM3
PB10/SS01/TM2
PB9/SS11/TM1
VCC5
INT0/PB14
CPO1/PB13
CPO0/PB12
X32I
X32O
I2C1SCL/PA11
I2C1SDA/PA10
I2C0SCL/PA9
I2C0SDA/PA8
RX1/PB4
TX1/PB5
RTS1/PB6
CTS1/PB7
LDO
VDD
VSS
JP9
C0603
48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
VCC5
ICE_CLK
ICE_DAT
RTCK1
100K
R0603
ADAVSS
TICERST
TICECLK
RTDA2
RTDA3
RTDA1
100K
R0603
RRSET1
100K
R0603
TICEDAT
TICERST
0 1K
R0603
R0603
VCC5
VCC5
VCC5
USB_D+
USB_D-
VBUS
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CT2
10uF/6.3V
TANT-R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
TICEDAT
TICECLK
TICERST
HEADER 5X2
64
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
IDLE1
KPT-2012
1 KP-2012
SS24A
RB060L
TANT-A
AVDD
STADC/TM0/PB8
PVSS
VDD1
VSS1
/RESET
XT1_In
XT1_Out
INT1/PB15
CPP1/PC14
CPN1/PC15
CPP0/PC6
CPN0/PC7
AVDD
ADC7/PA7
ADC6/PA6
ADC/PA5
2
D2
TICECON1
12M_O
USBVBUS
R11
33
R0603
C10
AVDD
VCC5
L5
L0603
1u
C0603
J2
mini USB 5pin
1
2
3
4
5
DM
DP
USBVBUS
R12
33
R0603
CB2
0.1u
C0603
VCC
DM
DP
NC
GND
SHIELD
SHIELD
SHIELD
SHIELD
RTIDA1
100K
R0603
HEADER 5
6
7
8
9
1
2
3
4
5
L4
USB_MINI_B
ICE_DAT
ICE_CLK
ICE_RST
RICK1
100K
R0603
DEBUG
JP10
L0805
L6
L0603
ADAVSS
USBVBUS
VCC5
VCC
JP11
1
2
3
4
DM
DP
GND
HEADER 4
VCC5
OUT
JPR
P3V
HEADER 3
4
PD2
SS24A
1
2
IN
GND
OUT
USBVBUS
3
2
1
P5V
UP6
RT9164A-3.3v
3
1
2
RED
1
TICECON1
TICECON1
VCC5
ICE CONNECT IF
VCC5
CP1
10uF/10V
RB060L
TANT-B
Oct. 31, 2013
12 of 16
Title
Nuvoton NuTiny-EVB-M058SSAN(LQFP64)
Size
A3
Date:
Document Number
Rev
2.0
Wednesday , July 10, 2013
Sheet
of
Rev. 1.00
NuTiny-SDK-M058S User Manual
6
Downloading NuMicro™ Related Files from Nuvoton Website
6.1
Downloading NuMicro™ Keil μVision® IDE Driver
Step1
™
Visit the Nuvoton NuMicro Website: http://www.nuvoton.com/NuMicro
Step2
Downloading
the file
Step3
Step4
Download the NuMicro Keil uVision® IDE driver.
Oct. 31, 2013
13 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
6.2
Downloading NuMicro™ IAR EWARM Driver
Step1
™
Visit the Nuvoton NuMicro Website: http://www.nuvoton.com/NuMicro
Step2
Step 3
Downloading
the file
Step 4
™
®
Download the NuMicro IAR Embedded Workbench driver.
Oct. 31, 2013
14 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
6.3
Downloading NuMicro™ M051 series BSP Software Library
Step1
™
Visit the Nuvoton NuMicro Website: http://www.nuvoton.com/NuMicro
Step2
Step3
Download the NuMicro M051™ series software library.
Oct. 31, 2013
15 of 16
Rev. 1.00
NuTiny-SDK-M058S User Manual
7
Revision History
Revision
1.00
Date
Oct.31, 2013
Description
Initial release
Important Notice
Nuvoton products are not designed, intended, authorized or warranted for use as
components in systems or equipment intended for surgical implantation, atomic energy
control instruments, airplane or spaceship instruments, transportation instruments, traffic
signal instruments, combustion control instruments, or for other applications intended to
support or sustain life. Furthermore, Nuvoton products are not intended for applications
wherein failure of Nuvoton products could result or lead to a situation wherein personal
injury, death or severe property or environmental damage could occur.
Nuvoton customers using or selling these products for use in such applications do so at
their own risk and agree to fully indemnify Nuvoton for any damages resulting from such
improper use or sales.
Please note that all data and specifications are subject to change without notice. All the
trademarks of products and companies mentioned in this datasheet belong to their
respective owners.
Oct. 31, 2013
16 of 16
Rev. 1.00