Applying Operating Modes to the Conceptual Application

As the Conceptual Application is inactive while waiting for another sample to be converted, great amounts of power can be saved by sleeping while waiting. In order to do this, the application needs a wake-up source. This is easily done by setting up the RTC to interrupt and wake the system once every second. When a wake-up happens, the CPU can initiate an ADC conversion, compare the result, take appropriate action if any, and turn back to sleep.

If we roughly estimate that the system will be awake for 1 ms per second for each sample (starting the system clock and CPU, starting the ADC conversion, waiting for ADC interrupt, reading out the result and comparing it, possibly toggling a pin, and going back to sleep), the expected time in Active mode is 0.1%. This is compared to not using sleep modes, and having the CPU stay continuously awake. The expected power consumption will be slightly above 0.1%, as power consumption in Sleep mode must also be taken into account.

Dynamic clock scaling can also be applied to the conceptual application. While the CPU is waiting for the ADC to complete there is no need for high CPU frequency. Based on the output value, the application decides if it needs to take action. If this is the case, the system can switch to a higher clock frequency to be able to complete these actions faster, and thus reduce the time spent in Active mode. However, as only a few instructions are executed after the comparison operation, there is no benefit to using this technique in the conceptual application.