2.3 Main Loop

The main loop is executed periodically after a successful system initialization. As shown in the following figure, the main loop executes the following steps:

  • Resetting the watchdog timer
  • Checking for external requests from the SPI interface and configuration of the software state machines
  • Controlling the software state machines during a switch to operating modes
  • Checking for the sleep mode conditions and entering sleep mode if necessary. A main loop cycle takes approximately 25 µs by a standard FRC clock.
Figure 2-7. Main Loop Flow