1# STM32 Nucleo-64 BSP Introduction
2
3This document records the instruction of the BSP (board support package) that provided by the RT-Thread development team for the STM32 Nucleo-64 development boards.
4
5The document is covered in three parts:
6
7- Resources Introduction
8- Quickly Get Started
9- Advanced Features
10
11By reading the ***Quickly Get Started*** section developers can quickly get their hands on this BSP and run RT-Thread on the board. More advanced features will be introduced in the Advanced Features section to help developers take advantage of RT-Thread to drive more on-board resources.
12
13
14
15## Resources Introduction
16
17[![board](figures_en/stm32-nucleo-64.jpg)](figures/stm32-nucleo-64.jpg)
18
19### Description
20
21The STM32 Nucleo-64 board provides an affordable and flexible way for users to try out new concepts and build prototypes by choosing from the various combinations of performance and power consumption features, provided by the STM32 microcontroller. For the compatible boards, the external SMPS significantly reduces power consumption in Run mode. The ARDUINO® Uno V3 connectivity support and the ST morpho headers allow the easy expansion of the functionality of the STM32 Nucleo open development platform with a wide choice of specialized shields. The STM32 Nucleo-64 board does not require any separate probe as it integrates the ST-LINK debugger/programmer. The STM32 Nucleo-64 board comes with the STM32 comprehensive free software libraries and examples available with the STM32Cube MCU Package.
22
23### Features
24
25- Common features
26  - STM32 microcontroller in LQFP64 package
27  - 1 user LED shared with ARDUINO®
28  - 1 user and 1 reset push-buttons
29  - 32.768 kHz crystal oscillator
30  - Board connectors:
31    - ARDUINO® Uno V3 expansion connector
32    - ST morpho extension pin headers for full access to all STM32 I/Os
33  - Flexible power-supply options: ST-LINK, USB VBUS, or external sources
34  - On-board ST-LINK debugger/programmer with USB re-enumeration capability: mass storage, Virtual COM port and debug port
35  - Comprehensive free software libraries and examples available with the STM32Cube MCU Package
36  - Support of a wide choice of Integrated Development Environments (IDEs) including IAR Embedded Workbench®, MDK-ARM, and STM32CubeIDE
37- Board-specific features
38  - External SMPS to generate Vcore logic supply
39  - 24 MHz HSE – Board connectors:
40    - External SMPS experimentation dedicated connector
41    - Micro-AB or Mini-AB USB connector for the ST-LINK
42    - MIPI® debug connector
43  - Arm® Mbed Enabled™ compliant
44
45### **For more details about these boards, please refer to [ST Nucleo Official Website](https://www.st.com/en/evaluation-tools/stm32-nucleo-boards.html?querycriteria=productId=LN1847).**
46
47
48
49## Quickly Get Started
50
51This BSP provides MDK4, MDK5, and IAR projects for developers and it supports the GCC development environment. Here's an example of the MDK5 development environment, to introduce how to run the system.
52
53![nucleo64_layout](figures_en/nucleo64_layout.jpg)
54
55### Hardware connection
56
57Use a Type-A to Mini-B cable to connect the development board to the PC and turn on the power switch. The LD3 (PWR) and LD1 (COM) will light.
58
59### Compile and Download
60
61- Double-click the `project.uvprojx` file to open the MDK-Keil5 project  (**NOT** `template.uvprojx` file)
62- Click the “option for target” button
63  - Debug: Choose "ST-LINK Debugger" and Click "Setting" button:
64    - Port: choose "SW (Serial Wire)"
65    - Flash Download: check "Reset and Run"
66
67- Compile and download the program to the board
68
69### Running Results
70
71After the program is successfully downloaded, the system runs automatically. Observe the running results of the LED on the development board, the LD3 and LD1 will light all the time, and LD2 will flash periodically.
72
73The USB virtual COM port connects to **USART2 by default**, and when the corresponding serial port (**115200-8-1-N**) is opened in the terminal tool, the output information of RT-Thread can be seen when the device is reset:
74
75```shell
76 \ | /
77- RT -     Thread Operating System
78 / | \     4.0.0 build Dec 21 2018
79 2006 - 2018 Copyright by rt-thread team
80msh >
81```
82
83### Terminal tool - PuTTy
84
85If you don't have a terminal tool software available, you can download *PuTTy*:
86
87>  https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
88
89![putty](figures/putty.png)
90
91
92
93Follow these tutorial videos to learn PuTTy:
94
95> https://www.youtube.com/watch?v=ab4ilbsteWU
96>
97> https://www.youtube.com/watch?v=dO-BMOzNKcI
98
99
100
101## Advanced Features
102
103This BSP only enables GPIO and USART2 by default. If you need more advanced features such as SPI, I2C, you need to configure the BSP with RT-Thread [ENV tool](https://www.rt-thread.io/download.html?download=Env) , as follows:
104
1051. Open the Env tool under the specific BSP folder;
1062. Enter `menuconfig` command to configure the project, then save and exit;
1073. Enter `pkgs --update` command to update the package;
1084. Enter `scons --target=mdk4/mdk5/iar` command to regenerate the project.
109
110Learn how to use RT-Thread Env, click [Here](https://github.com/RT-Thread/rt-thread/blob/master/documentation/env/env.md).
111
112
113
114## Translated & Maintained By
115
116Cathy Lee @ RT-Thread Team
117
118> https://github.com/Cathy-lulu
119>
120> contact@rt-thread.org
121
122Meco Man @ RT-Thread Community
123
124> jiantingman@foxmail.com
125>
126> https://github.com/mysterywolf