Issue With PWM input and Output

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

Issue With PWM input and Output

1,893 次查看
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 项奖励
8 回复数

1,857 次查看
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 项奖励

1,845 次查看
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 项奖励

1,842 次查看
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 项奖励

1,816 次查看
PetrS
NXP TechSupport
NXP TechSupport

I do not see issue within setting.

BR, Petr

0 项奖励

1,791 次查看
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 项奖励

1,770 次查看
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 项奖励

1,810 次查看
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 项奖励

1,875 次查看
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 项奖励