Merge pull request #3182 from balanceTWK/master_doc

[stm32][doc] update STM32系列外设驱动添加指南.md
This commit is contained in:
Bernard Xiong 2019-11-09 06:33:34 +08:00 committed by GitHub
commit 265577ee08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 0 deletions

View File

@ -144,3 +144,18 @@
![adc 编译](figures/adc_config3.png)
![adc 编译](figures/adc_config4.png)
#### 5.3.4 编码器外设驱动添加说明
1. 打开 STM32CubeMX 工程,设置 TIMER 在 Cube 里的选项,如下图所示:
![pulse_encoder CubeMX 配置](figures/pulse_encoder_config1.png)
2. 打开 stm32/stm32f407-atk-explorer/board/Kconfig ,添加 Kconfig 选项。选中自己添加的选项后,生成一遍工程,如下图所示:
![pulse_encoder Kconfig 配置](figures/pulse_encoder_config2.png)
3. 打开工程进行编译,工程会提示 PULSE_ENCODER4_CONFIG 未定义。 可以在 stm32/libraries/HAL_Drivers/config/f4/pulse_encoder_config.h 中进行定义,如下图所示:
![pulse_encoder 编译](figures/pulse_encoder_config3.png)
![pulse_encoder 编译](figures/pulse_encoder_config4.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB