Hi NXP team,
I'm currently working on a project that involves capturing the PWM duty cycle on PTB3 using EMIOS0_CH9 on an S32K344 MCU. I've configured my project using S32 Configuration Tools (S32CT) and have attached my configuration and a piece of my code below for reference.
The issue I'm facing is that I can only read the duty cycle value in an interrupt request (IRQ). However, when I try to read it in a polling method (inside while(1) loop), I keep getting a duty cycle reading of 0.
Is it a requirement that the ICU for duty cycle must be called in an IRQ, or is there a way to successfully read the duty cycle value using polling?
Hardware - Custom S32k344 board
SDK - S32K3 Real-Time Drivers AUTOSAR R21-11 Version 3.0.0
PWM input frequency - 800 Hz
Thanks for any helps in advance.
Regards,
Connor
Hi
Please check the returned value of Emios_Icu_Ip_GetInputState before call Emios_Icu_Ip_GetDutyCycleValues.
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.
-------------------------------------------------------------------------------