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.

MSP-TS430PZ100USB (MSP430F6638) extra 32khz crystal? FLL init issue.

Guru 15580 points

I recently ordered the  MSP-TS430PZ100USB target board. It came with an extra (not installed) 32khz crystal. Do I need to install the crystal?

The reason for my question is, I am getting stuck in a loop during FLL initialization here:

while (SFRIFG1 & OFIFG) { // Check OFIFG fault flag
UCSCTL7 &= ~(DCOFFG+XT1LFOFFG+XT1HFOFFG+XT2OFFG); // Clear OSC flaut Flags
SFRIFG1 &= ~OFIFG; // Clear OFIFG fault flag

If I check the SFRIFG1.OFIFG flag I see that it is set = 1, so something appears to be wrong with the clock init.

Any suggestions would be appreciated.

  • Hi Mike,

    If you're using XT1CLK to source the FLL (which I believe is the default upon reset) then OFIFG will be set since XT1CLK is not available without the watch crystal. Try setting the FLL reference clock source to REFO (the internal ~32khz oscillator), ie.

    UCSCTL3 = SELREF__REFOCLK;

    Tony

  • Tony,

    That *was* the problem! However, instead of changing the code I installed the crystal. I'm actually using the USB sample code which apparently needs the crystal.

    It's baffling to me why the TI documentation is so bad on some of these products. For example, take a look at the crystals on the schematic supplied with the target board. Can you read this?

    And there is essentially no mention of the need for the crystal, no instructions on using CCS with the board, and the BOM says that the kit includes a F5529 instead of the F6638.

    Anyway (\rant), Thanks again for the help.

  • I agree that the placement n the schematics is a bit unlucky if someone doesn't know what's going on. It is basically caused by the fact that teh board provides two different sockets/pad sets for the same pins, for alternative use. I have similar schematics for the SD card slot (standard and micro) and two different RF tranceives in our projects. It's fine if oyu know what it measn, but if you try to understand a project by reading the schematics, it is confusing.

    However, you do not need to install the crystal for using the FLL. The LFXT1 input has a fallback to the internal REFO on these MSPs. So if you don't have a crystal, you don't need to wait for the OFIFG, as there are not parts that can fail. The FLL will work with REFO and ACLK will work with REFO. Still, a crystal is more precise than the REFO, so if you want precision...

    The provided sample codes usually assume a crystal, and should (but not always do) state this. And even if they are written to use a crystal, at least on 5x family thre should be a comment telling you that it works without crystal (with lower precision) if the waiting loop for OFIFG is removed.

  • Hi MikeH,

    You wrote that " I'm actually using the USB sample code which apparently needs the crystal." Which USB sample is that? I need CDC C2 - getting data, it is the closest to my application for f6659. It doesn't seem to use xt1... Or have I missed something? My problem is actually described here http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/327476.aspx

    So should I solder the crystal in order for usb to work?

    Thanks in advance

**Attention** This is a public forum