Hello,
I'm trying to use the T3 timer on my Ts-7200 to execute a function at a
constant 4khz rate (every 0.25 ms), but I'm running into trouble.
I'm trying to do so by loading the appropriate value to the timer, and then
constantly polling the T3 value, and waiting for it to hit 0. However, a few
problems occur. First of all, it doesn't seem like my program can poll the
value fast enough to catch the 0. The clock hits zero, and resets before my
program can even get the value.
It also seems that every couple of milliseconds (~5ms) I get a large delay. I
checked this part by using printf() to display values as fast as it could and
I'd usually get gaps of about 20 clock counts, however every couple of
milliseconds I'd get a gap that was much larger (a couple hundred clock
counts). Also, while trying to print values as fast as possible, it would
usually print 20 values per cycle but every couple of cycles it would print
closer to 30.
This makes me think that there might be processes running on the board with
higher priority than my program.
Does anyone have some advice? Can I use the timer like I'm trying to, or do I
need to try to use the interrupt request generated by the timer? (I don't know
how to do this atm, so advice regarding that would be appreciated)
Thank you!
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|