Skip to first unread message

Kenny Koller

unread,
Nov 3, 2017, 9:51:36 PM11/3/17
to BeagleBoard

At the moment our design connects a UART between the Beaglebone and an STM32F4. I'd like to add support to receive data from the STM32F4 using SPI. It will require receiving frames of at least 64 kB each second so a 1 MHz clock should be adequate. I'm using the 3.8.13 kernel.

Some questions:

Some search results suggested that the SPI driver was a kernel extension but I was unable to find a corresponding spidev.ko in my filesystem or see it listed with lsmod. Does this mean that the device driver has been compiled in to the kernel?

If it has been compiled within the kernel am I correct in thinking that I'll need to rebuild the kernel and adjust the buffer size. I think the default is 4096 and I would like it to be able to hold an entire transaction.

Finally, I'm in the process of verifying the use of SPI0. I've compiled a device tree file (I'm using the one from ADA Fruit) and it seems to load properly:

$ echo ADA-SPI0-01 > /sys/devices/bone_capemgr.9/slots
$ ls /dev/spi*                                        
/dev/spidev1.0  /dev/spidev1.1
 
I downloaded the kernel source and compiled Documentation/spi/spidev_test.c for 3.8.13.

I've jumpered pins 18 and 21 but I'm only seeing zeros:

$ ./spidev_test /dev/spidev1.0
spi mode
: 0
bits per word
: 8
max speed
: 500000 Hz (500 KHz)


00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00 00 00 00 00
00 00

I am not see the SPI pins listed in the pingroups as some posts have suggested:

 cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups  

Is editing uEnv.txt and a reboot required to properly configure things? When I tried adding the overlay to the kernel parameters the device nodes were not created. I modified in the following way:

optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN capemgr.enable_partno=BB-UART5,ADA-SPI0-01 omap_wdt.nowayout=0


Kenny Koller

unread,
Nov 3, 2017, 10:09:55 PM11/3/17
to BeagleBoard
I am reading the SPI docs that came with the kernel source. It looks like this driver only supports being a master and not a slave?

Robert Nelson

unread,
Nov 3, 2017, 10:17:23 PM11/3/17
to Beagle Board
I don't think this got merged, but yeah spi slave support needs some work.


https://lwn.net/Articles/700433/

Regards,

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/ba30c445-6367-468d-bccd-6a9945844729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kenny Koller

unread,
Nov 6, 2017, 3:49:29 PM11/6/17
to BeagleBoard
Thanks for the confirmation and link. I already have a UART connected. Perhaps I'll use this to make requests to the master (Beaglebone) to read a frame.

Any thoughts as to why the device files/nodes are created for SPI but the pins aren't listed in pingroups?
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages