[bsp][stm32] 为文档添加 PWM 驱动教程

This commit is contained in:
tangweikang 2019-02-18 11:46:07 +08:00 committed by Bernard Xiong
parent daf211bee6
commit 7a6e7152cf
5 changed files with 14 additions and 0 deletions

View File

@ -96,3 +96,17 @@
| 11 | EMAC | **配置 ETH 外设的工作模式(一般为 RMII 模式)** |
| 12 | SDRAM | **需要根据板载的 SDRAM 型号配置片选脚,地址线,数据线等** |
### 5.3 PWM配置步骤
1. 打开 STM32CubeMX 工程,设置 PWM 在 Cube 里的选项。如下图:
![pwm CubeMX 配置](figures/pwm_config1.png)
2. 打开 stm32/stm32f429-atk-apollo/board/Kconfig ,添加 Kconfig 选项。选中自己添加的选项后,生成一遍工程。如下图:
![pwm Kconfig 配置](figures/pwm_config2.png)
3. 打开工程进行编译,工程会提示 PWM2_CONFIG 未定义。 可以在 stm32/libraries/HAL_Drivers/config/f4/pwm_config.h 中进行定义。
![pwm 编译](figures/pwm_config3.png)
![pwm 编译](figures/pwm_config4.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB