fj604 34 Posted May 22, 2011 Share Posted May 22, 2011 I have soldered the 32kHz crystal to my Launchpad and it seems to work fine, however I have noticed that whenever I put my finger within 1-2 cm of the crystal - not even touching anything - it causes oscillator fault. The fault condition clears when I remove the finger. As interesting it might be, is it how it is supposed to behave? Is there any way to prevent this? Quote Link to post Share on other sites
zeke 693 Posted May 22, 2011 Share Posted May 22, 2011 The first thing I would ask is, did you solder the body of the crystal down to the ground pad? Quote Link to post Share on other sites
fj604 34 Posted May 22, 2011 Author Share Posted May 22, 2011 The first thing I would ask is, did you solder the body of the crystal down to the ground pad? Of course I did Quote Link to post Share on other sites
gatesphere 45 Posted May 22, 2011 Share Posted May 22, 2011 Could be your body's natural capacitance. I believe I've read about someone else's doing that... and mine freaks out when I touch the pin header (not even the right pin). Quote Link to post Share on other sites
nobody 47 Posted May 22, 2011 Share Posted May 22, 2011 If you plan to permanently use the crystal, it is a good idea to remove the 0 Ohm resistors between oscillator and pin header. The basic idea is to minimize the size of the routes in the oscillator circuit. And of course set the appropriate size of capacitors (SLAU144H page 285). zeke 1 Quote Link to post Share on other sites
NatureTM 100 Posted May 23, 2011 Share Posted May 23, 2011 Someone in IRC had this problem, but I forgot the username. I think he was able to resolve the issue. It could be worthwhile to mention it in there and idle in the room for several hours for a response. There are several people that use the IRC but not the forums. When we were discussing it in there, a couple of us pretty much rubbed our fingers all over the pins of the chip and weren't able to reproduce the issue, so it's something that isn't supposed to happen. I wish I remembered how it was resolved (if it was.) Quote Link to post Share on other sites
zeke 693 Posted May 23, 2011 Share Posted May 23, 2011 Strange to say this but how sweaty are your hands? Do a quick test. First, see if your unwashed hands can mess up the crystal. Then, wash your hands with hot water and good soap and then try to mess up the crystal again. What happened? Any difference? From a code point of view, this is what I use when I run the 32kHz crystal: void main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer BCSCTL1 = CALBC1_1MHZ; DCOCTL = CALDCO_1MHZ; BCSCTL3 |= XCAP_3; // Launchpad watch crystals need ~12.5 pF ... } fj604 1 Quote Link to post Share on other sites
fj604 34 Posted May 23, 2011 Author Share Posted May 23, 2011 Zeke, I think you're right, the spec on that crystal do say 12.5 pF: http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_%28MSP-EXP430G2%29?DCMP=launchpad&HQS=Other+OT+launchpadwiki 32kHz crystal (MS3V-T1R 32.768kHz CL: 12.5pF +/-20ppm, http://Www.microcrystal.com) SLAU144 says: (page 274) Basic Clock Module+ Operation After a PUC, MCLK and SMCLK are sourced from DCOCLK at ~1.1 MHz (see the device-specific data sheet for parameters) and ACLK is sourced from LFXT1CLK in LF mode with an internal load capacitance of 6 pF. Page 283 confirms this - XCAPx bits are set to 01 on power up, which is 6 pF, and I do not change them in my code. I will try setting it to 12.5 pF and let you know if it fixes the problem. Thanks for suggesting this. Quote Link to post Share on other sites
fj604 34 Posted May 23, 2011 Author Share Posted May 23, 2011 OK, with this line: BCSCTL3 |= XCAP_3; // Launchpad watch crystals need ~12.5 pF it does become much less sensitive -- it only produces a fault when my (well washed) finger is within about 3-5 mm of the crystal. Quote Link to post Share on other sites
zeke 693 Posted May 23, 2011 Share Posted May 23, 2011 If my memory serves me, 6pf is the standard amount required for XT2 crystals (which are >4MHz). Quote Link to post Share on other sites
gordon 229 Posted May 23, 2011 Share Posted May 23, 2011 Another possible cause might be flux residue (been there, lost some hair to it). Be very sure to clean it up thoroughly. Also, Justin has a nice writeup and some test code (adapted to msp-gcc) here (also locally: viewtopic.php?f=9&t=35). For one reason or another, I did not have much luck with his version, so I modified it a bit (see attachment), this worked out better for me. Justin, mind taking a look? lfxtcheck.c Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.