This repository has been archived on 2023-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
bl_mcu_sdk/examples/pwm/pwm_dc_motor
2021-12-17 16:05:45 +08:00
..
cdk [chore][cdk] update header file path 2021-12-17 16:05:45 +08:00
CMakeLists.txt [refactor][examples] add case success message 2021-07-01 19:31:37 +08:00
main.c [refactor] remove bflb_platform.h from bl602 and bl702 driver,include it in anywhere used 2021-10-19 20:04:23 +08:00
readme.md [fix][examples/pwm] fix pwm div description 2021-09-28 11:31:02 +08:00

board/bl706_iot/pinmux_config.hCONFIG_GPIO20_FUNCCONFIG_GPIO21_FUNC 选择 GPIO_FUN_PWM

board/bl706_iot/clock_config.h

  • BSP_PWM_CLOCK_SOURCE 选择 ROOT_CLOCK_SOURCE_32K_CLK,也可选择其他时钟源,用其他时钟源时应注意 case 中的设置要匹配
  • BSP_PWM_CLOCK_DIV 设置成 0

将两个通道分别接到 H 桥或半桥的两个通道


$ make APP=pwm_dc_motor BOARD=bl706_iot

正常运行后GPIO20 和 GPIO21 引脚分别先后输出 PWM 波