In our project, MC9S128G is used as a single chip microcomputer. The clock USES 3.3V active crystal vibration, and the crystal oscillator output end adopts two resistance partial pressures, reducing the output clock amplitude to below 1.8V, about 1V.But the debugging finds that it is stuck at the while(CPMUFLG_LOCK==0);That is, PLL never locks.Can you provide a bit of this single chip to use active crystal to use.Thank you very much!
Before you use PLL be sure the oscillator is working correctly.
1. Use normal passive crystal. (oscillator) Active, are not supported by S12G device.
2. To check correct behavior, use PBE mode and you should measure frequency of BUSCLK=OSCCLK/2 at ECLK pin. Of course you have to set ECLKCTL_NECLK=0. This says you, without measurement, whether your oscillator works.
The data sheet states:
C: Those parameters are achieved by the design characterization by measuring a statistically relevant sample size across process variations.
D: Those parameters are derived mainly from simulations
The PLL setup for different modes: https://community.nxp.com/docs/DOC-93792
Best regards,
Ladislav