DSPRelated.com
Forums

Re: On chip timer (fwd)

Started by Mike Rosing March 9, 2009
Nice trick! Especially if it fits your timing requirements.

---------- Forwarded message ----------
Date: Mon, 09 Mar 2009 14:41:43 -0000
From: fanboy33
To: Mike Rosing
Subject: Re: On chip timer

Hello everyone,

I hope that I'm not responding too late on this thread? One other "trick" you can do if there are enough unused hardware resources, is to use one of the serial ports to generate a "timed" interrupt. Just configure the SPORT for internally-generated clock and transmit frame synch, and just send out dummy words to generate a SPORT interrupt at whichever frequency/interval you desire.

Just my $0.02 (which is probably only worth $0.0005 right about now?)
Cheers,
Greg

--- In a..., Mike Rosing wrote:
>
> On Wed, 4 Mar 2009, ashritha879shenoy@... wrote:
>
>> hi all
>> i'm using adsp2181 ezkit lite board. As we all know 2181 has only 1 timer.
>> my requirement is to use this timer for 2 purposes using status condition.
>>
>> i'm using timer for UART and i need to use the same timer for generating some control pulses for my project.
>>
>> my idea is to use a status check.
>> i.e. if dm(status)=1 then the timer is dedicated to UART and
>> if dm(status)=0 the timer is used by the pulse routine.
>>
>> Please let me know whether my idea is right and can i proceed.
>
> Nothing wrong with that. Another way is to let the timer generate
> interrupts on your shortest time scale which you use to set flags. Then
> either routine can test the flags to see if time has gone by enough.
>
> If the UART timing is not critical and the pulse timing is, then yet
> another way would be to use the timer for the pulse routine only, but let
> it set flags continuously. That way the UART will be running on your
> pulse time base, but you won't care, you'll probably have to let a lot of
> pulse times go by before doing anything.
>
> There are many other ways to go about it too. One thing you might think
> about is how many other things will you be asked to do on this project,
> and how will you expand the timer to do more than just two things?
>
> Patience, persistence, truth,
> Dr. mike
>