On Mon, 27 Jul 2009, tseredynski wrote:
> Hi,
>
> Thanks for the response. Why exactly do I need to use a kernel driver?
> I'm not very familiar with them, and I don't usually like to use things
> that I don't understand well. I'm currently trying with T4 instead of T3
> and it's showing more promise of being reliable... but I'm not done yet.
>
> But I'd really like to know why I'm unable to make use of the timer with
> pure C programming. Thanks.
Elementary my dear watson, because you can't guarantee when your program
will be scheduled. A kernel driver allows use of an ISR hence provides a
an improved (though not perfect) guarantees.
>
> --- In Jim Jackson <> wrote:
>>
>>
>> You really need to use a kernel driver for this.
>> For an example, check our Phil's ADC kernel module - it's in the file
>> section of the group. It uses one of the timers to schedule when to
>> read the ADC.
>>
>> On Fri, 24 Jul 2009, tseredynski wrote:
>>
>>> 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/
|