Hi!
I’m very new to toradex products I I’m trying for almost a month to enable the SPI interface on my colibri vf61 module running angstrom. Can someone help me with this please?
Hi @lorenco.santos!
Assuming you’re using Linux and want to use spidev, you must enable spidev in the device tree. You can see in the device tree file that the spidev node is disabled ( status = "disabled"
). By default, the device tree enables only the MCP2515 CAN IC that’s present in some boards.
All you have to do is disable the MCP2515 node (change it to status = "disabled"
) and enable the spidev node (change to status = "okay"
). Then recompile and reflash the device tree. spidev should be available on Linux.
hi @lorenco.santos and welcome to the Toradex Community!
Could you provide the version of the hardware and software of your module?
For enabling SPI, please have a look here.
Best regards,
Jaski
Hi @jaski.tx and @gustavo.tx ! Thank you for this answers. In fact I understand that the method is simple and I just need to edit the device tree file then recompile and reflash it. The problem is that I don’t know how to do this procedure. Where the device tree file is to be modifiedy and how to recompile and reflash… Can you help me with this please or tell me where to find a tutorial?
Thanks a lot and best regards
Please read the following article to learn how to compile the device tree. The file need to changed is already provided in the Answer above.
To flash the module, please follow the instructions on this site.
Best regards,
Jaski
Hi @jaski.tx ! Thank you!
I followed the steps and generate a usb stick to update the u-boot.
I stopped the autoboot and tried the following code but didn’t work
Colibri VFxx # run setupdate
...
Colibri VFxx # run update
...
So i tried this:
Colibri VFxx # nand erase.chip
Colibri VFxx # run setupdate
Colibri VFxx # run create_bcb
Colibri VFxx # cfgblock create
Is the module an IT version? [y/N] y
Enter the module version (e.g. V1.1B): V1.1B
Enter module serial number: 04815386
Toradex config block successfully written
Colibri VFxx # run update
...
But didn’t work again. So the NAND was erased and I cant boot the Colibri.
I’m trying to recover it. When I run imx_uart.exe --no-rtscts COM8: .\vybrid_uboot.conf I only get the message “starting associating phase” and nothing occurs.
What can I do??
I only get this message
Colibri VF rootfs detected
Put the module in recovery mode and press [ENTER]…
config file <vf_flash/vybrid_usb_work.conf>
parse vf_flash/vybrid_usb_work.conf
starting associating phase..........
magic missmatch, response was 0x00000000
Did you put the module in recovery mode by shortening the pads on the module and powering it on afterwards as described in section 6 of the datasheet.
Moreover you need to make sure that don’t have console connection open to the module, since the recovery is done over the same connection.
Once the command /update.sh -d /dev/ttyUSBx
is launched successfully, you can connect launch the console. You should get similar output to this after entering the command:
config file <vf_flash//vybrid_usb_work.conf>
parse vf_flash//vybrid_usb_work.conf
starting associating phase
association phase succeeded, response was 0x23454523
HAB security state: development mode (0x56787856)
== work item
filename colibri-vf_bin/u-boot.imx
load_size 0 bytes
load_addr 0x00000000
dcd 1
clear_dcd 0
plug 1
jump_mode 2
jump_addr 0x00000000
== end work item
No dcd table, barker=402000d1
loading binary file(colibri-vf_bin/u-boot.imx) to 3f4074e8, skip=0, fsize=73b18 type=aa
<<<473880, 473880 bytes>>>
succeeded (status 0x88888888)
jumping to 0x3f4078e8
j4 in err=0, last_trans=4 0d 0a 0d 0a
Hi @jaski.tx !
I actually got this screen now
Colibri VF rootfs detected
Put the module in recovery mode and press [ENTER]...
config file <vf_flash/vybrid_usb_work.conf>
parse vf_flash/vybrid_usb_work.conf
starting associating phase
association phase succeeded, response was 0x23454523
HAB security state: development mode (0x56787856)
== work item
filename colibri-vf_bin/u-boot.imx
load_size 0 bytes
load_addr 0x00000000
dcd 1
clear_dcd 0
plug 1
jump_mode 2
jump_addr 0x00000000
== end work item
No dcd table, barker=402000d1
loading binary file(colibri-vf_bin/u-boot.imx) to 3f4074e8, skip=0, fsize=73b18 type=aa
<<<473880, 473880 bytes>>>
It gets stuck on this last line and don’t show any succeeded message.
I’m running this on a linux machine over ssh. Is this a problem? I need to operate the host machine directly without ssh?
Thanks a lot! Best regards
Hi @jaski.tx !!
Finally I got this working. It was a problem with the ftdi usb_uart adapter.
I updated the uboot and the kernel to enable the SPI. It seems ok
The only las this is that I’m getting 2 FAIL messages at boot:
This one
[ OK ] Mounted Temporary Directory.
[ 6.421632] systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
[ 6.459509] systemd[1]: Failed to start Load Kernel Modules.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
[ 6.498875] systemd[1]: systemd-modules-load.service: Unit entered failed state.
[ 6.520313] systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
[ 6.546608] systemd[1]: Started Setup Virtual Console.
[ OK ] Started Setup Virtual Console.
And this one
[ OK ] Started Save/Restore Sound Card State.
[FAILED] Failed to start Load default USB gadget schema g1.schema.
See 'systemctl status usbg.service' for details.
Starting Network Service...
[ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
What can I do about this?
Best regards
Did you create a custom image? If yes, then you need also to deploy the kernel modules to the module.
Could you share the kernel .config in this case too? Thanks.