Hello,
During some recent testing of the CMU I discovered that the high/low limits that I had set for the system clock were not working as expected. Some further experiments have concluded that the problem was that the IRC (measured on several devices using several methods - CLKOUT pin, CMU frequency measurement and reverse calculating IRC from CMU using the tightest high/low limits that didn't cause a reset) was somewhere between 13-14Mhz instead of the expected 16MHz.
I'm aware that the internal oscillators are not necessarily known for their accuracy, but various datasheets refer to the worst case accuracy range for this device to be +/-6%, whereas I'm seeing between 12-18% on a number of relatively new devices at room temperature.
Is there an explanation for this behaviour?
Best Regards,
Martin
Solved! Go to Solution.
I think I know the reason. Even though it is not described in MPC5643L, I have found description in RM of other device where I am almost sure it works the same way:
Try to comment mentioned RAppID trimming
CGM.RC_CTL.R = 0x00000000;
/* IRC Oscillator Trimming: 0 */
I believe it helps. If you confirm it to me I will report it to competent person.
I've just done a quick test, commenting that line out as suggested, and it does seem to have fixed the problem.
I'll keep investigating to make sure and will reply if there are any other issues, but it's looking good for now.
Many Thanks.
Hi, RC_CTL is set by RAppID setup code to 0 and left untouched after that.
CGM.RC_CTL.R = 0x00000000;
/* IRC Oscillator Trimming: 0 */
I think I know the reason. Even though it is not described in MPC5643L, I have found description in RM of other device where I am almost sure it works the same way:
Try to comment mentioned RAppID trimming
CGM.RC_CTL.R = 0x00000000;
/* IRC Oscillator Trimming: 0 */
I believe it helps. If you confirm it to me I will report it to competent person.
Hi, does you code touch RC_CTL register? What is your RC_CTL content?