908LJ24 32.768KHz crystal start-up problem

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

908LJ24 32.768KHz crystal start-up problem

1,647 Views
svuong
Contributor I

I am using the 908LJ24 with the 32.768KHz crystal set up in similar configuration as shown in the MONITOR section of the data sheet (Rs=330K, Rb=10M, C1=C2=22pF).

Recently I encountered a problem that the circuit randomly refused to power up. After a series of testing and debugging of both hardware and software, it was discovered that for some reason, at the power up, the crystal circuit intermittently failed to start. The only way to bring the circuit back to live was either disconnecting and re-applying the power to the circuit or injecting an external signal to OSC1 pin of the micro-controller. Reset signal did not help at all in this situation.

The headache of this problem is in its randomness, The circuit could go for days without any problem in the same environment (room temperature, low humidity, regulated power supply) and then exhibited the symptom without any warning.

I am sure there may be a lot of factors involved but I could not get to any thing that can consistently make it happen so that I can verify the root cause and eventually come up with the fix.

If anyone of you have come across this problem before and know of a way to trigger the problem to happen at a fairly predictable manner, I would appreciate all the help.

Just in case you wonder, the product has been manufactured for a customer since 2006. The circuit did not change much over the years but the problem just surfaced recently.

In the course of analysis, I tried different crystal manufacturers, different values for crystal circuit components. None of them actually made any difference.

Thanks.

Labels (1)
0 Kudos
5 Replies

415 Views
mnemonic
Contributor III

Hello svuong!

 

I working at this moment on an MC9S08SH8 device. I also try to use an external crystal source, with some problems.

 

I use an normal 12Mhz crystal. HGO=1, RANGE=1 in ICSC2. I found out that the external clock source needs some time to start up. In my case about 20ms (I seen this in datasheet). I programmed a small delay after setting ICSC1 and ICSC2 and my program run as i want.

 

Befor I done this, I had a problem after Reset and power loss on the SCI module. I programed a small test routine for sendin a char 'A' to my computer. After a Reset or power loss I get often the char 'P' and other trash instead of an 'A' and I was wondering about.

 

I know you are working on an HC08 device but may a small delay after Clocksource initialisation can fix your problem.

 

hope this helps?

 

norticum

0 Kudos

415 Views
svuong
Contributor I

Thanks to peg and mac for replying to my post.

 

peg

I have tried four different crystals, FOX, ECS,Citizen, and Oscilent. They all had the same problem so I don;t think it is just a bad batch of crystals.

 

mac

I have tried 100K for Rs and one time even went as low as 47K (just for the experiment only). The problem did not go away. The reason I chose Rs=330K is that it is the one shown in the monitoring mode configuration in the data sheet.

 

As far as I can tell, the problem didn't seem to root in the crystal circuit (although the effect pointed to it). Just yesterday I played around with it and discovered something very interesting. 

The reason that I could not start the circuit by applying a reset signal because the RST line was already held LOW by the micro-controller. This meant that the micro-controller never got out of POR state when it had the problem. To verify this, instead of a LOW signal, I applied a 5V to the RST line. As soon as I removed the 5V, there was a transition from HI-LO on the RST line and the micro-controller started to work.

All of this tells me that for some reason, the processor entered the STOP mode before it finished the POR state. This well explained the randomness of the problem because the chance the micro-controller jumps into the STOP mode at the power up is pretty low. This also explained why a LOW signal on the RST line did not reset the micro-controller because to get out of the STOP mode, it requires a transition HI-LO on the RST line.

 

At this point, I suspect the power rise in my circuit may be too fast for the internal LVI to properly reset the micro-controller at the power up and allows it to enter undetermined state in which by some rare chance the micro-controller executes a STOP instruction. (I have no codes in my program that put the micro-controller in the STOP mode.)

 

I have a 220uF filter cap in the power circuit. When I measured the power rise of my circuit, I got 0 - 5V in 4ms. Does any one know if this is too fast for the built-in LVI? 

Thanks. 

0 Kudos

415 Views
PeterHouse
Contributor I

What is the trace length of the traces in the crystal circuit.  These should be kept as short as physically possible and should not exceed .5" in length.  There are other considerations which are usually covered in the data sheet.  I recommend asking for some help from someone who has experience designing crystal PCB layouts. 

 

 

The crystal PCB layout can make or break the reliability of the microcontroller.

 

Good Luck,

 

Peter

0 Kudos

415 Views
bigmac
Specialist III

Hello,

 

Was there any particular reason for choosing Rs=330k in the first instance?  Reducing this value to 100k may help the oscillator start-up, especially if you have a batch of crystals with high ESR.  However, do not reduce below about 50k to avoid potential damage to the crystal.

 

When the conditions for oscillation are marginal, you may find that the time for the oscillation to build up may be of the order of seconds.  With some experimentation, you might be able to use this period as an indicator of a borderline situation.

 

Regards,

Mac 

0 Kudos

415 Views
peg
Senior Contributor IV

Hello and welcome to the fora, svoung,

 

The specification section (24) actually states that 100k and 20M are the typical values for this device. I have had a very similar problem in the past where a very high percentage of one batch of crystals had this problem. Dumping this batch and using the next and the problem went away.

 

0 Kudos