Issue With PWM input and Output

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

Issue With PWM input and Output

1,837 Views
chaitanya_kalyani
Contributor III

Hello,

 

I want PWM output as well as PWM input but facing issue.

 

When I add ftm_pwm module and after configuration pwm is working but after adding ftm_ic module getting issue. PWM Output is not getting updated.

 

Also need a sample program to read the PWM (PWM input capture compare) signal need to use for encoder.

 

Thank you in advance.

 

 

0 Kudos
8 Replies

1,801 Views
chaitanya_kalyani
Contributor III

Hello @PetrS ,

 

Currently I checked for PWM output. PWM example is working fine (ftm_pwm_s32k142) but when I copy the same configuration in my project then it is not working. PWM is not getting updated it is taking default assigned value only.

 

Is it issue with PWM clock? In my project CAN, Timer, Watchdog, ADC and Power manager modules are used. 

 

If it is issue with clock then how to increase the PWM clock. 

chaitanya_kalya_0-1616998452241.png

I am getting 28000 as max frequency for PWM. 

0 Kudos

1,789 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

what is setting in Initialization tab?
What function and parameters do you use for duty cycle update? What is a returned value?

BR, Petr

0 Kudos

1,786 Views
chaitanya_kalyani
Contributor III

Hello @PetrS 

 

Thank you for quick response.

 

Below is my settings

chaitanya_kalya_1-1617021262535.pngchaitanya_kalya_2-1617021277453.pngchaitanya_kalya_3-1617021295324.png

 

0 Kudos

1,760 Views
PetrS
NXP TechSupport
NXP TechSupport

I do not see issue within setting.

BR, Petr

0 Kudos

1,735 Views
chaitanya_kalyani
Contributor III

Hello @PetrS ,

 

After debugging I got to know when I use LPIT module then getting problem for PWM. If I don't use LPIT module then there is no issue with PWM module.

 

Quick response highly appreciated.

 

0 Kudos

1,714 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

maybe PIT interrupt prevents executing of other interrupt or similar.
Try to modify interrupt priorities for modules, using INT_SYS_SetPriority.

BR, Petr

0 Kudos

1,754 Views
chaitanya_kalyani
Contributor III

Hello @PetrS ,

 

Then what can I do it?

 

I am working on urgent project and I require PWM input as well as output.

 

Other functionality are working fine there is no issue with other functionality.

 

 

 

0 Kudos

1,819 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

there is "ftm_signal_measurement" demo example within S32DS SDK. This shows usage of ftm_pwm and ftm_ic modules.

BR, Petr 

0 Kudos