>> Hi Steven
>> I am not familiar with the processors you mention, but I have written a 
>> module that uses the adc of the AT91SAM7X. Its not ready to go into ecos (as 
>> part of ecos), but it integrates smoothly into an ecos-based application - 
>> and it works. It may (or may not :-( ) be helpfull for you.

>> Best regards
>>   Robert

Hi Robert

Thanks again for the SAM7 ADC code you posted. I've been trying to get this to 
work this week in the hope that I can use it as a staring point to writing a 
more generalised AT91 ADC driver and then post that for comments/review.

However, I've been struggling to get it to work on my AT91SAM7S256 (my own 
fault I'm sure).
After calling InitSun(), the TC2 timer seems to be kicking over ok as the timer 
counter register is incrementing, but I can't get the ADC unit to do any 
conversions. All of the settings you've used look reasonable, but even when the 
ADC is software triggered in a loop using the START bit ADC control reg, the 
status reg never changes and the ISR is never called.

I've trawlled the AT91SAM7 manual and can't find anything obvious (like an ADC 
clock - PMC is not an issue I think) that needs to be enabled for it to work, 
but clearly I've overlooked something as its not working.

Do you (or anyone else) have any ideas? Are there any imporant initialisation 
steps that's not included in the sun.c source?

Thanks for any insight.

Regards,

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

Reply via email to