I used samd21g18 to communicate with a machine using RS232. I add converter Uart to RS232 into my board.
The communication is OK but there is certain time when I turn ON the machine or turn OFF it, my board seem hang/not running. I need to reset to make it run again.
I try debug, yes it stopped at random point (no breakpoint). If I click continue it can run again.
Then I try to disconnect TX and RX point. I just make it common ground.
The same problem still happen.
Even I add watchdog to reset MCU, it's not solve my problem.
I don't think it is because of stack because it only happen when I turn ON/OFF machine(not every time).
Also I have try debugging with empty code, still happen.
Is it the internal clock stopped?
Anyone have idea how to solve it? Please help.