PWM duty calculation s32k144

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

PWM duty calculation s32k144

898 Views
AjRj14
Contributor III

Hi, 

I am following below application note for PWM duty calculation

https://www.nxp.com/docs/en/application-note/AN5303.pdf

 

I am using  edge capture  mode and I am enabling interrupts at both rising and falling edges.

To calculate the duty, I want to calculate the ON time of input PWM signal (or) I want to measure the period between rising and falling edge and also when the PWM signal is high.

So could you please tell me how to check whether the input PWM signal is high or low in FTM IRQ handler.?

Or if there are any other ways to determine the duty using edge capture mode, please explain that also..

0 Kudos
1 Reply

871 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi ABHIJITH REJI,

Port Data Input Register (PDIR) can be used to read the logic level of capture pin in FTM IRQ handler.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos