配置CubeMx PWM引脚: 配置PWM引脚 3.在RT-Thread Settings中使能PWM驱动: 展开组件 找到并使能PWM驱动 4.drivers/board.h中添加PWM宏定义: #define BSP_USING_PWM4#define BSP_USING_PWM4_CH4 添加宏定义 5.声明PWM驱动句柄: struct rt_device_pwm *pwm4_dev;//pwm4驱动句柄 6.初始化PWM: pwm4_dev = ...
RT1052有PIT定时器、GPT定时器、QTMR定时器,其中QTMR定时器是可以配合PWM输出在电机控制器、逆变器当中...