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.

MSP430FG4619 RTC problem & external 32khz crystal question

Other Parts Discussed in Thread: MSP-TS430PZ100, MSP430FG4619

Hi there,

I am using MSP-TS430PZ100 target board to program MSP430FG4619, I tried the sample code of RTC, I found it did not work.

There is an external 32Khz crystal came with the target board and I have not used it, is that the problem caused RTC not working?

I read the datasheet, it says when In calendar mode the Basic Timer1 is automatically configured as a pre-divider for the RTC module with the two 8-bit timers cascaded and ACLK selected as the Basic Timer1 clock source. Does it mean that I have to use ACLK in order to make RTC work in calendar mode? I know ACLK is generated by the 32khz crystal, therefore I have to install the external 32Khz crystal on the target board, correct? If so how to do it?

Thanks in advance!

Regards,

Vance

  • The 4x family RTC uses teh basic timer as source for the RTC clock. In calendar mode, the basic timer is configured for a 1:32768 prescaler and ACLK source. In counter mode, however, you can pick SMCLK or ACLK as clock source. There will always be a /128 predivider, but you can pick whether you use ACLK or ACLK/256 or SMLCK or SMCLK/256 as clock source, resulting in ACLK/128, ACLK/32768, SMCLK/128 or SMCLK/32768 as clock for the RTC counter.

    In our private conversation, I didn't know you're using a 4x family device. The 5x devices have their own timer/prescaler inside the RTC module, and there is no basic tiemr at all (whcih is mainly there for the LCD controller in the 4x family)

  • Hi Michael,

    Thank you for your reply. So I do need to connect the external 32khz crystal to the board in order to source ACLK if I need to use RTC in calendar mode right? How should I do that? Can I just solder it to the target board? Is there any other component such as capacitor needed?

    Thank you for your help!

    Regards,

    Vance

  • ForzaJuve said:
    So I do need to connect the external 32khz crystal to the board in order to source ACLK if I need to use RTC in calendar mode right?

    Right. The FLL+ module only has Xt1 as source for ACLK. However, if you add the crytal, you can also use it for stabilizing the DCO to (almsot) any frequency, as XT1 is also used as reference signal for the FLL. So two uses for one component :)

    ForzaJuve said:
    Can I just solder it to the target board

    Yes. However, if you do so, you should sewer all other connection to this pin. If the board has breakout connectors attaached to the XT1 pins, then tehy need to be disconnected (parasitic capacitance/antenna). Usually, tehre are 0Ohm resistors or jumpers you can remove.

    ForzaJuve said:
    Is there any other component such as capacitor needed

    Normally not. The XT1 oscillator in LF mode contains itnernal capacitors for some common loads. These are controlled by the CCAPxPF bits in FLL_CTL0. If the available options do not match, leave it on the default (1pF, the pin capacitance) adn add two external capacitors twice as large as the required load capacitance according to crystal datasheet (-1pF for the pin capacitance, to be exact). Usually, there are two pads for these already on the board besides the crystal mount, as you'll always need them in HF mode.

  • Hi Michael,

    Thank you so much for such clear answers!

    The board is MSP-TS430PZ100, there is one location that indicates LFXTL, so this is the place I should solder the external 32khz crystal to right?

    And you told me there might be 0Ohm resistors or jumpers I can remove, I don't know how to do it, and I cannot find any instruction on how to connect external crystal to my target board either, sorry I don't have any experience about removing resistors on target board, I am so afraid I would damage the board.

    One more question, does the crystal have polarities?

    Thank you very much for your help!

    Regards,

    Vance

  • On the TS430PZ100 board, the XIN and XOUT signals are directly connected to the Q1 crystal mount and the two pads for the capacitors. The two signals are not connected to the breakout header. On the TMS430PZ100A/B/C board, there are two resistors between the crystal mount and the breakout header. Teh C version even has different pads for LF and HF crystals. However, the A/B/C boards d o not have pads for the optional 5MOhm resistor that is soemtimes needed to startup the crystal on low supply voltages. (VCC <2V)

    ForzaJuve said:
    One more question, does the crystal have polarities

    Normally, the crystals are symmetrical. Because the electrical oscillation is converted into a mechanical oscillation and back. Assymmetrical mechanics wouldn't be good for an oscillation, and so the electrical side is symmetrical too. :)
    Crystals made for e.g. lighter-ignition (same stuff, different use) are not necessarily symmetrical.

  • Jens-Michael Gross said:

    On the TS430PZ100 board, the XIN and XOUT signals are directly connected to the Q1 crystal mount and the two pads for the capacitors. The two signals are not connected to the breakout header.

    So all I have to do is solder the crystal to Q1 position right? And what about the two pads for capacitors? Do I need to solder capacitors as well or I just leave it there?

    Jens-Michael Gross said:

     The two signals are not connected to the breakout header.

    Sorry I am a little confused, breakout header is the hole on the board or pin on MCU?

    Thank you very much for you help!

    Regards,

    Vance

  • ForzaJuve said:
    So all I have to do is solder the crystal to Q1 position right?

    Yes, unless you have the A/B/C version. But your description sounds as if not.
    ForzaJuve said:
    And what about the two pads for capacitors? Do I need to solder capacitors as well or I just leave it there?
    If thyour crystal can work with the internally provided laod capacitances (you'll have to configure them with the XCAP bits), then just leave them empty. If not, place the proper capacitors there and leave the internal ones disabled. The choice is yours. On the MSP, there's almost always more than one way to do things. :)

    ForzaJuve said:
    breakout header is the hole on the board or pin on MCU?

    Depends on the board. the row/field of holes or connector, where you can solder (or plug) your own stuff to.

**Attention** This is a public forum