Problem using 8MHz Crystal on MC9S08GT8A

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem using 8MHz Crystal on MC9S08GT8A

2,969 Views
INOVELECING
Contributor I
Dear all,

I'm using a MC9S08GT8A with a 8MHz crystal and Rf = 1MOhm, Rs = 0Ohm, Cl = 18pF(according to crystal datasheet). I'm using the BDM of the Indart-One debugger.
I initialized the ICGC1 = 0x30, ICGC2 = 0x00 to get FBE mode, so fcpu = 8MHz >> fbus = 4MHz, but the crystal doesn't start: The "while(!ICGS1_ERCS) {}" keeps blocking, I see a stable 3.3V (Vdd) at both side of the crystal.

Does someone know what could be the problem ?

Thank you for any help !

Julien P.
Labels (1)
0 Kudos
9 Replies

683 Views
mn_vette
Contributor I
Julien,
 
I don't really have any info on how to help, sorry.  But I was wondering what kind of board you were using with the GT8A.  I can't seem to find a board that will fit the SDIP pin spacing.  Any info you can give me would be helpful.
 
Thanks,
 
Brian
0 Kudos

683 Views
INOVELECING
Contributor I
Dear Brian,

Thanks for your interest.

The uC is on my custom design on which I'm developping my application software.
Concerning the ICGC1, is think I wrote wrong on first message, the value I'm using is 0x70 instead. (Low Gain, High Range, External crystal)

About the crystal I've got on my circuit board is a 20pF load capacitance, ESR <= 80Ohm, +/-20ppm. Then I tried 33pF, 22pF and 18pF for "C1 = C2" [Normally C1 // C2 <~ C_CrystalLoad], Rf = 1MOhm, Rs = 0Ohm, according to Pierce oscillator model. Any one combinaison makes the oscillator not starting; I could see just spikes going down to 2/3 of DC voltage at a frequency of ~14,5Hz; Does it mean it is trying to start the oscillator ... ?

I tried the ICG as FBE mode on a MC9S08GB60 (there is a 4MHz on), and it works perfectly with a nice sinus...

I don't know if the oscillator (the inverted gate in the first stage of ICG) can be broken down easily with
* a wrong configuration of ICG ?
For e.g : with high gain, or a to big amplification using the Rfeedback to high ...etc.
* wrong Resistors / Capacitors values ?

julien P.
0 Kudos

683 Views
ballen
Contributor I
Julien,
I know this isn't specifically the same problem, but it may be related. I had the same problem with a 32kHz crystal and a 'S08GT60. I even replaced the crystal, but still no go. It turned out to be a bad batch of crystals (the manufacturer has since stopped making that particular package...). So you might try a different brand of crystal if another will fit the footprint.
Bill
0 Kudos

683 Views
INOVELECING
Contributor I
Dear Bill,

Thanks for your reply,

