Rebuilding kernel for VOXL 2 Mini to swap J10 to SPI, M0188 2 Lepton configuration
-
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_2uartto"disabled" - changed status of
&qupv3_se14_spito"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 1as mentioned here. When I runls /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 withspidev0.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.confto 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.
- added
-
@Alex-Kushleyev @modaltb If you have any insights that would be appreciated. Thanks.
-
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.