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.

MSP430FR5857: program getting stopped while running

Part Number: MSP430FR5857
Hello sir,  
The query is related to MSP430FR5857 microcontroller which is used to give signal to  turn ON and OFF operation of MOSFET's connected in the relay 12V coil of 230V AC MAINS line and neutral relays. 
Query:
NO  LOAD RELAY OPERATION TESTING USING Msp430fr5857 microcontroller.
Whenever I dumped the program for turning ON and OFF operation of relays with some delay. The program rans normally for sometime and then stops suddenly. This happens only when board is powered with 230 V AC mains and I am using onboard power conversion for microcontroller.
But whenever I've given directly 12V DC supply using external power supply to the 12V and GND pin on the board which further converts that 12V to 5V and 5V to 3.3V using the same power conversion supply for MSP430FR5857 then there is no such problem. (In this case 230V is not giving to the board)
Power supply: 
I have generated 3.3V,  5V and 12V power supply in my board using 230V to 12V Isolated IRM-2012 converter and as well as 12 to 5V LDO  regulator and 5 to 3.3V supply which is given to microcontroller as well.
I have also attached the program below which I dumped  in microcontroller. Program Is working fine when instead of ac to dc converter I am giving 12v from DC Power supply.and further conversion takes place as mentioned above. 

#include "driverlib.h"
#include <msp430.h>
void main (void)
{
//Stop WDT
WDT_A_hold(WDT_A_BASE);
PMM_unlockLPM5();

//LINE relay mosfet gate signal pin
GPIO_setAsOutputPin(
GPIO_PORT_P3,
GPIO_PIN6
);
//NEUTRAL relay mosfet gate signal pin
GPIO_setAsOutputPin(
GPIO_PORT_P3,
GPIO_PIN7
);
//just for toggling one GPIO pin
GPIO_setAsOutputPin(
GPIO_PORT_P2,
GPIO_PIN4
);

while(1)
{

__delay_cycles(700000);
GPIO_setOutputHighOnPin( GPIO_PORT_P3,GPIO_PIN6);

__delay_cycles(700000);
GPIO_setOutputHighOnPin( GPIO_PORT_P3,GPIO_PIN7);

__delay_cycles(700000);
GPIO_setOutputLowOnPin( GPIO_PORT_P3,GPIO_PIN6);

__delay_cycles(700000);
GPIO_setOutputLowOnPin( GPIO_PORT_P3,GPIO_PIN7);
GPIO_toggleOutputOnPin(GPIO_PORT_P2,GPIO_PIN4);

}

}

**Attention** This is a public forum