2009-01-18 06:37:37     SPI testing

Document created by Aaronwu Employee on Aug 9, 2013
Version 1Show Document
  • View in full screen mode

2009-01-18 06:37:37     SPI testing

ivan ucles (GERMANY)

Message: 68066   

 

Hi,

 

I try to send SPI messages between a CM-BF537 board and a STAMP 537 board without succes so far.

 

In both boards i´ve added the bfin5xx driver and the spidev driver. And i have initialize a device on bus "0"

 

and CS "1" spidev0.1.

 

I connect MOSIs, MISOs and  CLKs of both boards.

 

The CM-BF537 is supposed to be the master, so i connect de SSEL chip to 5v. and its CS1 to the SSEL chip

 

of the STAMP.

 

When i try to send a message using the example included in spidev kernel documentation, i get

 

response(2, 3): ff ff

 

 

 

What am i missing? could somebody help me?

 

Thank u

QuoteReplyEditDelete

 

 

2009-01-18 10:12:07     Re: SPI testing

Robin Getz (UNITED STATES)

Message: 68068   

 

Ivan:

 

Just to make sure -- SPI is a master/slave type set up. only one controlls the clock (connect CLKS together) - Master Out (MOSI) needs to be connected to Slave In (MOSI), and Master In (MISO) needs to be connected to Slave Out (MISO).

 

Plus - the Blackfin is a 3.3V device ONLY - 5V may damage the part.

 

-Robin

QuoteReplyEditDelete

 

 

2009-01-18 12:52:20     Re: SPI testing

Mike Frysinger (UNITED STATES)

Message: 68070   

 

also, the linux kernel does not support slave mode operation.  so if you want to have one be a slave, you'll have to write your own driver or extend the existing framework.

 

QuoteReplyEditDelete

 

 

2009-01-18 15:09:39     Re: SPI testing

ivan ucles (GERMANY)

Message: 68072   

 

Ok,

 

thanks for the answer.

 

Where could i find some information about how to write the slave-part driver?

 

Could i take another similar driver as template? which one?

 

About the voltage, i connected SSEL to another pin29 of x8 connector.

 

Should i connect it then to pin number 9 which is 3.3v right?

 

Thank you!

QuoteReplyEditDelete

 

 

2009-01-18 15:39:31     Re: SPI testing

Mike Frysinger (UNITED STATES)

Message: 68074   

 

unfortunately, there isnt much info as i dont think anyone has thought too hard on the idea.  might be easier to start out with a simple char driver and program the SPI controller yourself.

QuoteReplyEditDelete

 

 

2009-01-19 03:17:28     Re: SPI testing

ivan ucles (GERMANY)

Message: 68085   

 

And if i configure both boards as master (with both SSEL to  3.3v and no CS)

 

can they interchange messages? throug which device?

QuoteReplyEditDelete

 

 

2009-01-19 03:20:58     Re: SPI testing

Mike Frysinger (UNITED STATES)

Message: 68086   

 

like Robin said, only one device can be the master at any one time.  that is simply how SPI works.

QuoteReplyEditDelete

Attachments

    Outcomes