I tested :
* a 4MHz (with same spec. than the one on MC9S8GB60 demo board) from KONY,
* a 32kHz "general purpose",
* and 2 different 8MHz with equivalent spec (CL, ESR, ppm).
[Sorry I didn't add this to last reply.]

That was the reason why I thougth the uC could be broken down, especially the inverter at input of ICG, because it carry on working normally, except for one thing :
I got a problem message from BDM after the line code which initalizes the ICGC1 register. It says that the "clock has been lost or too slow, or power left or BDM cable disconnected" ... but If I push F10, it still execute the code line by line; a "RUN" alert the same message, and stop execution after a few lines of code (2 to 3 'nop' in average).

So, is it possible to destroy the ICG input for external crystal ?
I'll get a new board on toomorrow, with same batch of uC, then I'll know if this is the case or not...

Thank you,

Julien P.




0 Kudos

683 Views
bigmac
Specialist III
Hello Julien,


INOVELEC ING wrote:
 
I initialized the ICGC1 = 0x30, ICGC2 = 0x00 to get FBE mode, so fcpu = 8MHz >> fbus = 4MHz, but the crystal doesn't start: The "while(!ICGS1_ERCS) {}" keeps blocking, I see a stable 3.3V (Vdd) at both side of the crystal.

If the crystal is faulty, I might expect a measured voltage, at the EXTAL and XTAL pins, approximately one half Vdd (bias into the linear region by resistor Rf).  This is clearly not the case.  The result seems to suggest that the external oscillator circuit is not correctly enabled.
 
It might help if you were to post the initialisation code you are using for the ICG module.
 
Regards,
Mac
 
0 Kudos

683 Views
bigmac
Specialist III
I ran out of edit time for my previous post ...
 
With ICGC1 = 0x30, this would seem inappropriate for 8 MHz since it selects low frequency oscillator mode.  You might also need to select high gain, rather than low power mode.  ICGC1 = 0xF0 might be more appropriate.
 
Regards,
Mac
 
0 Kudos

683 Views
INOVELECING
Contributor I
Dear Bigmac,

Thank you for your interest,

As your request; please find below the initialization code :

{
        /******************************************
        PORT A initialization
        ---------------------
        *******************************************/
        PTAD  = 0x00; // Data Reg. at '0'.
        PTAPE = 0x00; // Pull-up disabled
        PTADD = 0xFF; // IN-OUT direction
       
        /******************************************
        PORT B initialization
        ---------------------
        *******************************************/
        PTBD  = 0x00; // Data Reg. at '0'.
        PTBPE = 0x00; // Pull-up disabled
        PTBDD = 0xFF; // IN-OUT direction
       
        /******************************************
        PORT C initialization
        ---------------------
        *******************************************/
        PTCD  = 0x00; // Data Reg. at '0'.
        PTCPE = 0x00; // Pull-up disabled
        PTCDD = 0xFF; // IN-OUT direction
       
        /******************************************
        PORT D initialization
        ---------------------
        *******************************************/
        PTDD  = 0x00; // Data Reg. at '0'.
        PTDPE = 0x00; // Pull-up disabled
        PTDDD = 0xFC; // IN-OUT direction
       
        /******************************************
        PORT E initialization
        ---------------------
        *******************************************/
        PTED  = 0x00; // Data Reg. at '0'.
        PTEPE = 0x00; // Pull-up disabled
        PTEDD = 0xFF; // IN-OUT direction 

        /******************************************
        CLOCK initialization
        ---------------------
        *******************************************/
        ICGC2 = 0x00;
        ICGC1 = 0x70;
     // ICGC1 = 0xF0;
        while( ICGS1_ERCS == 0 );
}

I tried both Low and High gain, but I get same results.
What's strange : I get 3.3V in both configuration on both XTAL and EXTAL. Normaly I should get a lower voltage with HGO = 0. I checked for short circuit, but it's quite clean on the circuit and this is not the case.

Thank you,

Julien P.


0 Kudos

683 Views
bigmac
Specialist III
Hello Julien,
 
Many of the control bits associated with selection of external crystal operation are write-once after reset.  If these were being written with incorrect values prior to your specific initialisation, there would be a problem.  Do you happen to be using any element of Processor Expert?
 
How do you observe whether the crystal circuit is actually oscillating?  If using an oscilloscope, the probe would need to be low capacitance type (<=10pf) to prevent too much disruption, which may prevent the oscillator from starting.
 
Until you have resolved the problem, I think you should retain high gain mode for the oscillator.
 
Regards,
Mac
 
0 Kudos

683 Views
INOVELECING
Contributor I
Dear Mac, Brian, Bill,

I received a second board directly from manufacturer, and I just place the missing 1MOhm, all other values didn't change since last mail... and it works perfectly now. Also that means the ICG was broken-down on my previous board.

Maybe ICG is too sensitive. I first start without the 1M Ohm, in "high" gain configuration, and maybe the ICG could be broken-down at this moment ...

Thank you for you support !

Best Regards,

Julien P.
0 Kudos