This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: ARM7 ADC drivers - any progress?
- From: Steven Clugston <steven dot clugston at newcastle dot ac dot uk>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: ecos-discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 1 Sep 2009 11:40:16 +0100
- Subject: RE: [ECOS] ARM7 ADC drivers - any progress?
- References: <4DCF6DBD3535F742BB167C528BBEE9803824B9D6A5@EXSAN01.campus.ncl.ac.uk> <op.ut4pxzbokeg3uf@localhost> <4DCF6DBD3535F742BB167C528BBEE9803827660766@EXSAN01.campus.ncl.ac.uk> <op.uyyweltykeg3uf@localhost> <4DCF6DBD3535F742BB167C528BBEE9803827660BD7@EXSAN01.campus.ncl.ac.uk>,<20090901095010.GB10057@lunn.ch>
>> I'm slightly confused by a couple of things, perhaps someone who is
>> familiar with the AT91 hal code might be able to clearup.
> The HAL can get its tick from two different sources. Some devices, ag
> the AT91SAM, have a PIT, programmable Interrupt Timer. All AT91 have
> TC, Timer Counter. There is a CDL option to control which is used.
> Andrew
Thanks for pointing this out Andrew, but as the Timer Counter is enabled by default, I was trying to clear up which TC should be used for what (by AT91 hal convention).
There is a comment somewhere in the code stating that TC2 should be reserved for ADC/DAC use and Robert has used it with his ADC code, yet it appears to be in use by the system timer when the PIT CDL option has not been explicitly set.
Is it fair to say that the PIT is conventionally used for the system timer when available and hence it is OK to use TC2 as a default for an AT91(SAM) ADC driver?
If so then would it be reasonable to have a cdl entry for the ADC driver like:
requires CYGNUM_HAL_INTERRUPT_PITC
Or is that constraint too restrictive for an AT91 platform wide ADC driver as not all variants have a PIT?
Steven
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss