Bug Report: PWM bug in KExx driver V1.2.1

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

Bug Report: PWM bug in KExx driver V1.2.1

1,161 次查看
LaMoris
NXP Employee
NXP Employee

Found a PWM bug in KExx driver V1.2.1: If we set PTB2 as FTM0, PWM output to PTB2 but also PTA1. It seems be workable as below modification.

 

 

1. Swap the code in “SIM_RemapFTM0CH0ToPTB3” and “SIM_RemapFTM0CH0ToPTA1” to have the correct register setting.

Ex:

SIM->PINSEL &= ~SIM_PINSEL_FTM0PS0_MASK;

to

SIM->PINSEL |= SIM_PINSEL_FTM0PS0_MASK;

In __STATIC_INLINE void SIM_RemapFTM0CH0ToPTB3(void) of sim.h.(Actually PTB2 is the correct name rather than PTB3)

20221_20221.jpg圖片 1.jpg

 

2. Change channels = 1 in FTM_PWMInit() of ftm.c as below picture:

20222_20222.jpg圖片 2.jpg

标签 (1)
标记 (3)
0 项奖励
回复
1 回复

897 次查看
david_diaz
NXP Employee
NXP Employee

Hello,

Indeed, there is a bug presented on the PWM KEx driver V1.2.1.

I really appreciate your contribution.

This bug has been submitted to the Developers Team in order to fix the issue.

Once again, thank you for your contribution.

Best Regards,

David Diaz.

0 项奖励
回复