Hardware average

This is a really short explanation on the Tiva hardware average feature and how to use it in your program. This is for the TM4C123GH6PM MCU.

The Tiva ADC is capable of doing simple averages in powers of 2, from 2 to 64. This allows to substitute software averages that would take processing time.

It's really simple to use it, take the code from Internal Temperature Sensor and simply add, for example after ADCSequenceStepConfigure:

ADCHardwareOversampleConfigure(ADC0_BASE,64);

This will configure the ADC0 to do averages of 64 values, you can change the value to whichever you want, as long it is 64 or less and in powers of 2. You can use this for the ADC1 too.

Note that this doesn't configure a specific sequencer so if you connfigure ADC0 for 64 values average, then all the 4 sequencers will sample 64 values and average them.

Note also that by doing this you decrease throughput, so if you had a sample rate of 64 samples per second, by using a average of 64 now you have a sample rate of just 1 sample per second

This was just a short explanation but i hope you liked it. Thank you for reading and goodbye