timers alignment

Aug 05, 2008 7 Replies

Hi all,



What is the difference between aligned and non-aligned timers from a s/ w point of view?



Thanks!


On Mon, 4 Aug 2008 21:24:56 -0700 (PDT), holysmoke wrote in comp.arch.embedded:

What timers? What are they aligned to?

Jack Klein Home: http://JK-Technology.Com FAQs for comp.lang.c http://c-faq.com/ comp.lang.c++ http://www.parashift.com/c++-faq-lite/alt.comp.lang.learn.c-c++ http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html

Hi Jack,

Frankly I don't know, I saw something like the following (where I can't tell you!)

start_timer(unsigned int time, alignment_type t); where alignment_type is something like

typedef enum { aligned, nonaligned } alignment_type;

And start_timer source isn't available. So what could it possibly mean?

cheers

tml

No other documentation? Do the timers on your micro have any sort of alignment settings? Without anything else to go on I think we will be just stabbing in the dark.

Robert

Please do not top-post. Your answer belongs after (or intermixed with) the quoted material to which you reply, after snipping all irrelevant material. See the following links:

(taming google) (newusers)

[mail]: Chuck F (cbfalconer at maineline dot net) [page]: Try the download section.

No other documentation.

What could such a setting most probably mean?

cheers

It looks like the programmers choice of names, with two possible values (a boolean switch).

Look at the code for start_timer and see how it is used. It could map to a boolean BIT im memory, and then get the data sheet, and see what that bit/register does.

Some ADC's have a choice of left or right justify (alignment?) of the 10/12 bit result, so you can easily get the upper

8 bits, if you want. I have not seen a timer do that, but there may be one out there...

-jg

Almost anything, alignment with another timer, a incoming edge an outgoing pulse, the phase of the moon. There are many possibilities each more improbable than the others. See "stab in the dark" from earlier.

Robert

** Posted from
formatting link
**

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required