Home/Support/Support Forum/Troubleshooting SPI setup for Digi ME 9210
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Troubleshooting SPI setup for Digi ME 9210

0 votes
I'm trying to get started with the Digi ME 9210 to do high-speed SPI reads and push them out over the network. I'm having a little problem understanding the documentation coming at this cold as my first embedded Linux work; I was wondering if people could correct my misconceptions, or even point me at a "Configuring an SPI device for dummies" walkthrough.

1) I've gotten a little turned around about what all needs to be done to enable SPI communication. I've set up a kernel project in DigiESP where I've configured SystemType.NS9xxxImplementations.SPIPort, DeviceDrivers.SPISupport, DeviceDrivers.SPISupport.Digins921xSPPIController. Am I missing anything there?

2) I'm using the Digi Connect ME/W1ME development board; I've thrown all the microswitches on SW1 from the RS232 side to the GPIO side (e.g. IO1 instead of DCD, IO2 instead of CTS, etc). Is that wrong?

2) Once I have the kernel loaded into the 9210, I can SSH in and look at /dev. There's no /dev/spidevB.D, as described in the spidev.h file. There is a /dev/gpio/2 and /dev/gpio/9. Is /dev/spidevB.D supposed to be automatically generated? Or am I supposed to set up /dev/spidevB.d myself? Or am I supposed to be using the /dev/gpio instead?

3) Looking at the hardware layout, I'm having real problems figuring out which lines are the SPI lines. Page 34 of Connect_ME_Wi-ME_Hardware_Reference gives that chip select is GPIO[0], but other parts of the documentation indicate that GPIO is lines 1-9 i.e. there is no line 0. Is this just a difference between zero-indexing and one-indexing? Or am I looking at the wrong part of the documentation to figure out how to use P7? The Connect_ME_Wi-ME_Devboard_Schematic pointedly does not have a pinout for P7 (GPIO Port)

As I said, this is my first time with embedded Linux, so I'd appreciate even links to tutorials, which my weak google-fu is not uncovering. Thank you!
asked Sep 20, 2016 in Embedded Devices by gemmer New to the Community (5 points)

Please log in or register to answer this question.

2 Answers

+1 vote
 
Best answer
Through bumbling around, I appear to have hit upon the solutions. In order:

1) I now have DeviceDrivers.SPISupport.Digins91xSPIController and DeviceDrivers.SPIsupport.UsermodeSPIdevicedriversupport as well as SystemType.NS9xxxImplementations.SPIPort enabled.

2) All five microswitches are thrown to the GPIO side. This does not appear to be relevant.

2) /dev/spidev is automatically generated once two kernels are added. Modprobe spidev and spi_ns921x appears to correctly trigger /dev/spidev creation; I've added those lines to a script in /etc/init.d

3) There is of course a pinout for P7, as I would have realized if I'd looked at the page count. Anyway, GPIO-1 is GPIO[0], GPIO-2 is GPIO[1], etc. SPI is more conveniently accessed using P3, with pin 7 being MISO, pin 8 being MOSI, pin 9 being SCK, and pin 13 being C/S
answered Sep 27, 2016 by gemmer New to the Community (5 points)
selected Sep 28, 2016 by gemmer
I was having a similar problem as in 2 with the ConnectCore6 after loading the kernel. Thanks for the tip on modprobe spidev.
0 votes
In particular, I've found this link (http://www.digi.com/support/forum/11978/digi-connect-me-9210-spi) which _seems_ to talk about what I'm interested in, but the links have expired, and they make reference to an example SPI project. Digi ESP does not appear to have that example anymore.
answered Sep 21, 2016 by gemmer New to the Community (5 points)
...