================================================================================
样例使用说明
Sample Description
================================================================================
功能描述:
此样例演示了使用TIM1产生“六步PWM信号”,每间隔1ms在SysTick中断中触发换向,实现无刷
电机的换向。
Function descriptions:
This example demonstrates the use of TIM1 to generate a "six step PWM signal",
which triggers commutation in the SysTick interrupt every 1ms to achieve
commutation of a brushless motor
================================================================================
测试环境:
测试用板:PY32F002B_STK
MDK版本: 5.28
IAR版本: 9.20
Test environment:
Test board: PY32F002B_STK
MDK Version: 5.28
IAR Version: 9.20
================================================================================
使用步骤:
1. 编译下载程序到MCU,并运行
2. 使用逻辑分析仪观察引脚PA5/PB2/PA3/PB1/PA4/PB0的波形
Example execution steps:
1. Compile and download the program to MCU and run it
2. Use Logic analyzer to observe the waveform of pin PA5/PB2/PA3/PB1/PA4/PB0
================================================================================
注意事项:
换向步骤和波形如下所示:
第一步 第二步 第三步 第四步 第五步 第六步
CH1 1 0 0 0 0 1
CH1N 0 0 1 1 0 0
CH2 0 0 0 1 1 0
CH2N 1 1 0 0 0 0
CH3 0 1 1 0 0 0
CH3N 0 0 0 0 1 1
CH1 (PA05) |||||||_________________________________|||||||
CH1N (PB02) _______________||||||||||||||||________________
CH2 (PA03) _______________________||||||||||||||||________
CH2N (PB01) |||||||||||||||________________________________
CH3 (PA04) _______||||||||||||||||________________________
CH3N (PB00) ________________________________|||||||||||||||
Notes:
The commutation steps and waveforms are as follows:
Step1 Step2 Step3 Step4 Step5 Step6
CH1 1 0 0 0 0 1
CH1N 0 0 1 1 0 0
CH2 0 0 0 1 1 0
CH2N 1 1 0 0 0 0
CH3 0 1 1 0 0 0
CH3N 0 0 0 0 1 1
CH1 (PA05) |||||||_________________________________|||||||
CH1N (PB02) _______________||||||||||||||||________________
CH2 (PA03) _______________________||||||||||||||||________
CH2N (PB01) |||||||||||||||________________________________
CH3 (PA04) _______||||||||||||||||________________________
CH3N (PB00) ________________________________|||||||||||||||
================================================================================