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  [ 1 post ] 
Author Message
 Post subject: AT91M55800A weird problem with SPI PDC
PostPosted: Wed Mar 02, 2005 3:37 pm 
Offline

Joined: Wed Mar 02, 2005 3:21 pm
Posts: 14
Hi everyone,

I'm currently developing a new hardware with the AT91M55800A controller. I'm using the SPI bus. I have connected two AD7887 a/d converter chips to the bus. The a/d converters are connected to NPCS0 and NPCS1 chip selects. The PDC is setup to run 200 conversions. The transmitter buffer contains 200 32 bit words which contain the a/d control words (lower 16 bits) and the appropriate chip select values (bits 16...19). The setup is done in a way so that the a/d converters are accessed in an alternating manner, i.e. NPCS 0 - 1 - 0 - 1 ...
The PDC is also setup to receive the results. When the PDC has transmitted the 200th word, an interrupt occurs. Within this interrupt, I also check the status of the PDC SPI receiver counter (which is zero) and the PDC SPI receiver pointer (which is original programming + 4 * 200), which look ok.

However, the receiver buffer contains the results not in the same order as the transmitter buffer did (0 - 1 - 0 - 1 ...), but swapped (1 - 0 - 1 - 0 ...). I'm completely stuck about what I could have done wrong. Initiating the sequence is done as follows:
* Is RDRF cleared?
* Abort if not!
* Setup receiver pointer
* Setup receiver count (nothing happens because no transmission...)
* Setup transmitter pointer
* Setup transmitter count (transmission starts, therefore reception starts)

Did anybody ever came across a similar problem?

Thanks for your suggestions,

Markus Klama


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

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 20 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: