Arm Community
Site
Search
User
Site
Search
User
Support forums
Architectures and Processors forum
SPI interface
Jump...
Cancel
State
Not Answered
Locked
Locked
Replies
5 replies
Subscribers
349 subscribers
Views
7327 views
Users
0 members are here
Arm9
arm920t
Interface
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
SPI interface
jfor jfor
over 12 years ago
Note: This was originally posted on 10th October 2008 at
http://forums.arm.com
Hi all,
I am using an 180 MHz, 200 MIPS ARM920T. My question is
How can one have an SPI interface to a device(any)?? What are the steps involved??
The O.S used is linux. One thing i noticed is there is no SPI in /dev !!!!! It would be really be helpful if any one can suggest or give any link to solve this.
Thanks,
jfor.
Parents
0
Jacob Bramley
over 12 years ago
Note: This was originally posted on 10th October 2008 at
http://forums.arm.com
Hardware
Firstly, check the manual (or user guide) for the chip you're using. It's very likely that it does have an SPI peripheral on-chip, but it might not. In addition, it's common for peripherals to share I/O pins as most applications only use a small subset of the available peripherals. Thus, even if it has SPI, you may not be able to use it if you're using other peripherals that share the same pins.
If you don't have a hardware SPI peripheral, you can probably still interface with SPI because you can control the I/O pins manually from software; this is known as "bit banging". However, the data rate will probably be lower and you'll get more CPU overhead, especially if you want your device to act as a slave. In addition, it'll take longer to implement and debug the SPI interface if you have to do it all manually.
Linux
It is likely that you
do
have SPI on your chip, but that Linux simply doesn't have a driver for it. In this case, you'll probably have to write your own driver. If you're lucky, there may be one available on the net, but I couldn't tell you where to look.
Also note that Linux may not regard SPI as a device in its own right. It may think of it more as a bus. However, I've never used SPI from Linux so I can't be sure about this. Can anyone be sure of anything in Linux? :-)
Cancel
Vote up
0
Vote down
Cancel
Reply
0
Jacob Bramley
over 12 years ago
Note: This was originally posted on 10th October 2008 at
http://forums.arm.com
Hardware
Firstly, check the manual (or user guide) for the chip you're using. It's very likely that it does have an SPI peripheral on-chip, but it might not. In addition, it's common for peripherals to share I/O pins as most applications only use a small subset of the available peripherals. Thus, even if it has SPI, you may not be able to use it if you're using other peripherals that share the same pins.
If you don't have a hardware SPI peripheral, you can probably still interface with SPI because you can control the I/O pins manually from software; this is known as "bit banging". However, the data rate will probably be lower and you'll get more CPU overhead, especially if you want your device to act as a slave. In addition, it'll take longer to implement and debug the SPI interface if you have to do it all manually.
Linux
It is likely that you
do
have SPI on your chip, but that Linux simply doesn't have a driver for it. In this case, you'll probably have to write your own driver. If you're lucky, there may be one available on the net, but I couldn't tell you where to look.
Also note that Linux may not regard SPI as a device in its own right. It may think of it more as a bus. However, I've never used SPI from Linux so I can't be sure about this. Can anyone be sure of anything in Linux? :-)
Cancel
Vote up
0
Vote down
Cancel
Children
No data