From: Syaril Azrad B Md Ali <aumchak@gm...> - 2009-07-31 05:25:33
I am running a simple code with thread and without thread that has
been compiled and loaded to my Gumstix Verdex Pro (600Mhz).
The purpose of running is to see the frequency of a simple loop
without any algorithm in it, because I have a problem on the stability
of getting my sensor readings. Initially I thought it was because of
the sensor performance.
Now when running only a simple loop of (while(0)), I discovered that
the running frequency is not stable.
I wrote a code to take the elapse time of the loop (dt, so freq is
1/dt), and discovered that there is a cyclic
sudden drop in dt (which means higher frequency) when I set the thread
to run at 10Hz. Otherwise the dt is stable
at 0.02 (10Hz), except when the drop occures.
I have also tested without the thread, and found the same trend.
For your information, this problem has not occured in Gumstix Connex
before, where I use the same program.
I got a stable frequency for a running loop in a thread.
Does anyone has any clue on this problem?