MKM34256 cannot pass oscillator initialization

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MKM34256 cannot pass oscillator initialization

954 次查看
martinzhang
Contributor III

Hi

There is a batch of MKM34256 work well for a long time, but few of them got a problem which the oscillator cannot be initialized correctly sometime. The code is stuck in following line:

 

if (MCG_C2 & MCG_C2_EREFS0_MASK) { WAIT_FOR_FLAG (MCG_C2, EREFS0, OSCINIT0); }

 

Please let me know if you know the reason of this issue.

Thank you very much!

Martin

标签 (1)
0 项奖励
回复
3 回复数

934 次查看
diego_charles
NXP TechSupport
NXP TechSupport

Hello @martinzhang 

I hope you are doing well!

From the description,  it seems that the external crystal/resonator  is not being able to get the sufficient stability or number of clock cycles in certain units. See this section below.

diego_charles_0-1627963754938.png

I am thinking in the following things:

What is the frequency of your external crystal or resonator? This to will also give us opportunity to review the oscillator circuitry according to Table 36-2  of the RM.

 When the MCU gets stop at oscillator initialization ,  did it have  low power mode setting/transition ; transition of MCG mode ; or was coming out of a  Power on cycle?

This app note Crystal Oscillator Troubleshooting Guide  could also be worthy for our trouble shooting task  . Here is an excerpt , that is related to the hypothesis that I mentioned above.

diego_charles_1-1627964939299.png

Please accept my apologies for the delay

Diego.

 

 

 

 

 

 

 

0 项奖励
回复

920 次查看
martinzhang
Contributor III

Hello Diego,

Thank for your reply and this is very helpful.

Following is the crystal circuit.

martinzhang_0-1627969156105.png

 

Now, all the devices work well and I will check it when this issue come again.

 

Best Regards,

Martin

 

0 项奖励
回复

917 次查看
bobpaddock
Senior Contributor III

If the 22 pF capacitors and all the layout parasitics balance out perfectly such a circuit will not start, the 1M resistor is there to fix this.
The odds of this are small, except for Murphy's Law saying otherwise.

If it continues to be a problem replace one of the caps with one of a slightly different value.
Some chips have internal caps that can be enabled.  Don't enable those at the same time as external ones.

The caps should match the loading specified by the crystal manufacture.




0 项奖励
回复