Im using a custom board with kinetis kl36z256 mcu. The board was working fine. After a long continuous run the board stopped working. I couldn't reprogram the mcu anymore. Checked with the reset pin and found it was toggling continuously. Suspected a watchdog reset, hence erased the code an tried reprogramming. Still no success. At times the code gets written to the MCU but it gets locked with the reset handler. What may be the cause of it?