Bug Report: PWM bug in KExx driver V1.2.1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bug Report: PWM bug in KExx driver V1.2.1

574 Views
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

Labels (1)
Tags (3)
0 Kudos
1 Reply

310 Views
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 Kudos