Example usage CMU_FM_1 (without using MCAL)

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

Example usage CMU_FM_1 (without using MCAL)

Jump to solution
1,309 Views
abemat
Contributor III

I would like to enable CMU_FM_1 to monitor the FIRC_CLK frequency, but have a hard time.

Could someone point me to a tutorial or a step by step method to enable the meter? Ideally using RTD 3.0.0 function calls, but direct register accesses may be done as well.

0 Kudos
Reply
1 Solution
1,284 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @abemat,

The full version of SAF has API for CMU_FM.

https://www.nxp.com/design/design-center/software/functional-safety-software/s32-safety-software-fra...

 

sCheck/srs/sCheck_CmuFmTest.c

danielmartynek_0-1736425611448.png

 

It is not present in the evaluation version.

 

We have also some non-RTD baremetal code that I can share with you privately.

 

Regards,

Daniel

View solution in original post

2 Replies
1,019 Views
narimanelashkar
Contributor I
I tried to enable CMU_FM_1 to monitor the FIRC_CLK frequency and enable the interrupt FMCIE from IER register to be fired after the measurement is completed by these steps:

IP_CMU_1->RCCR = CMU_FM_RCCR_REF_CNT(50);
IP_CMU_1->IER |= CMU_FM_IER_FMCIE_MASK;
IP_CMU_1->GCR |= CMU_FM_GCR_FME_MASK;

But I faced the following behavior that the interrupt was not fired after the completed window and went to power on reset.

Did you face this behavior or something similar like this?
1,285 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @abemat,

The full version of SAF has API for CMU_FM.

https://www.nxp.com/design/design-center/software/functional-safety-software/s32-safety-software-fra...

 

sCheck/srs/sCheck_CmuFmTest.c

danielmartynek_0-1736425611448.png

 

It is not present in the evaluation version.

 

We have also some non-RTD baremetal code that I can share with you privately.

 

Regards,

Daniel