Looking for SPI Salve configuration and sample code for testing on BBB with kernel 3.8.13

Hi ALL,

Please provide your support on this BBB SPI slave configuration and sample code for kernel 3.8.13 .

I have done Master mode communication with slave memory device, but i want to communication with two BBB. one is mater and another is salve device.

I guess present kernel doesn’t support slave mode but i don’t know kernel modification to change master to salve mode.

Please provide your valuable inputs to me.

Thank you in advance…

Regards
Ravi

Hi Ravi,

My best advise is to look at Starterware example code for McSPI. This will give you some idea on how to configure and use the McSPI at the register level. When that is familiar, then reading through the /drivers/dma/edma.c code will be easier to understand. You will notice that the McSPI is configures in slave mode by default and then the driver configures it to master mode. The complete SPI framework in Linux is based on master mode and there is as far an I know no slave mode framework. I am looking at using McSPI with EDMA so that packets received by the McSPI are stored in a ping-pong buffer and then using a callback, process that buffer. At the moment this is WIP and I’m hoping with some help from others on the mailing list I will get this done shortly.

Regards,
John

Hi John,

Thank you for your valuable information.

I will try your suggestion but still i have to learn kernel driver development.

Please share the slave sample code whenever it completes.

Regards,
Ravi