Vasanta Tanna

Separate task todo average - very slow

Discussion created by Vasanta Tanna on Nov 14, 2009
Latest reply on Nov 19, 2009 by Vasanta Tanna

I have separate task, where it polls for a flag which was set by 1ms PIT, every 1ms, when this flag gets set, I have separate task where I read 24 ADC readings and I do store those values into accumulators by doing double those values - I can see very slow (wholethings takes more than 1ms), any idea why multiplication takes more time in 52233 demo board?. I have 24 LEDs and I have to read 24 ADC inputs, also I have to store those values by doing double.

 

Select 1st LED using GPIO

val1 = Read ADC input

buf1 += val1 * val1;
accu1 += volt1 * val1;

........

........

......... 

 

Select 24 LED using GPIO

val24 = Read ADC input

buf24 += val24 * val24;
accu24 += volt24 * val24;

Outcomes