Not operate GPIO in C in Jetson Nano (Developed Board to convert Jetson Nano to Brain-computer interface)


gret.bmp (831.8 KB)

I’m working on turning Jetson Nano into a brain-computer interface. But there is a problem on the C file discrete output in GPIO does not work? SPI protocol works correctly, but the problem is only with the digital output ? Maybe who has experience.
My logic
Take GPIO library for Linux from
$ mkdir build
$ cd build
$ cmake …
$ make
and receive the Static Library - libperiphery.a
To create a dynamic library for .so (static library)
2. gcc -shared -home/pi/Desktop/new_spi/c-periphery-master/src real_time_massive.c
/home/pi/Desktop/new_spi/c-periphery-master/build/libperiphery.a -o
This library should be imported in python script with signal processing (example - via
standard library – ctypes.

We don’t have expereince on this, may other developers help to share experiences.

The problem you are experiencing is due to the fact that the library you are using is basically a kernel driver wrapper, it is going to do what the linux kernel for Tegra allows it to do. For whatever the reason, the kernel struggles to work with some of the pins in a flexible way e.g. now setup as a GPIO output and then some other time as I2C port or whatever. The standard solution for this is to configure the pin that you want to use specifically for the function you want it to perform, say GPIO output, for that you need to generate a configuration file (dts) and then use this to reconfigure the kernel, once the kernel is configured the right way, if the library is well done it should (usually) work. There are lots of articles talking about how to change the kernel device tree etc.

Hi Rubberazer, thank you, for your reply.
I will try do it

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