Setup of PWM X blocks the PWM A & B on TWR-KV46F150M

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Setup of PWM X blocks the PWM A & B on TWR-KV46F150M

跳至解决方案
1,038 次查看
nathanaelbirrer
Contributor I

Hello everybody

I'm trying to control all the 9 LEDs of the TWR-KV46F150M with PWM. I initialized LED 0-7 with processor experts. It worked very well, then I tried to setup the 9. LED which is on sub module 3 PWM X. But it is not possible with the processor experts so I wrote the code on my own. Now, I have the Problem that always when I call my function to initialize the PWM X and write to the corresponding VAL1, the PWM A&B of sub module 3 stop working, while all others "light up" correctly. The PWM X works perfectly as well.

 

I observed all registers in debug Modus, but there is no change to A & B significant bytes during my initialization. And when is surpass

PWM_WR_VAL1(pwmBase, subModule, pwmXHighPulse / 2)  in the PWMX initialization; the A & B signal are correct, logically the PWM X isn't correct.

 

I have really no idea why the two LEDs doesn't work after the PWM X initialize. Does anyone know a reason?

 

Full Kinetis PE Project in attachment

 

 

 

Original Attachment has been moved to: processor_expert_pwm_9.1led.zip

标签 (1)
0 项奖励
回复
1 解答
722 次查看
nathanaelbirrer
Contributor I

I have found the problem. With the initialization I changed the period of sub module 3 and the A & B Signal had a duty cycle of 100%. The solution is to set the prescaler to 1.

在原帖中查看解决方案

0 项奖励
回复
1 回复
723 次查看
nathanaelbirrer
Contributor I

I have found the problem. With the initialization I changed the period of sub module 3 and the A & B Signal had a duty cycle of 100%. The solution is to set the prescaler to 1.

0 项奖励
回复