CMP Round Robin in Run mode for S32K148

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CMP Round Robin in Run mode for S32K148

1,500件の閲覧回数
kart
Contributor I

Hi,

Is there any Example reference code for using CMP Round Robin mode in Run mode.

I want to monitor 3 Channel inputs(INP) and compare with the Dac reference voltage(INN).

Is it possible to monitor the CMP_C2[CHnF] and CMP_C2[ACOn] in the ISR of Round Robin to identify the Change of input state for individual channels?

When CMP_C2[RRIE] is enabled, Is there a separate ISR for the CMP Round Robin similar to CMP0_IRQn?

Thanks,

kart

0 件の賞賛
返信
3 返答(返信)

1,484件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi kart,

Please refer: Example S32K144 CMP Round-robin S32DS2.0
Hope it helps.

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 件の賞賛
返信

1,461件の閲覧回数
kart
Contributor I

Hi Robin,

The Example uses the VLPS mode and LPTMR clock source is used for Comparator round robin clock.

Can we use Round robin mode in RUN mode with SIRC clock source for Comparator round robin clock?

 

Round Robin implementation is discussed in "45.1.5 CMP trigger mode" of S32K Reference Manual "https://www.nxp.com/webapp/Download?colCode=S32K1XXRM" 

Last 2 steps in Round robin implementation are explained as follows:

kart_0-1645065772397.png

I do not want to use the Low power mode as discussed in (3) and use a different clock other than LPTMR as shown in (2).

Thanks

0 件の賞賛
返信

1,442件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi kart,

I am sorry to tell you that the CMP round robin/trigger mode is available only if the MCU is STOP1 or VLPS and LPTRM must be used to trigger the CMP comparisons.

I am afraid you need to implement the round robin in software with CMP module and an additional timer. Based on the overflow interrupt provided by timer you have to change the channel used for comparison and to check if the output value of the CMP matches expected value or not.

Best Regards,
Robin

0 件の賞賛
返信