Talk:BeagleBone Black Enable SPIDEV

From eLinux.org
Jump to: navigation, search

Contents

Thread titleRepliesLast modified
Clock pins direction011:24, 25 April 2018
Bad File Descriptor using SPIDEV on Beaglebone011:07, 1 March 2016

Clock pins direction

AFAIK, Linux supports SPI in master mode only. In other words, it drives the clock signal. So, shouldn't the clock pins be outputs? For example:

   0x190 0x33      /* mcasp0_aclkx.spi1_sclk, OUTPUT_PULLUP | MODE3 */
   0x150 0x30  /* spi0_sclk, OUTPUT_PULLUP | MODE0 */
11:24, 25 April 2018

Bad File Descriptor using SPIDEV on Beaglebone

Hi! So I'm noticing that when I change the length of the buffer in my spi_ioc_transfer struct that something is causing my file to close and I'm getting a "bad file descriptor" error when I try to send additional packets through using SPIDEV.

Anyone else having this issue? It appears to me that the "bad file descriptor" is caused when the file is closed from the outside.. I'm guessing that it's being closed when the length of the buffer is changed. I'm not sure what I need to do to fix this problem. Any thoughts would be much appreciated!

Thank you!

11:07, 1 March 2016