Sleep Management¶
The sensor host follows a periodic sleep routine as described below.
The following actions are described below:
- Start: At the start of this periodic routine, the sensor host must determine how long it needs to sleep for, this period denoted Processing is reserved for this calculation. The routine responsible for this calculation is
calc_time_sleep
, returning the value \(T_{AVR,sleep}\) - Periodic Sleep: The device then sleeps for the prescribed time.
- Timer Wake: An interrupt generated by
Timer2
wakes the device. As this wake state requires a period of time to re-initialise the system, the time returned fromcalc_time_sleep
is reduced by an overhead time - Pre-Sample Wait: With the device ready to sample, the device makes a final calculation to ensure the sample is received at the correct time