Hello,
I choosed the MCGIRCLK as source for the TPM Module to generating a PWM. It seem this is working. But if I change from 48Mhz running mode to VLPR the frequency is around 15% slower.
Is it possbile to avoid this issue? Is it also possible to calibrate the internal RC?
Thank you and best regards
Maximilian
Solved! Go to Solution.
Hi, Maximilian
I have checked the data sheet of KL26, the requency deviation of internal reference clock
(fast clock) over temperature and voltage —factory trimmed at nominal VDD and 25 °C is +/-3% at most.
Regarding your issue, i suppose you do not trim it before you use it. The trim value from factory is saved in the address 0x0000_03FE(bit 4:1) for the 4MHz fast internal clock source, you have to read it from the address and write it to the FCTRIM bits in MCG_C4.
For detailed inf, pls refer to the section in RM of KL26:
4.3.1 Alternate non-volatile IRC user trim description
24.3.4 MCG Control 4 Register (MCG_C4)
Hope it can help you
BR
Xiangjun Rong
Hi,
Can you tell me the part number you are using? for the TPM driving clock source, do you use internal 48MHz clock or 4MHz internal reference clock which slower 15% in VLPR mode?
BR
XiangJun Rong
Hello, I use the 4MHz IRC for TPM driving source. The part nummer is KL26Z256.
Hi, Maximilian
I have checked the data sheet of KL26, the requency deviation of internal reference clock
(fast clock) over temperature and voltage —factory trimmed at nominal VDD and 25 °C is +/-3% at most.
Regarding your issue, i suppose you do not trim it before you use it. The trim value from factory is saved in the address 0x0000_03FE(bit 4:1) for the 4MHz fast internal clock source, you have to read it from the address and write it to the FCTRIM bits in MCG_C4.
For detailed inf, pls refer to the section in RM of KL26:
4.3.1 Alternate non-volatile IRC user trim description
24.3.4 MCG Control 4 Register (MCG_C4)
Hope it can help you
BR
Xiangjun Rong