This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AT91 variant HAL timers and AT91 ADC


On Mon, Oct 06, 2008 at 11:40:25PM +0200, G?bor T?r?k wrote:
> Hi!
> 
> I'm writing an AT91 ADC driver, and was looking for a timer to use for
> triggering the ADC sampling.
> There is no problem when the PIT is used for eCos clock, in this case
> the delay_us() also uses the PIT. But when the TC is used as the eCos
> clock, then TC0 is used for the clock and TC2 (TC1 in the case of
> CYGHWR_HAL_ARM_AT91_JTST, because TC2 is used for the AD/DA) for the
> delay_us(). The eCosPro documentation states that TC1 is used for the
> profiler (it's more interesting with JTST), but it is not implemented
> in the free CVS version.
> The point is, that I'm not very happy with the current solution. Why
> to use a separate timer with hardware compare, when delay_us is a
> blocking function doing polling? I think it would be better to use the
> same timer as for the eCos clock, as it is done in the PIT version. In
> this case, TC1 can be reserved for the profiler and TC2 can be used
> for the ADC (as in the JTST).
> I can rewrite it, but first I would like to hear your opinions.

I think it is O.K. to rewrite the TC delay_us() to use TC0. It would
be nice to keep TC1 free for the profile for if eCosCentric decide to
contribute there code.

           Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]