17.4.2.1.3 Software Reset (SWR)

This device does not provide a specific RESET instruction; however, a device Reset can be performed in software (software Reset (SWR)) by executing an SWR command sequence. The SWR acts like an MCLR Reset. The SWR sequence requires the system unlock sequence to be executed before writing the RSWRST.SWRST bit.

An SWR is performed as follows:

  1. Write the system unlock sequence.
  2. Set the SWRST bit (RSWRST[0]) = 1.
  3. Read the RSWRST register.

Setting the SWRST bit (RSWRST[0]) will arm the SWR. The subsequent read of the RSWRST register triggers the SWR, which will occur on the next clock cycle following the read operation. To ensure no other user code is executed before the Reset event occurs, it is recommended that four NOP instructions or a while(1) statement is placed after the READ instruction.

The SWR Status bit (RCON[6]) is set to indicate the SWR.