Hi all, 

I'm looking to get a rough estimate of the execution time of the 
'triggerConversion' in the BoilerPlate sample firmware. In my case, this 
function reads ECG data from the memory area it resides it, converts it to 
digital values, and makes the converted data available through DMA.

My idea is to get a timestamp from the instant the timer event fires, and then 
another timestamp when the "DMA is done" event is handled. My approach is 
described in detail below.

In the BoilerPlateC.nc file, the 'event void SampleTimer.fired()' function is 
called whenever the sampler timer fires - in my case it's every 20ms (50Hz).
I use a Counter<TMilli, uint16_t> counter to get this. All good, and the values 
make sense and are proper, i.e. the timer actually fires at the given rate 
(50Hz).

Once the DMA is ready, it fires the asynchronous event 'async event void 
DMA0.transferDone(error_t status)' function in BoilerPlateC.nc.
As mentioned, I also capture a timestamp from the same counter here.

And this is when it gets weird. Every timestamp pair (timer fired and DMA 
ready) are equal. If I am measuring these timings correctly, this means either
 1) the clock's resolution is not high enough to capture the time elapsed from 
_before_ calling 'triggerConversion' to when the data is available through the 
DMA,
 2) the execution time of 'triggerConversion' is actually below 1ms, which 
leads to 1) again.

I have tons of thoughts about what could be wrong, but can someone point me in 
the right direction?

Thanks in advance.
_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users

Reply via email to