SPI Communication problem (spidev)

Hello,
I am working on integrating IC880A to my jetson nano dev kit version, but i am having a problem with spi port.
I cannot communicate with IC880A, i did several test and i followed several related topics to the same problem but the same thing.
i tried to change the pinmux configuration using FDT overlay method provided from the R32.7.6 documentation, i tried also FDT and tried to change the /boot/dtb file (but i does not work i don’t know why).
rebuild the kernel (but i did not work, it freeze on the installation screen)
for the spi loop test, using spidev driver it works only after i run the code provided from JETGPIO repos, it does not work also with jetsonio.py tool also.

it seems like i am missing some configuration, i waiting for your responses.

Hi elrezz_00,

Have you referred to the steps shared in Jetson Nano SPI Bus Not Working - #10 by KevinFFF to perform SPI loopback test?
If so, please share the result of the following command on your board.

$ sudo cat /sys/kernel/debug/tegra_pinctrl_reg | grep -i spi
$ sudo cat /sys/kernel/debug/tegra_gpio

hi, yes did follow but no results

these are screens from the commands


i think there is a configuration is missing or something, i think with cnf registers

this is also output from grep -c4 spi1 /sys/kernel/debug/pinctrl/pinctrl-maps
i noticed that there are two function for every spi1 pins



It seems your pins are still used as GPIO.

Please confirm you’ve finished Step 2. Remove GPIO usage of SPI pins correctly.

Or you can try to configure them from pinmux spreadsheet and refer to NVIDIA Jetson Linux Developer Guide : Jetson Module Adaptation and Bring-Up | NVIDIA Docs to apply change.

hello thank you for your reply
what is step2 are you refering to and i did try to configure the pinmux spreadsheet, generate the DTB file and did flash it with ./flash.sh tool but nothing happened

In Jetson Nano SPI Bus Not Working - #10 by KevinFFF.

Please share how did you configure them in pinmux spreadsheet and the detailed steps how did you generate DTB file.

thank you for the clarification but sadly it does not work, as i noticed after the steps in the suggested topic nothing changed for tegra_gpio list values.
can you please explain to me how i can read these values referencing to TRM ?

for the the spreadsheet configuration i did follow the steps provided in Link but i am little confused in step 7 on what does it means by “/” does it means the actual system working on Jetson nano or what ?

also for the step 8, i did use the ./flash.sh method by using all options (-k DTB, -k RP1, without any options but it freezed on configuration) i guess but nothing changed.

Good News,
somehow the trick is worked and the spidevtest program worked, i used the method mentioned in the topic proposed by modifying the source code of dtsi with recommended modification and flash it using ./flash.sh -k RP1 jetson-nano-devkit-qspi-sd mmcblk0p1
and i think the DEFAULT JetsonIO section in extlinux.conf, but sadly still not reading the register values from my IC880A module.
Am i missing another configuration in jetson ? because it worked in RPI3 model B

Good to hear that it seems you’ve managed to get SPI loopback test worked.

It should load according to how you configure in /boot/extlinux/extlinux.conf
Please configure the DTB configured there has been loaded correctly.

it does not work when i tried to add the configured dtb file in extlinux.conf, but the flash.sh method worked since the values of the registers are changed
the problem now is why is my jetson not reading from the IC880A module while it works in rpi3 model b, is there any configuration that i am missing, is there any spi interface limitation or what ?

If you’ve verified the spi looback test, it means that you’ve configured the pin correctly.

To use IC880A LoRa module, I’m not sure if it needs specific driver to get it work.
You can try using spidev_test tool to send data to your module.
For details, please request your vendor for the usage.

understood, thank you for your help !

hello,
it seems that the problem is from the cs pin state, how i change it to active low ?

The problem is solved, the issue is CS pin was configured as active-high while the module work with active-low cs pin
and i did referenced to this topic to change cs pin configuration Link

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.