SLAA638A august 2014 – may 2023 MSP430I2040 , MSP430I2041
A cycle tracking counter and a sample counter keep track of how many samples have been accumulated together with a cycle counter. When 4 cycles worth of samples have been accumulated, the background process sets a flag to notify the foreground process, indicating it is a report cycle, that a new set of scaled results should be produced.
In the implementation, there are two sets of intermediate data registers: one set is using the background as intermediate data and the other set is using the foreground to calculate the readings. To save the processing time, when reached a report cycle, the background process passes the set of intermediate register to the foreground and uses another set to accumulate the next set of results.