Search code examples
beagleboneblackspiqnx

how can i enable both SPI for beaglebone black in QNX


By default spi0 is available. It works fine.

Now I want both spi port works as dev/spi0 and dev/spi1.

I rebuilt the image after modifying the build file.

#######################################################################
## SPI driver
## SPI 0 ioport 0x48030100 irq 65
## SPI 1 ioport 0x481a0100 irq 125
#######################################################################
display_msg Starting SPI driver...
#  SPI0
#spi-master -d am335x base=0x48030100,irq=65,edma=1,edmairq=529,edmachannel=17
#  SPI1
# spi-master -d am335x base=0x481A0100,irq=125,edma=1,edmairq=555,edmachannel=43
spi-master -d am335x base=0x481A0100,irq=125
spi-master -u1 am335x base=0x48030100,irq=65

However, spi1 does not work. only spi0 appears in the /dev folder


Solution

  • I have figured out my problem.

    I need to disable HDMI in order for dev/spi1 to work. What I did are the following two steps:

    1, change build (bsp-ti-beaglebone-src/src/hardware/startup/boards/beaglebone/build) file in BSP. And rebuild the image

    #######################################################################
    ## SPI driver
    ## SPI 0 ioport 0x48030100 irq 65
    ## SPI 1 ioport 0x481a0100 irq 125
    #######################################################################
    display_msg Starting SPI driver...
    spi-master -u 1 -d am335x base=0x48030100,irq=65
    spi-master -d am335x base=0x481A0100,irq=125
    

    2, disable hdmi by adding the following line in uEnv.txt of the sd card

    optargs=quiet capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
    

    If hdmi is not disabled while enabling spi1, the system crashes.