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.

msp430F5418A external crystal issue

Other Parts Discussed in Thread: MSP430F5418A

HI 

we are developing a product for AC sorce switching based on MSP430F5418A, we are uisng 20MHz crystal on XT1 in HF mode , when enabel the contactors the controller is resetting and when i enable internal DCO and disabling the external crystal controller is not resetting so please let me know the exact issue and suggestions to resolve this.below is the schematic for your reference.

Regards

Nandish

  • SetVCore(PMMCOREV_3); // Set VCore to 1.8MHz for 20MHz
    P7SEL |= 0x03; // Port select XT1
    UCSCTL3 |= SELREF_0; // FLL Ref = XT1
    UCSCTL6 &= ~XT1OFF; // Set XT1 On
    UCSCTL6 |= XT1DRIVE_3 + XTS; // Max drive strength, adjust
    // according to crystal frequency.
    // LFXT1 HF mode
    // Loop until XT1,XT2 & DCO stabilizes
    do
    {
    UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + XT1HFOFFG + DCOFFG);
    // Clear XT2,XT1,DCO fault flags
    SFRIFG1 &= ~OFIFG; // Clear fault flags
    }
    while (SFRIFG1&OFIFG); // Test oscillator fault flag

    UCSCTL4 = SELA_0 + SELS_0 + SELM_0; // Select clocks form 20MHz XT1
    // ACLK=XT1, SMCLK=XT1, MCLK=XT1

  • What is the cause of the reset (SYSRSTIV)?
  • Hi Nandish!
    What if the PCB has been badly routed? What if there is lack of decoupling capacitors on the PCB -- or their capacity is insufficient to reduce transients? Whenever a contactor switches your power circuits, spikes appear on the VCC and GND rails and -- further -- on logic signals, thus causing the microcontroller to reset.

    Regards,
    Victor.
  • Hi victor,

    thanks for the reply.....

    if i enable the internal DCO and do same operations board works fine..... 

    only if i try to work with external crystal we are facing this issue.

    regards

    Nandish

  • Hi Guru,

    its from crystal side i tried to cehck the SYSRSTIV reason but controller is badly hanging.

    regards
    Nandish
  • "Reset" and "hang" are quite different issues. Please clarify what actually happens.

    (Don't you have a watchdog?)

  • Hi Nandish,

    The DCO is implemented internally, while part of the external oscillator circuit -- externally. This part is very sensitive to EMI, spikes, crosstalk.

    The DCO  may or may not be less sensitive to noise, so the fact it does function while power circuits is being switched on and off  tells us nothing.

    =====

    One more thing to notice...Such a low frequency (32kHz) -- compared to the one the DCO works at -- may prevent your software from functioning properly (due to nested interrupts etc).

    Regards,

     Victor.

  • Hi Victor,

    external crystal we using was 20MHz and internal DCO is tested from16MHz to 25MHz.  in code we are using timer B for delay , some LCD functions, and toggling 2 GPIOs to toggle relay and LED. so no interrupt loops in code to worry on nested interrupts.

    Regards

    Nandish

  • HI guru,

    we have implemented watchdog timer to get out of hanging issue but resseting issue is the major concern. we are tryig develop fool proof solution than putting loops to get out issue now but in field we should not face these issues again, one more concern on the device erratas so can you suggest us to use this part in this application ???

    Regards
    Nandish

**Attention** This is a public forum