MSP430FR6043: Software BOR and REF_A

Part Number: MSP430FR6043

Tool/software:

Hello,

I have a failsafe mechanism in my code. If there is a failure, I perform a software reset using the code below.

void softwareReset(void)
{
    uint16_t delay_loop_inc=0;
    for (delay_loop_inc; delay_loop_inc < 1000; delay_loop_inc++);//// adding a delay before reset action;
    __disable_interrupt();      // Disable all interrupts
        // Force a Software BOR
        PMMCTL0 = PMMPW | PMMSWBOR;
        while (1);

}

However, after the reset, my code gets stuck in the reference generator (REF_A) module initialization, especially in the while loop. As a result, the entire hardware stops responding after reaching this state.

How to resolve this.

Regards,

Sarwath

  • Hi Sakhan,
    Since the code gets stuck in this part, my first thought is that the REFGENBUSY is true. Thus, making sure that the modules that could be using REF_A are disabled will make it turn false. I would recommend first enabling the ADC Module and then calling the adcRefVoltage setup function.

    Best Regards,

    Diego Abad

  • Hi Diego Abad Sajamin,

    I believe If I enable the ADC module first, there will no ref voltage for the conversion until the REF_A module is ON. So I am enabling the REF_A module first and second ADC module.

    Regards,

    Sarwath

  • Hi Sakhan,
    You are correct. However, the ADC is stuck because RED_A is on (or RED_A is being used, so when other modules like the ADC try to initialize it as its ADC VREF, it gets stuck). My best advice for now is to initialize the ADC and then REF_A. 
    Best Regards,
    Diego Abad

**Attention** This is a public forum