Having issues with SPI on IMx7

Hi, i am using toradex boards with the Navio2 Board connected on the x20 pins trying to study the sensor readings times for a project in my university. To do that im basing myself on a code developed for people using Navio2 with Raspberry Pi, and for the Inertial Measurement Units code theres a device called spidev for the communication:

int spi_fd = ::open("/dev/spidev0.1", O_RDWR);

taken from GitHub - emlid/Navio2: C++ and Python sensor examples for developers

I would like to know whats the correspondent on the toradex boards if theres any

Try with:

ls /dev | grep spi

I am using the Aster 1.1B as the carrier board and the Colibri imx7D 512MB v1.1C as the module. As far as software goes the only information i was able to extract was th LXPanel version which is 0.8.2

This is the result from the second command you informed after typing the first one:

Sorry for bothering but I typed in this command on the terminal and it executed but gave no response so what is it doing if I may ask so

You can find the BSP (Software) Information with the following command: cat /etc/issue.
The second command about dmesg log shows that spidev is not activated. So you need to enable it following the guide provided in the comment above.


Does this mean that i got to clone the repository branch associated with the linux kernel image version of 2.7?

Exactly you need to checkout the branch toradex_4.1-2.0.x-imx as described here.

Sorry to bother again but I am getting this error while trying to flash the kernel to my usb drive

any chance you know what this is about

I also tried copying my new dtb file to the /media/mmcblk0p1 and rebooting but that didnt work either, when i type in dmesg | grep spi the results are the same link text

How did you flash the new device tree? I flashed the same device tree on my side and i got this:

[    1.213957] spi_imx 30840000.ecspi: probed

I copied my new device tree from my usb to the /media/mmcblk0p1 folder where the old device tree was located, then i rebooted.

But i built this device tree after altering the lines to enable spidev2.0 on /arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx7-colibri-eval-v3.dtsi


I copied my new device tree from my usb to the /media/mmcblk0p1 folder where the old device tree was located, then I rebooted.

This is strange. Could you send the output of df -h and cat /sys/devices/soc0/machine?



Thanks for this Info. IMX7D 512MB has NAND flash, so there is no /media/mmcblk0p1 folder on the module. Actually when you tried to copy the device tree to the folder /media/mmcblk0p1, you copy it to your usb disk or mmc flash card.

If you want to update the device tree on the module with NAND flash, then have to copy the device tree to usb or flash card and do the update procedure, as described here.

Im having some trouble doing that because after i connect the usb with the flashed image and connect the aster carrier board through the usb I dont see the U-boot starting up, what I see is the normal terminal with some linux penguin images on top loading a bunch of stuff and then the system is loaded.

Actually when i connect through minicom to my board and turn it on i can see this :
U-Boot 2016.11-2.7.4+g1b121c6 (Oct 04 2017 - 22:52:51 +0000)

CPU: Freescale i.MX7D rev1.2 996 MHz (running at 792 MHz)
CPU: Extended Commercial temperature grade (-20C to 105C) at 40C
Reset cause: POR
DRAM: 512 MiB
NAND: 512 MiB
*** Warning - bad CRC, using default environment

Video: 640x480x18
In: serial
Out: serial
Err: serial
Model: Toradex Colibri iMX7 Dual 512MB V1.1C, Serial# 02911019
Net: FEC0
Hit any key to stop autoboot: 0

but i try pressing keys on the usb board connected and it doest stop the autoboot, any other way to stop it?

Do you see pinguins on a display (not console output through UART)? This is normal.

Maybe the time to stop the module in uboot is not enough, especially if the module is powered by USB and you need to connect to the console, after connecting the ASTER Board to USB. You can increase the delay by the following command, once linux is booted:

fw_setenv bootdelay 10

I had to disable hardware flow control on minicom to get my keyboard to stop the boot but other than that it worked like a charm thanks a ton!

Perfect. You are welcome. Thanks for the feedback.

Thanks, now the only problem im having is that the sensor that was before acessed by spidev0.1 on the raspberry pi is not giving any answer when i try to acess it through spidev2.0