Hi All,
I am trying to change the CMU_CSR register by the following values,but the register is not changed .
/* RC clock division factor */
CGM.CMU_CSR.B.RCDIV = 2;
/* Enable clock monitor bit */
CGM.CMU_CSR.B.CME_A = BIT_SET;
/* Start frequency measure */
CGM.CMU_CSR.B.SFM = BIT_SET;
/*RC Oscillator(s) selection bit */
CGM.CMU_CSR.B.CLKSEL1 = 0;
CGM.CMU_MDR.B.MD = 256;
Hello,
could you solve this?
I have a similar issue, but with an MPC5645S.
Thank you!
János Murai
Hi Peter,
I have checked the write protection also. It is disabled after reset hence it is not the issue. I am also not able to change the values of High Frequency Reference Register FMPLL0(CMU_HFREFR_A) and Low Frequency Reference Register FMPLL0(CMU_LFREFR_A).
Thanks in advance
Mohanraj
Hi,
I am able to modify it with any issues.
Are you sure you are running system with enabled XOSC and PLL which you want to monitor.
Because without it you cannot write to CMU as there is no valid reference frequency for CMU comparison.
Run one of our examples with PLL as system clock and then change CMU values in debugger to see if it change.
For example I have used:https://community.nxp.com/docs/DOC-331807
Peter
Hi All,
I am trying to change the CMU_CSR register by the following values,but the register is not changed .
/* RC clock division factor */
CGM.CMU_CSR.B.RCDIV = 2;
/* Enable clock monitor bit */
CGM.CMU_CSR.B.CME_A = BIT_SET;
/* Start frequency measure */
CGM.CMU_CSR.B.SFM = BIT_SET;
/*RC Oscillator(s) selection bit */
CGM.CMU_CSR.B.CLKSEL1 = 0;
CGM.CMU_MDR.B.MD = 256;
Kindly help me to change the register.
I need to monitor the crystal clock and PLL clock.
Also support me to use Clock monitor unit in the controller.
Hello,
This is strange, as the register is writable:
What comes to my mind is:
1. The writes are protected via register protection mechanism. Are you setting register protection?
2. The header file addresses of CMU are incorrect
Can you see in debugger that your code in assembly is writing to location of CMU_CSR correctly and it is still not updated??
Peter
Hi Peter,
I have checked header files it is seems to be correct.
May be because of write protection i am not able to write the rsgister.
Please help me to unlock the write protection of CMU_CSR register