I know it is a common question but still we cannot get rid of it. We are using stm8s003f3 in our project. An ac motor is switched ON and OFF by a 12V relay (using timer).
The controller frequently resets itself when a relay is tripped ON or OFF. We used pf on the controller pin, pulled up the NRST pin with a 10K and a pf, used 7805 instead of lm1117, and tried a few other things, but couldn't succeed.
It would be a great relief for us if anybody can provide solution for it.