1.10 RCOUNT Register

The 32-bit RCOUNT register contains the loop counter for the REPEAT instruction. When a REPEAT instruction is executed, RCOUNT is loaded with the repeat count of the instruction, either “lit20” for the “REPEAT #lit20” instruction, “lit5” for the “REPEAT #lit5” instruction or Wn register for the “REPEAT Wn” instruction. The REPEAT loop will be executed RCOUNT + 1 time.

Note: If a REPEAT loop is executing and gets interrupted, RCOUNT may be cleared by the Interrupt Service Routine (ISR) to break out of the REPEAT loop when the foreground code is re-entered.