控制一个三相电机,硬件上采用的EPWM3、5、6发SVPWM波形,调试中发现如果三组信号不同步,都会有PWM波形产生,但如果将TBCLKSYNC置零完成PWM配置后再置1,发现EPWM3的所有寄存器全都无法写入数据,EPWM3无PWM输出。。
请问怎么解决?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi Tim,
估计你的PWM初始化有问题。
请参考TRM上关于TB同步的说明。
Time-Base Clock Synchronization
Bit 1 of the device-level multiplexing control module (IOMM) register PINMMR37 is defined as the
TBCLKSYNC bit. The TBCLKSYNC bit allows users to globally synchronize all enabled ePWM modules to
the time-base clock (TBCLK). When set, all enabled ePWM module clocks are started with the first rising
edge of TBCLK aligned. For perfectly synchronized TBCLKs, the prescalers for each ePWM module must
be set identically.
The proper procedure for enabling ePWM clocks is as follows:
1. Enable ePWM module clocks using the IOMM control registers for each ePWM module instance
2. Set TBCLKSYNC= 0. This will stop the time-base clock within any enabled ePWM module.
3. Configure ePWM modules: prescaler values and ePWM modes.
4. Set TBCLKSYNC=1.
Regards,
Jay