There are following two ways to cause a reset by software. (1) Reset by BRK instruction U8/U16 microcontroller has BRK instruction for CPU reset. Using this BRK instruction enables a reset by software. Note that BRK instruction causes CPU reset only, and peripheral functions such as SFR will not be reset. The following shows a description example in C source.
#pragma asm mov psw, #02h brk #pragma endasm
(2) Reset by WDT overflow CPU and peripheral circuits such as SFR are reset by causing a WDT overflow intentionally (WDTP not cleared). Note that it takes time to cause a WDT overflow.