Dear Sir/Madam,
i am using microcontroller msp430fr5857 for the application EVSE. while using internal DCO clock for 16 MHz ,MCU working fine with no issue even with line and neutral interchange on power side but when we use external crystal 16 MHz even that time it working fine when we are not changing line and neutral from power side ,but when we are turning on the relay from microcontroller for line neutral interchange controller behave differently some times it shows correct result, sometimes microcontroller reset ,some time something else, so its like microcontroller behaving like unstable.
I am unable to find the reason because this abnormal behaviour only when we are turning on the relay for line neutral interchange from microcontroller with external crystal while with internal clock no issue. Please suggest some solution.