DSPRelated.com
Forums

SPI Related

Started by msr_...@yahoo.co.in May 7, 2008
Hi This is Srinivas Reddy...

In our application we are using F2812 controller.I want to communicate this controller with two slaves(inclinometer and Gyrometer).So we need to establish communiaction between one master and two slaves.
Actual SPI interface has only one chipselect pin.In case of single master single slave operation we gave output of chipselect pin is low through hardware permanently.Its all about fine.

My doubt is in the case of two slaves we configured one SPI chipselect pin for one slave and one GPIO pin is for second slave.
Is it work for giving two chipselects permanently forced to low by using hardware?
In this how to control the two chipselect pins?

Any one having idea on this please give me a good response,it is very helpfull for me.

Regards
Srinivas Reddy

OMAP35x EVM jump-starts low-power apps
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture: http://www.DSPRelated.com/omap35x
I think you can implement a single master-multiple slave configuration using the F2812 controller.

to do this, I think you must set the pin corresponding to the SPI Chip
Select pin to GPIO. this is to prevent the pin from automatically going
low when you are using the SPI module (I am assuming that you will use
also use the SPI Chip Select pin in the F2812 to control one of the
devices that you have mentioned). Having two slave devices, you will
correspondingly use 2 GPIO pins.

The technique is to send a low signal to the GPIO pin connected to the
slave that you want to access while keeping the other pin at a high
signal. Giving the 2 Chip Select pins a low signal would result
to accessing both slave devices at the same time and might lead to
unpredictable behavior and erroneous data (not mentioning the probable
risk of damaging the controller and the slaves because signals coming from both slave devices might be
sent to the controller at the same time).

You just have to make necessary adjustments on the software code to
ensure that the GPIO pin corresponding to the device that you want to
access is already in low signal (thus activating the device) before you
send any commands to the device to retrieve data..

hope this helps!

- francis =)
----- Original Message ----

From: "m...@yahoo.co.in"
To: c...
Sent: Wednesday, May 7, 2008 4:27:48 PM
Subject: [c28x] SPI Related
Hi This is Srinivas Reddy...

In our application we are using F2812 controller.I want to communicate this controller with two slaves(inclinometer and Gyrometer).So we need to establish communiaction between one master and two slaves.
Actual SPI interface has only one chipselect pin.In case of single master single slave operation we gave output of chipselect pin is low through hardware permanently. Its all about fine.

My doubt is in the case of two slaves we configured one SPI chipselect pin for one slave and one GPIO pin is for second slave.
Is it work for giving two chipselects permanently forced to low by using hardware?
In this how to control the two chipselect pins?

Any one having idea on this please give me a good response,it is very helpfull for me.

Regards
Srinivas Reddy


OMAP35x EVM jump-starts low-power apps
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture: http://www.DSPRelated.com/omap35x