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: SPI Slace Mode - Need help
PostPosted: Thu Aug 06, 2009 7:54 am 
Offline

Joined: Fri Nov 10, 2006 12:05 am
Posts: 21
Hello,

How do I syncronise receiver and tranmitter shift registers to start at first bit of data when NCS0- goes low?

I have problems with the SPI slave mode.
I am not able to syncronise first data bit reveiced with first clock cycle after NCS0 goes low.

I can get the AT91C_SPI_RDRF irq early by 1, 2, 3 or even 4 SPI clock cycles after NCS0 goes low. The data received is then also bit offset but this number of cycles.

Don't worry, I have SPI set correctly for phase,cpol and bit = 8. too easy.

Datasheet states that serializer starts operating when NCS0 goes low.
Block diagram for slave mode does NOT show how serializer is reset to shift out first bit.

The Atmel SPI app note is not relevant to this. Too basic
No simple SPI sample SLAVE code could be found in EK CD and at the Atmel links provided in this forum earlier (a few years ago).

There is no irq possible on NCS0 going low so this cannot be used to synchronise either.

Kind regards
Bernt


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 3 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: