LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 07-16-2013, 05:47 PM   #1
zhangz64
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Rep: Reputation: Disabled
make the Slave select high and low alternately in Spi


I have written a SPI driver using beagle board xM for SPI slave devices.Can anybody help me out
how to make chipselect high and low alternately to communicate with other.
SPI slave in user application.I am already using the same test application
spidev_test.c from SPI Documentation given by linux2.6.32.2

Thank you.
 
Old 07-19-2013, 06:46 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,154

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
Since you have, as yet, no replies, even though I've never used SPI, etc., as suggestion:

The spidev.h file defines SPI_CS_HI, so I'd guess you could do something like
Code:
mode &= ~SPI_CS_HI
 
Old 07-19-2013, 07:00 PM   #3
zhangz64
LQ Newbie
 
Registered: Jul 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi PTrenholme Thank you for you reply.

I configured a GPIO as a output to manually control the ss.

It works so far.

But i guess it has some disadvantages , like speed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slave Support for SPI in kernel NishaK Linux - Newbie 0 04-26-2013 02:44 PM
Problems with dynamic registration of SPI protocol slave devices Brahmsian Linux - Embedded & Single-board computer 1 04-18-2012 02:20 AM
Design of a communication protocol over SPI with master/slave switching xhpohanka Programming 1 11-30-2011 11:34 AM
About use FIQ for SPI slave in device driver. jason222333 Linux - Kernel 4 10-25-2010 03:37 PM
About How to SPI slave keep up master jason222333 Linux - Kernel 0 10-11-2010 09:32 PM


All times are GMT -5. The time now is 02:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration