Skip to content

SPI opens wrong spidev path #216

@pdp7

Description

@pdp7

System info:

current Adafruit_BBIO master on Debian 9.2 image with 4.14.2-ti-r13 kernel

Example:

from Adafruit_BBIO.SPI import SPI

print("SPI(1,0)")
spi = SPI(1,0)
print(spi.xfer2([32, 11, 110, 22, 220]))
spi.close() 

print("SPI(1,1)");
spi = SPI(1,1)
print(spi.xfer2([32, 11, 110, 22, 220]))
spi.close() 

print("SPI(2,0)")
spi = SPI(2,0)
print(spi.xfer2([32, 11, 110, 22, 220]))
spi.close() 

print("SPI(2,1)");
spi = SPI(2,1)
print(spi.xfer2([32, 11, 110, 22, 220]))
spi.close() 

Issue:

  • SPI(1,0) and SPI(2,0) both open /dev/spidev1.0
  • SPI(1,1) and SPI(2,1) both open /dev/spidev1.1
  • However, the actual spidev devices that exist are:
    • /dev/spidev0.0
    • /dev/spidev0.1
    • /dev/spidev1.0
    • /dev/spidev1.1
  • These are the /sys/ entries:
/sys/devices/platform/ocp/48030000.spi/spi_master/spi0/spi0.0/spidev/spidev0.0/dev
/sys/devices/platform/ocp/48030000.spi/spi_master/spi0/spi0.1/spidev/spidev0.1/dev
/sys/devices/platform/ocp/481a0000.spi/spi_master/spi1/spi1.0/spidev/spidev1.0/dev
/sys/devices/platform/ocp/481a0000.spi/spi_master/spi1/spi1.1/spidev/spidev1.1/dev

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy