README.md 4.8 KB
Newer Older
1
# STM32F091-Nucleo BSP Introduction
S
SummerGift 已提交
2

C
Cathy Li 已提交
3
[中文页](README_zh.md) |
S
SummerGift 已提交
4

C
Cathy Li 已提交
5
## Introduction
S
SummerGift 已提交
6

C
Cathy Li 已提交
7
This document records the execution instruction of the BSP (board support package) provided by the RT-Thread development team for the STM32F091RC-Nucleo development board.
S
SummerGift 已提交
8

C
Cathy Li 已提交
9
The document is covered in three parts:
S
SummerGift 已提交
10

C
Cathy Li 已提交
11 12 13
- STM32F091RC-Nucleo Board Resources Introduction
- Quickly Get Started
- Advanced Features
S
SummerGift 已提交
14

C
Cathy Li 已提交
15
By 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.
S
SummerGift 已提交
16

17 18


C
Cathy Li 已提交
19
## STM32F091RC-Nucleo Resources Introduction
S
SummerGift 已提交
20

C
Cathy Li 已提交
21
The STM32F091RC-Nucleo is a development board that contains a ARM Cortex-M0. The maximum main frequency is 48 MHz, and it has a wealth of on-board resources that can take full advantage of the STM32F091's chip performance.
S
SummerGift 已提交
22

23
[![board](figures\board.jpg)](https://github.com/RT-Thread/rt-thread/blob/master/bsp/stm32/stm32f091-st-nucleo/figures/board.jpg)
S
SummerGift 已提交
24

C
Cathy Li 已提交
25
The mainly-used resources of this board are shown as follows:
S
SummerGift 已提交
26

C
Cathy Li 已提交
27 28 29 30 31
- MCU: STM32F091, Main Frequency 48MHz, 256KB FLASH, 32KB RAM
- External RAM: None
- External FLASH: None
- Common peripherals -Button: one, user (has the wake-up feature, PC13)
- Common-used interfaces: USB, Arduino interface, etc.
mysterywolf's avatar
update  
mysterywolf 已提交
32 33 34
- Debug interface: Standard SWD interface.

### For more details about this board, please refer to [ST official](https://www.st.com/en/evaluation-tools/stm32-nucleo-boards.html?querycriteria=productId=LN1847).
S
SummerGift 已提交
35

36 37


C
Cathy Li 已提交
38
## **Peripheral Condition**
S
SummerGift 已提交
39

C
Cathy Li 已提交
40
Each peripheral supporting condition for this BSP is as follows:
S
SummerGift 已提交
41

C
Cathy Li 已提交
42 43 44 45 46 47 48 49 50 51 52 53 54 55
| **On-board Peripherals**    | **Support** | **Remark**                                                   |
| --------------------------- | ----------- | ------------------------------------------------------------ |
| ST-LINK Virtual Serial Port | Support     | Using USART2                                                 |
| **On-chip Peripherals**     | **Support** | **Remark**                                                   |
| GPIO                        | Support     | PA0, PA1... PC15 ---> PIN: 0, 1...64                         |
| UART                        | Support     | USART1/2                                                     |
| SPI                         | Support     | SPI1                                                         |
| I2C                         | Support     |                                                              |
| TIMER                       | Support     |                                                              |
| ADC                         | Support     |                                                              |
| RTC                         | Support     | Support for external crystal oscillator and internal low-speed clocks |
| PWM                         | Support     |                                                              |
| FLASH                       | Support     |                                                              |
| IWGSupport                  |             |                                                              |
S
SummerGift 已提交
56 57


58 59

## Quickly Get Started
S
SummerGift 已提交
60

C
Cathy Li 已提交
61
This 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.
S
SummerGift 已提交
62

C
Cathy Li 已提交
63
#### Hardware connection
S
SummerGift 已提交
64

C
Cathy Li 已提交
65
Use a USB cable to connect the development board to the PC and turn on the power switch.
S
SummerGift 已提交
66

C
Cathy Li 已提交
67
#### Compile and Download
S
SummerGift 已提交
68

C
Cathy Li 已提交
69
Double-click the project.uvprojx file, to open the MDK5 project, compile and download the project to the board.
S
SummerGift 已提交
70

C
Cathy Li 已提交
71
> By default, the executable file will be downloaded to the board by the simulator, which is connected to PC via the USB cable.
S
SummerGift 已提交
72

C
Cathy Li 已提交
73
### Running Results
S
SummerGift 已提交
74

C
Cathy Li 已提交
75
Once the project is successfully downloaded, the system runs automatically.
S
SummerGift 已提交
76

C
Cathy Li 已提交
77
Connect the serial port of the board to PC, communicate with it via a serial terminal tool (115200bps, 8N1). Restart the board and the startup information of RT-Thread will be observed:
S
SummerGift 已提交
78

C
Cathy Li 已提交
79
```
S
SummerGift 已提交
80 81 82 83 84 85 86
 \ | /
- RT -     Thread Operating System
 / | \     4.0.0 build Dec 21 2018
 2006 - 2018 Copyright by rt-thread team
msh >
```

C
Cathy Li 已提交
87
### **Advanced Features**
S
SummerGift 已提交
88

C
Cathy Li 已提交
89
This BSP only enables GPIO and serial port 2 by default. If you need more advanced features such as SPI, I2C, you need to configure the BSP with RT-Thread [ENV tools](https://www.rt-thread.io/download.html?download=Env) , as follows:
S
SummerGift 已提交
90

C
Cathy Li 已提交
91 92 93 94
1. Open the env tool under BSP;
2. Enter menuconfig command to configure the project, then save and exit;
3. Enter pkgs --update command to update the package;
4. Enter scons --target=mdk4/mdk5/iar command to regenerate the project.
S
SummerGift 已提交
95

C
Cathy Li 已提交
96
Learn how to use RT-Thread Env, click [Here](https://github.com/RT-Thread/rtthread-manual-doc/blob/master/env/env.md).
S
SummerGift 已提交
97