Tool/software: Code Composer Studio
I need to read some i2c sensors (from the sensor controller) for about 30 seconds at about 1Hz, then put everything to sleep and repeat some time later.
My primary concern is power consumption and I am trying to figure out the best approach. I've come up with 2 scenarios:
- The straightforward and simpler approach is to generate a fwGenAlertInterrupt(); in the SCS code on every iteration, which would wake up the main processor to read a single record from the the SCS structure. This would wake the main processor once or twice a second to transfer each sample - a total of 30 wakeups of the main processor.
- The other scenario would be to build up a buffer of data in the SCS code and only trigger the fwGenAlertInterrupt(); when the buffer is full. This is obviously limited by the RAM available to the SCS code/data, but I'm in that gray area where I could buffer 30 data samples and keep the main processor asleep for the full 30 seconds.
I don't know how the power is handled in either of the above scenarios. It seems that keeping the main processor asleep longer would be better, but I don't know how significant or trivial the difference would be. I was hoping someone could comment from a power perspective. Is the power difference between the 2 scenarios even worth the extra programming complexity of option #2?
This is an ultra low power application, so any power optimization is worth it.