This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

High frequency oscillator problems

Other Parts Discussed in Thread: MSP430F148

I'm investigating a board using a MSP430F148 with a 7.4MHz xtal on XT1.  This has proved to be unreliable.  VCC is 3.45 so the frequency is only just inside the limit I know.  The xtal is <25 and I've done the add some R test to check the safety factor, which is barely 2.  I then measured the amp in the MSP430 (on 2 boards).  For 500kHz, 0.1Vpp via 100n in, open circuit output, Vout is 1.0/1.5V, at 1MHz this drops to 0.5/0.6V so gain is starting to fall off and at 7MHz I'll be lucky if it >1.  And it gets worse.  I loaded the 500kHz with 10K + 47n (in series) and the output dropped to 0.5/0.25 giving an output impedance of ~11k/56k.  With those figures the mystery is not why it is unreliable but how it ever oscillates in the first place.

I've run the unit with a debugger and kickstart so I know XTS is set.  With XTS =0 there is no output at all.  TI support say they have no data for this amp so I've no idea if this is just 2 bad units or what.  Anyone else measured the oscillator?  The knowledge base says xtal <40R is required (mine is <25R).  Given that a typical off the shelf xtal is 120R spec then I suspect the oscillator is weak but this weak?

 

  • There are no known issues with the F148 XT1 high frequency circuit. This is the first time we are hearing this. I have a few recommendation, so this may move in the right direction:

    1. To rule out hardware issues, please get a TI board:
    http://focus.ti.com/docs/toolsw/folders/print/msp-ts430pm64.html

    2. Run the code example (fet140_hfxtal.c) "as-is" from the following zip file and see if the issue still appears on the TI board with your crystal:
    http://www.ti.com/lit/zip/slac015

    3. In the past we have used the following crystal with no problems:
    http://rocky.digikey.com/WebLib/ECS/Web%20Data/HC-49US-DN.pd

    4. There are also some board layout guidelines in section 3 of the following app note:
    http://focus.ti.com/mcu/docs/mcusupporttechdocsc.tsp?sectionId=96&tabId=1502&abstractName=slaa322b

    5. Can you please tell me about the crystal you are using (a link to it)?

  • Malc:

    I suggest that you try the same crystal as XT2 instead of XT1 and see if you get the same results.

    I used various brand-x 7.3728 MHz crystals as XT2 in the past and never had any problems. I did not even bother with load capacitors.

    (I never tried XT1 in HF mode.)

  • old_yellow_cow:

    I did consider trying XT2 and I might measure that.  But, we are where we are (this is a production PCB) and it might be simpler to mod the PCB to take an oscillator to replace the crystal.

     

    Harman:

    The TI KB note on xtal <40 ohm was noted and this is a custom crystal.  The spec is 30pF loading, AT cut, <25ohm.  So standard stuff except for the esr (off the shelf xtal is <120ohm).

    The xtal link didn't work for me but I guess it is a digikey part and I came up with this datasheet http://www.ecsxtal.com/store/pdf/hc-49us-dn.pdf .  The impedance of that xtal is 80ohm so that doesn't meet the TI kb note.  The capacitance is bit lower which would make L higher and therefore Q higher for the same R but only by 1.5 (30p/20p) so not huge difference.  Has the safety factor (page 9 in slaa322b) been measured with crystal?  And if so what was it?

    I'm running the board in kickstart and have loaded just the 148 basic template which just turns off the watchdog.  Then I take manual control and set XTS.  Then I can measure the oscillator with a scope (ok, 1M, 18pF will have some effect but not enough to invalidate the measurements).  I'll give the c code a try, or is there an assembler equivalent?  But unless I've missed something in the datasheet XTS is all that I need to set to get the oscillator going.  The other bit, oscoff, comes up in the right mode.  The port selects all reset to be ports (and the real code sets that too) so MCLK etc. are not routed out (so I'd have to edit the c file anyway).

    BTW measurement of the real unit running supports the gain ~1 for the amp.  Xin was about the same as Xout and not that high.

  • The equivalent assembly code for IAR is "fet140_hfxtal.s43" in the following zip file:
    http://www.ti.com/lit/zip/slac014

    These code examples can be found at:
    www.ti.com/msp430codeexamples

     

  • Thanks for that.

    I've bought a new MSP430F148 and fitted that, just to check if the MSP430 on these 2 boards of mine had been damaged.  This new MSP430 gives more or less the same results as the other 2 did.  Oscillator gain is ~10 at 500kHz, 5 at 1MHz and falling.  Output impedance on the new one was ~2k, the others were 10k and 56k.

    It would be useful if TI support could confirm what the gain should be but no one will tell me figures which is rather annoying.  I should not have to make measurement to characterise the oscillator.   I'll leave it for other engineers to draw their own conclusion as to why TI don't produce figures to show my results are wrong.

     

  • Sounds to me that you have eliminated the MSP430 as being the problem, so the next step would be, logically, replace your custom xtal with, say a ECS-73-20-4DN CRYSTAL 7.3728 MHZ 20PF for $0.80 and see what happens.

    If it was me, (one of the other engineers on this e2e community) I'd test out my theories on a "gold board" such as a MSP430 Target Board (MSP-TS430PM64) before I alienated myself with rhetoric. We all get frustrated some times, but our only worthwhile support is each other.

    If I didn't have a MSP-TS430PM64 I'd go to my local supplier and borrow their's. For $75, I could not afford to be without one, even at twice the price, if I were developing or even trying to maintain a "production" unit, even if I wasn't developing a new product.

    As for the amplifier gain, the last time I studied oscillator circuits, I thought that in order for an oscillator circuit to operate, two (2) conditions must be met:

    (A) The loop power gain must be equal to unity.

    (B) The loop phase shift must be equal to 0, 2Pi, 4Pi, etc. radians.

     

  • Eh?  I have tested 3 MSP430s by injecting 0.1Vpp sinewave into Xin and measuring Xout.  All show gain ~10 up to 500kHz, dropping above that to ~5 at 1MHz.  One of these was a newly purchased MSP430 just to exclude the possibility that the other 2 MSP430s had been damaged but still worked.  I think that proves that the MSP430s are the problem!  The gain at high frequency is just not high enough to make a reliable oscillator.

    Since I have tried 3 xtals one of which has been measured by the manufacturer to be 25ohm, the others should be <25ohm, and tried 3 MSP430s, one brand new, I don't see the point in repeating the exercise until TI can tell me I'm wrong and the amp gain should be.....  Something that TI have not done despite 2-3 weeks of asking.  I think I know the problem now I need to work on the fix.  Repeating the tests seems a waste of time to me.

    You are correct that you need A + B.  B in part depends on the signal level as the amp has a fixed slew rate so larger signals have more delay so more phase shift.  A depends on where on the xtal curve you are and of course if the amp starts to clip that limits the gain.  Hence the circuit will find a point where A+B are meet as long as there is enough gain.  The usually worry is that the xtal is over driven and the waveform clips but adding some series R is the fix that.

    Measuring a running oscillator shows Xin~Xout so supports the low gain measurement above.  Normally I would expect to Xin ~ Xout/10 or at least significantly more than 1, 3 say.  That allows for the losses in the xtal and the rest of the circuit.   The low gain means the xtal can't have any losses which TI KB item saying using <40ohm also implies.

    Nobody's perfect and I'd be happy if some one could point out what I'm doing wrong, but so far every different measurement supports the theory.

  • I really need to understand how it is that you are measuring the gain of the XF1 oscillator circuitry so I can duplicate your setup on a TI board. How do you select the HF mode (XTS = 1 and OSCOFF cleared) and which clock mode are you using to run the MSP430F14x while you do these tests? What is the value of the load capacitors for XF1? It would be easier if I had the code you use during these tests.

    Also, would you elaborate on your original statement "This has proved to be unreliable" as it refers to the MSP430F148 with a 7.4MHz xtal on XT1? What are the symptoms?

  • Unreliable is failures in the field.  Units stop running.  Due to the nature of the these units they cannot auto restart so it is obvious they failed.  After build they are tested and soaked (run at high and low temperatures for some time).  We have seen 1% failure rate in the field after some months and there was the worry this was a trend and hence the investigation.

    I am using kick start with a Soft Baugh USBP.  The code I am using is just this:

    ------------------------------------------------------------------------------------------

    #include "msp430.h"                     ; #define controlled include file

            NAME    main                    ; module name

            PUBLIC  main                  ; make the main label vissible
                                                       ; outside this module
            ORG     0FFFEh
            DC16    init                        ; set reset vector to 'init' label

            RSEG    CSTACK                  ; pre-declaration of segment
            RSEG    CODE                    ; place program in 'CODE' segment

    init:   MOV     #SFE(CSTACK), SP        ; set up stack

    main:   NOP                                 ; main program
            MOV.W   #WDTPW+WDTHOLD,&WDTCTL  ; Stop watchdog timer
            NOP
            MOV.B   #0C7h,&BCSCTL1          ; Select HF clock mode and ACLK/1
            AND.B   #0CFh,SR                          ; Turn on the LFXT1 clock
            MOV.B   #0D0h,&BCSCTL2          ; Select MCLOCK from LFXT1CLK/2
            MOV.B   #010h,&P5DIR      
            MOV.B   #010h,&P5SEL
                  
    L1:     BIC.B   #OFIFG,&IFG1        ; set clock to xtal
          
            JMP L1                          ; jump to current location 'L1'
                                            ; (endless loop)
            END
    ------------------------------------------------------------------------------------------

    This is basically the asm file given early in this thread with the setup instructions from the unit real code and then an endless loop reseting the OFIFG.  I use this with a pot in series with the xtal as per the TI app note on measuring negative resistance for oscillator safety factor.  I look at MCLOCK on P5 so the scope is not adding any loading to the xtal circuit.  P5 will either be the xtal frequency or will fall back to DCO if the xtal isn't running.  On the scope you see it jumping when failing to run or steady at xtal frequency when all is ok.   When I have set the  pot so that the xtal is just running steady then I power off and measure the pot R.  See circuit below.  Pot is RXX and is a tiny 3mm one.  The circuit in the dotted box is not there for this test.

    The measurement of the MSP430 oscillator amp is done with R1 removed.  All that is on xout is a 10:1 scope probe, so ~10Mohm, 12pF.  For the gain test of the oscillator I start the software as above then use the debugger to halt it.  So it stops in the loop with the oscillator set correctly.  The circuit is as per the picture above.  The components (all 0805) in the dotted box have been tacked on the board to give 100:1 divide on sig gen.  Hence 1Vpp from sig gen is ~10mVpp at xin.   A plot of this with XTS set by debugger to 0 gives:

     

    So at 30kHz the gain is dropping off.  Xout is 10 x 4mVrms for 10mVpp, 3.5mVrms in.  About a gain of 10 then but more gain at lower frequencies.  With XTS=1 the results are:

    Peak gain is at 500kHz.  Xout is 10 x 19mVrms for 3.5mVrms in.  A gain of ~55.  But this is dropping off.  A 1MHz, the limit of this plotting kit, xout is 10 x 6mVrms so a gain of ~17.

    Removing the dotted box circuit and replacing R1 turns the circuit back to an oscillator.  Setting RXX to 0 and starting the software as normal gives this plot for xin, xout.

    NOTE:  The bigger waveform is XIN!  There is some decrease in signal due to the loading of the probes.  On xout one probe gives 10 x 23mVrms but add CH2 probe and this drops to 18mVrms.  This could be the addition capacitance pulling the frequency.   Both probe waveforms overlap so both probes are calibrated the same.  The circuit is only oscillating then due to the gain of the xtal.  The MSP430 amp has a voltage gain of ~0.5.  The probe loading would not affect that result.

    That should be enough for you to duplicate the tests.

    I also did some measurements add a 10k 47nF load to estimate the output impedance.  I haven't repeated those tests with the 100:1 sig gen divider so it is possible that the signal in was too high at 0.1Vpp but output level was <2Vpp all the time (at 500kHz).  The Rout figures for the 3 MSP430 were 56k, 11k, 2k.

     

     

     

     

     

     

     

     

  • If I were you, I would:

    (a) Use POR values of of the BCS module, only change the XTS bit to 1. This is so that MCLK=SMCLK=DCO=~0.75MHz, and ACLK=LFXT1 in HF mode using X1.

    (b) Set up P5DIR and P5SEL to show ACLK (together with MCLK and SMCLK too) at P5 pin(s).

    (c) Disconnect Cz when testing with X1. Disconnect X1 and C2 when testing with the SIG-GEN.

  • (a/b) tried that.  As would be expected it made no difference and if anything the RXX test failed at a lower R.  Perhaps that was due to the divide by 2 not being there, or perhaps just a different ambient today.

    (c)  Already did remove Cz when testing with X1.  Said that - "dotted box not there for this test".  X1 and C2 will make no difference.  C2 is only 2k8 impedance at 1MHz so no effect compared to 100R.  X1 will be high impedance other than at 7.4MHz and even if it was low impedance that would just include C1, another 2k8 impedance so no effect.  R1 is open for sig gen tests.

     

**Attention** This is a public forum