README.md 4.9 KB
Newer Older
T
thread-liu 已提交
1
# STM32MP157A-DK1 BSP (Board Support Package) Execution Instruction
T
thread-liu 已提交
2

T
thread-liu 已提交
3
[中文页](README_zh.md) |
T
thread-liu 已提交
4

T
thread-liu 已提交
5
## Introduction
T
thread-liu 已提交
6

T
thread-liu 已提交
7
This document records the execution instruction of the BSP (board support package) provided by the RT-Thread development team for the STM32MP157A-DK1 development board.
T
thread-liu 已提交
8

T
thread-liu 已提交
9
The document is covered in three parts:
T
thread-liu 已提交
10

T
thread-liu 已提交
11
- STM32MP157A-DK1 Board Resources Introduction
T
thread-liu 已提交
12

T
thread-liu 已提交
13
- Quickly Get Started
T
thread-liu 已提交
14

T
thread-liu 已提交
15
- Advanced Features
T
thread-liu 已提交
16

T
thread-liu 已提交
17
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.
T
thread-liu 已提交
18

T
thread-liu 已提交
19
## STM32MP157A-DK1 Board Resources Introduction
T
thread-liu 已提交
20

T
thread-liu 已提交
21
The STM32MP157A-DK1 is a development board based on a dual Cortex-A7 and Cortex-M4 core. The Cortex-A7 core operates at 800 MHZ and the Cortex-M4 operates at 209MHZ. There is no Flash inside the STM32MP157A.
T
thread-liu 已提交
22

T
thread-liu 已提交
23
  ![board](figures/board.png)
T
thread-liu 已提交
24

T
thread-liu 已提交
25
The mainly-used **on-board resources** are shown as follows:
T
thread-liu 已提交
26

T
thread-liu 已提交
27 28 29 30 31 32
- MCU : STM32MP157AACx
- Common peripherals:
  - 4 LEDs: LD4(PA14), LD6(PA13), LD7(PH7), LD8(PD11)
  - 4 Buttons:  WAKE_UP, RESET (NRST), USER1(PA14), USER2 (PA13)
- Common-used interface: USB, SD card, Ethernet, MIPI, USB HOST, Audio, HDMI, Arduino.
- Debug interface: Standard JTAG/SWD.
T
thread-liu 已提交
33

T
thread-liu 已提交
34
For more details about this board, please refer to the ST official documentation: [STM32MP157A-DK1 Development board introduction](https://www.st.com/content/st_com/zh/products/evaluation-tools/product-evaluation-tools/mcu-mpu-eval-tools/stm32-mcu-mpu-eval-tools/stm32-discovery-kits/stm32mp157a-dk1.html)
T
thread-liu 已提交
35

T
thread-liu 已提交
36
## Peripheral Condition
T
thread-liu 已提交
37

T
thread-liu 已提交
38
Each peripheral supporting condition for this BSP is as follows:
T
thread-liu 已提交
39

T
thread-liu 已提交
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| On-board Peripheral            | **Support** |     **Remark**     |
| :----------------------------- | :---------: | :----------------: |
| USB TO UART                    |     YES     |                    |
| PWR                            |     YES     |                    |
| RCC                            |     YES     |                    |
| SD Card (SDMMC)                |     NO      |                    |
| ETH                            |     NO      |                    |
| AUDIO                          |     NO      |                    |
| **On-chip Peripheral Drivers** | **Support** |     **Remark**     |
| GPIO                           |     YES     | GPIOA-GPIOK, GPIOZ |
| UART                           |     YES     |  UART4 (ST-Link)   |
| EXTI                           |     YES     |                    |
| SPI                            |     YES     |                    |
| TIM                            |     YES     |                    |
| LPTIM                          |     YES     |                    |
| I2C                            |     YES     |      Software      |
| ADC                            |     YES     |                    |
| DAC                            |     YES     |                    |
| WWDG                           |     YES     |                    |
T
thread-liu 已提交
59

T
thread-liu 已提交
60
## Execution Instruction
T
thread-liu 已提交
61

T
thread-liu 已提交
62
### Quickly Get Started
T
thread-liu 已提交
63

T
thread-liu 已提交
64
This BSP provides IAR projects for developers. Here's an example of the IAR development environment, to introduce how to run the system.
T
thread-liu 已提交
65

T
thread-liu 已提交
66
#### Hardware Connection
T
thread-liu 已提交
67

T
thread-liu 已提交
68
Use a USB cable to connect the development board to the PC and turn on the power switch.
T
thread-liu 已提交
69

T
thread-liu 已提交
70
#### Compile And Download
T
thread-liu 已提交
71

T
thread-liu 已提交
72
Double-click the project.eww file, to open the IAR project, compile and download the program to the board.
T
thread-liu 已提交
73

T
thread-liu 已提交
74
> By default, the project uses ST_LINK simulator to download the program, when the ST_LINK connects the board, clicking the download button can download the program to the board.
T
thread-liu 已提交
75

T
thread-liu 已提交
76
#### Running Results
T
thread-liu 已提交
77

T
thread-liu 已提交
78
After the program is successfully downloaded, the system runs automatically. Observe the running results of the LED on the development board, the blue LD8 will flash periodically.
T
thread-liu 已提交
79

T
thread-liu 已提交
80
Connect the serial port of the board to PC, communicate with it via a serial terminal tool (115200-8-1-N). Restart the board and the startup information of RT-Thread will be observed:
T
thread-liu 已提交
81

T
thread-liu 已提交
82
```c
T
thread-liu 已提交
83 84 85 86
 \ | /
- RT -     Thread Operating System
 / | \     3.1.1 build Nov 19 2018
 2006 - 2018 Copyright by rt-thread team
T
thread-liu 已提交
87
msh >
T
thread-liu 已提交
88
```
T
thread-liu 已提交
89 90

### Advanced Features
T
thread-liu 已提交
91

T
thread-liu 已提交
92
This BSP only enables GPIO and serial port 4 by default. If need more advanced features, you need to configure the BSP with RT-Thread Env tools, as follows:
T
thread-liu 已提交
93

T
thread-liu 已提交
94 95 96 97
- Open the [Env](https://www.rt-thread.io/download.html?download=Env) tool under this BSP;
- Enter the `menuconfig` command to configure the project, then save and exit;
- Enter the  `pkgs --update` command to update the packages;
- Enter the `scons --target=iar` command to regenerate the  project.
T
thread-liu 已提交
98

T
thread-liu 已提交
99
## Notes
T
thread-liu 已提交
100

T
thread-liu 已提交
101
- Before downloading the program, set the board to the mode of "Engineering Mode".  The BOOT switch sets to BOOT0=0 and BOOT2=1, as shown below:
T
thread-liu 已提交
102

T
thread-liu 已提交
103
  ![boot](figures/boot_switch.png)
T
thread-liu 已提交
104

T
thread-liu 已提交
105
- If need to reburn the program, please reset the development board.
T
thread-liu 已提交
106

T
thread-liu 已提交
107
## Contact Information
T
thread-liu 已提交
108

T
thread-liu 已提交
109
accendant:
T
thread-liu 已提交
110

T
thread-liu 已提交
111
- [liukang](https://github.com/thread-liu)