Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 07-16-2013, 04:47 PM   #1
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, 05:46 PM   #2
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
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
mode &= ~SPI_CS_HI
Old 07-19-2013, 06:00 PM   #3
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.


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 01:44 PM
Problems with dynamic registration of SPI protocol slave devices Brahmsian Linux - Embedded & Single-board computer 1 04-18-2012 01:20 AM
Design of a communication protocol over SPI with master/slave switching xhpohanka Programming 1 11-30-2011 10:34 AM
About use FIQ for SPI slave in device driver. jason222333 Linux - Kernel 4 10-25-2010 02:37 PM
About How to SPI slave keep up master jason222333 Linux - Kernel 0 10-11-2010 08:32 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:16 AM.

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