S32k312 ICU module as a comparator

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

S32k312 ICU module as a comparator

254 Views
emerging
Contributor II

Hello Team,

I am using controller S32K312 and my application is to compare an input voltage with a reference voltage using ICU module. There is only emios edge detection examples is available inside the SIP.

Could you please provide an example program and demo configuration for ICU as comparator.

Thank you

0 Kudos
4 Replies

229 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Sorry, I may not understand your question. Please correct me if I understand it wrong.
According to your description, it seems that it is more suitable to use LPCMP instead of eMIOS ICU module.

Please refer to the S32K344_LPCMP_Wkup_S32DS_3_4_RTD_LLD_2_0 or S32K344_LPCMP_Wkup_S32DS_3_4_RTD_MCAL_2_0 examples in S32K3 Low Power Management AN and demos.


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

216 Views
emerging
Contributor II

Hello @Robin_Shen 

Thanks for your inputs. I have a few queries on the sample "S32K344_LPCMP_Wkup_S32DS_3_4_RTD_MCAL_2_0" that I am now looking at.
My usecase is just to compare an analog voltage with a reference voltage and get the comparator output.
For my application can i remove the first three channels IcuChannel_EVB, IcuChannel_WB, IcuChannel_LPCMP_Wkup from configurator and keep only IcuChannel_LPCMP1 in configurator, Will that work because i need only a comparator.
When i come to coding part i am not able to see any section in main.c that checking the status of comparator. Don't we need any functionality to check the comparator status like Cmp_Ip_GetStatus(). In code i was not able to find the part where it checking comparator status
Could you kindly provide your opinion on the queries I mentioned above? Let me know if you require any additional clarification.

0 Kudos

178 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Sorry, I didn't notice in my previous reply that the project was missing the coding part.
Please refer to LpCmp_Icu_Ip_BlinkLed_S32K388 in S32K3 RTD 4.0.0 to configure your new project.

LpCmp_Icu_Ip_BlinkLed_S32K388_RTD400.png

0 Kudos

146 Views
emerging
Contributor II

Helo @Robin_Shen ,

Thanks for your support,

Could you please share me the full project then it will be helpful to check the configuration part too. LpCmp_Icu_Ip_BlinkLed_S32K388 is missing in the previous project set you shared in your first reply

Thank you

0 Kudos