32k768 xtal dont start

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I use a M2561 and my 32k768 don't start after initializing the timer 2. The MCU is power at 3.3V

My xtal is spec say 12.5pF, and I had try with 6pf, 12pf,18pf and the result are the same,

Here is my initializing code:

TIMSK2 &= ~(1<<TOIE2);
ASSR |= (1<<AS2);
TCCR2B = (1<<CS22) + (1<<CS20);
while ( ASSR & 0x07 ) WDR();
TIMSK2 |= (1<<TOIE2);

It never pass the while

Any help will be welcome

Yours truly,
Sylvain Bissonnette
www.microsyl.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is the 32768 connected to the TOSC-pins or the Xtal-pins ?

edit: with your experience I'm pretty sure you use the TOSC pins. Neither external capacitor required, nor recommended. Just the crystal is needed. Load capacitors are taken care of by the AVR.
AS2 has to be set, EXCLK has to be cleared.

Writing to EXCLK should be done before asynchronous operation is selected.

The crystal can be broken. 32768Hz is quite low, so the crystal will be large --> fragile

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

Last Edited: Sat. Feb 2, 2013 - 08:18 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On TOSC pins

Yours truly,
Sylvain Bissonnette
www.microsyl.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you mean you have tried
a) different crystals that have different load capacitance requirements, or
b) same crystal with 12.5pF load capacitance requirement, but with different external capacitors of 6pF, 12pF and 18pF?

First of all remove the capacitors, and make sure your crystal satisfies all electrical requirements for operation (smaller capacitance seems to be better, and see max ESR requirement, lower better iirc).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

While I was editing, you both posted. Pls see my revised posting

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you get it to work, Sylvain ?

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No I had order another xtal DK make a error, and they send me 100uF capacitor at the place ... Still working on

Yours truly,
Sylvain Bissonnette
www.microsyl.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm. Don't think a 100uF capacitor is going to oscillate for you. Mouser correctly sent me 50 pins I ordered by mistake. Might I interest you in a few of them?

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Finaly it's work, with a xtal 6pf with 2 external 6pf capacitor.

Yours truly,
Sylvain Bissonnette
www.microsyl.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's odd: in your OP you mentioned that you tested with 6pF as well. Was it a bad crystal? Or bad capacitors ?

It's always a big relief if things work again the way they are supposed to :)

Cheers

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tricia, and Ulyana. You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

with new xtal without the cap it wasn't work it oscilate at 250khz (aprox) with the 6pf everything was working fine

Yours truly,
Sylvain Bissonnette
www.microsyl.com