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.
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.
...
@@ -20,16 +20,16 @@ By reading the Quickly Get Started section developers can quickly get their hand
...
@@ -20,16 +20,16 @@ By reading the Quickly Get Started section developers can quickly get their hand
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.
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.
![board](figures/board.png)
![board](figures/board.png)
The mainly-used **on-board resources** are shown as follows:
The mainly-used **on-board resources** are shown as follows:
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)
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)
...
@@ -40,11 +40,13 @@ Each peripheral supporting condition for this BSP is as follows:
...
@@ -40,11 +40,13 @@ Each peripheral supporting condition for this BSP is as follows:
@@ -73,95 +75,34 @@ Double-click the project.eww file, to open the IAR project, compile and download
...
@@ -73,95 +75,34 @@ Double-click the project.eww file, to open the IAR project, compile and download
#### Running Results
#### Running Results
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, and the terminal will periodically output"Hello RT-Thread!"
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.
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:
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:
```bash
```c
\|/
\|/
-RT-ThreadOperatingSystem
-RT-ThreadOperatingSystem
/|\3.1.1buildNov192018
/|\3.1.1buildNov192018
2006-2018Copyrightbyrt-threadteam
2006-2018Copyrightbyrt-threadteam
msh > Hello RT-Thread!
msh>
```
```
#### Drivers
##### 1. WWDG
* Open the [Env](https://www.rt-thread.io/download.html?download=Env) tool under this BSP;
* Enter the `menuconfig` command, enter the Hardware Drivers Config and open WWDG, save and exit;
* Enter the `scons --target=iar` command to regenerate project;
* The WWDG device will trigger an interrupt before feeding the dog, and LD5 will blink during the interruption;
* Enter the `wwdg_sample` in the terminal to obtain the Finsh command of the WWDG device;
*`wwdg_sample run` command can turn on the WWDG device;
*`wwdg_sample set` command can set the WWDG device separation frequency;
* By adjusting the separation frequency of the WWDG, LD5 will have different flickering frequencies.
##### 2. DAC
* Open the [Env](https://www.rt-thread.io/download.html?download=Env) tool under this BSP;
* Enter the `menuconfig` command, enter the Hardware Drivers config and open DAC, save and exit;
* Enter the `scons --target=iar` command to regenerate project.
###### Finsh
Before you use a device, you need to find out if the device exists, and you can use the name of the DAC device that is enrolled with the command `dac probe` . As shown as follows.
```
msh />dac probe dac1
probe dac1 success
```
Enable the channel of the device can use the command `dac enable` followed by the channel number.
```shell
msh />dac probe dac1
probe dac1 success
```
Set up the data of the channel for a DAC device can use the command `dac write` followed by the channel number.
```
msh />dac write 1 1000
dac1 channel 1 write value is 1000
```
Disable the channel of the device can use the command `dac disable` followed by the channel number.
```c
msh/>dacdisable1
dac1channel1disablesuccess
```
3. LPTIM
* Open the [Env](https://www.rt-thread.io/download.html?download=Env) tool under this BSP;
* Enter the `menuconfig` command, enter the Hardware Drivers config and open LPTIM, save and exit;
* Enter the `scons --target=iar` command to regenerate project;
* The LPTIM device timing overflow will trigger an interrupt, which will print the string "hello rt-thread!";
* Enter the `lptim_sample` on the terminal to obtain the Finsh command of the LPTIM device;
*`lptim_sample run` command can turn on the LPTIM device;
*`lptim_sample set` command can set the LPTIM separation frequency.
### Advanced Features
### Advanced Features
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:
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:
* Open the [Env](https://www.rt-thread.io/download.html?download=Env) tool under this BSP;
- 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 `menuconfig` command to configure the project, then save and exit;
* Enter the `pkgs --update` command to update the packages;
- Enter the `pkgs --update` command to update the packages;
* Enter the `scons --target=iar `command to regenerate the project.
- Enter the `scons --target=iar`command to regenerate the project.
## Notes
## Notes
* 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:
- 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: