ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Rebuilding kernel for VOXL 2 Mini to swap J10 to SPI, M0188 2 Lepton configuration

    Ask your questions right here!
    voxl 2 mini kernel m0188 lepton camera
    1
    3
    19
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Haxerus
      last edited by

      Hello,

      I am trying to get the M0188 board working with the VOXL 2 Mini to control 2 Leptons but I've hit a roadblock getting the J10 port to switch from UART to SPI. I've rebuilt the kernel with the following modifications to the DTS files on meta-voxl2-bsp.

      m0104-kona.dtsi:

      • added spi14 = &qupv3_se14_spi

      m0104-modalai-qupv3.dtsi:

      • changed status of &qupv3_se14_2uart to "disabled"
      • changed status of &qupv3_se14_spi to "ok"
      • added the following to &qupv3_se14_spi
      spidev@0 {
          compatible = "spidev";
          reg = <0>;
          spi-max-frequency = <50000000>;
      };
      

      I am not sure these are the only modifications required as I am not familiar with Linux kernel development, I just followed the documentation and commit history in meta-voxl2-bsp.

      After building and loading the kernel I run voxl-gpio -w 67 1 as mentioned here. When I run ls /dev/ I am able to see /dev/spidev14.0. I tried testing it with this tool and a loopback cable that connects MISO to MOSI but it just hangs. That tool works fine with spidev0.0.

      I modified voxl-lepton-server to use the 2nd I2C channel for Lepton #2. I then tried to change /etc/modalai/voxl-lepton-server.conf to use SPI bus id 14 but it caused voxl-lepton-server to hang, seemingly not getting any data from the SPI port.

      Any guidance on how to properly use J10 as an SPI port and how to get voxl-lepton-server to read from it would be greatly appreciated.

      H 1 Reply Last reply Reply Quote 0
      • H
        Haxerus @Haxerus
        last edited by

        @Alex-Kushleyev @modaltb If you have any insights that would be appreciated. Thanks.

        H 1 Reply Last reply Reply Quote 0
        • H
          Haxerus @Haxerus
          last edited by

          Ok, I was actually able to get J10 to work as an SPI port by following this thread. I was also able to get video feed from the lepton on slot #2 on the M0188 with this approach. I still don't know if using the devcfg.mbn file from SDK ver 1.0.0 is really the "proper" thing to do, it feels like it could lead to issues down the road. An official answer regarding J10 in SPI mode would be greatly appreciated.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB | Contributors