S32K314:How to use ICU to detect PWM cycle and duty cycle?

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

S32K314:How to use ICU to detect PWM cycle and duty cycle?

195 Views
H_NXP
Contributor I

After configuring ICU and MCL, every time I check the IP_EMIOS_1->CH.UC[3].B value in lcuSignalEdgeDetection, it remains 0. Moreover, there is a significant difference in the subtraction of A2-A1 before and after each time. For example, after collecting IP_EMIOS_1->CH.UC[3].A three times, A1, A2, and A3 were obtained, with A3-A2=1000 and A2-A1=50,In theory, there should not be much difference between A3-A2 and A2-A1. May I ask if there are any errors in my configuration or calculation?

H_NXP_0-1753932489362.png

H_NXP_9-1753932968352.png

 

H_NXP_3-1753932628069.png

H_NXP_4-1753932761204.pngH_NXP_5-1753932779124.pngH_NXP_6-1753932791657.pngH_NXP_7-1753932836698.png

H_NXP_8-1753932872937.png

 

 

 

Tags (1)
0 Kudos
Reply
2 Replies

181 Views
_Leo_
NXP TechSupport
NXP TechSupport

Thank you for your interest in our products and for contributing to our community.

You could refer to IPWM example project of the following post:

https://community.nxp.com/t5/S32M-Knowledge-Base/S32M27x-S32K3-eMIOS-Usage/ta-p/2129760

I hope this information is helpful.

0 Kudos
Reply

158 Views
H_NXP
Contributor I

I referred to routine 【S32K311_RTD600_eMIOS_IPWM_Ip_example】, but I noticed that there is a significant difference in the data collected each time.The actual square wave frequency is 50Hz, with a duty cycle of 50%

H_NXP_0-1753954578820.png

H_NXP_1-1753954620516.png

 

0 Kudos
Reply