I have the code as attachment. It work fine (ADC & SCI using internal RC-Oscillator in S12ZVCA).
I want to add function of CAN-bus 250kbps. So, I add 12MHz external crystal in my board in order to have a good reliability for CAN.
How to setup the register of CPMU?
// fref = 1MHz, fVCO = 50MHz, fPLL = 12.5MHz
CPMUREFDIV = 0x0B; // fref = fosc/(refdiv+1) = 12 / (11 + 1) = 1MHz 00_00_1011
CPMUSYNR = 0x58; // fVCO = 2 * fref * (SYNDIV + 1) = 2 * (24+1) = 50MHz 01_011000
CPMUPOSTDIV = 0x03; //fPLL = fVCO / (POSTDIV + 1) = 50 / 4 = 12.5MHz 000_00011
fref = 1MHz, fVCO = 50MHz, fPLL = 12.5MHz can work on CAN-bus 250Kbps or not?
Can you give me some advice?