Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: ADC using PDC and triggered from TC2 is a nostarter(solved)
PostPosted: Wed Oct 22, 2008 3:43 pm 
Offline

Joined: Wed Oct 22, 2008 2:58 pm
Posts: 6
Hi
My board is based on a AT91SAM7X (OS is eCOS). I have configured TC2 to produce a TIOA2-Pulse every ms. Then I have configured the ADC to scan all 8 channels and to be triggered by TIOA2 and it should store scanned results to memory using its Peripheral DMA Controller (PDC). An RxBUF-Interrupt should finally call a routine that gets the results from the memory buffer.

Result: The ADC seems to perform a scan, but the PDC does not do anything. I can see the DRDY-Flag, but never do I get a RXBUF-Flag (and hence no such interrupt). What could be the cause of this problem?

I assume that there is no need to special configuration of the TIOA2-pin in this context? I assume that TIOA2 is internally routed to the ADC - as instructed by the cor. fields in the device registers. Actually, on the 7x, TIOA2 is multiplexed between PIO-PB27, TIOA2, PWM0 and AD0. I have configured the pin for AD0 (channel 0 of the ADC).
Then I assume that each conversion complete produces a DMA-transfer of the result until the specified number of data have been transfered. That's what I understand from the Manual (6120G-ATARM-08-Oct-07). But see above :cry: .
Regards Roe
PS: Oh dear, I forgot the ADC_PTCR register. Putting a one there and it worked - hence ---> solved


Top
 Profile  
 
 Post subject: Re: ADC using PDC and triggered from TC2 is a nostarter(solved)
PostPosted: Thu Mar 04, 2010 5:47 am 
Offline

Joined: Thu Oct 16, 2008 2:18 am
Posts: 10
Hi Roe,

I'm thinking to use TIOA2 to trigger AD conversion and DMA to save converted data, I want to get A/D as fast as possible.

Should I check the AT91C_ADC_DRDY bit to make sure the data is ready?

Is it possible to share your code for PDC and AD conversion part?

Regards
Samuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: