控制一个三相电机,硬件上采用的EPWM3、5、6发SVPWM波形,调试中发现如果三组信号不同步,都会有PWM波形产生,但如果将TBCLKSYNC置零完成PWM配置后再置1,发现EPWM3的所有寄存器全都无法写入数据,EPWM3无PWM输出。。
请问怎么解决?
Jay:
Hi Tim,
估计你的PWM初始化有问题。
请参考TRM上关于TB同步的说明。
Time-Base Clock SynchronizationBit 1 of the device-level multiplexing control module (IOMM) register PINMMR37 is defined as theTBCLKSYNC bit. The TBCLKSYNC bit allows users to globally synchronize all enabled ePWM modules tothe time-base clock (TBCLK). When set, all enabled ePWM module clocks are started with the first risingedge of TBCLK aligned. For perfectly synchronized TBCLKs, the prescalers for each ePWM module mustbe 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 instance2. 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