
Shin
Members-
Content Count
7 -
Joined
-
Last visited
Community Reputation
0 Neutral-
Hello @tooz Is it possible to combine SPI/I2C control with python-periphery and GPIO control with console? GPIO is assigned to the CE pin of SPI. Therefore, I need to set up the order of SPI reading and GPIO control, and I want to control SPI and GPIO with the same software.
- 6 replies
-
- tinkerboard2s
- gpio
-
(and 1 more)
Tagged with:
-
hello @tooz I installed WiringPi using the method you provided. However, the problem was not resolved. I have already installed the latest Linux(debian 11 v.3.0.18 kernel 5.10). linaro@linaro-alip:/usr/local/share/gpio_lib_c_rk3399$ sudo ./build clean wiringPi: [Clean] DevLib: [Clean] gpio: [Clean] Examples: [Clean] Gertboard: [Clean] PiFace: [Clean] Quick2Wire: [Clean] PiGlow: [Clean] linaro@linaro-alip:/usr/local/share/gpio_lib_c_rk3399$ sudo ./build uninstall wiringPi: [UnInstall] DevLib: [UnInstall] gpio: [UnInstall] linaro@linaro-alip:/usr/local/share/gpio_lib_c_rk3399$ sudo ./build wiringPi Build script ===================== WiringPi Library [UnInstall] Rockchip Rockchip [Compile] wiringPi.c [Compile] wiringTB.c [Compile] wiringSerial.c [Compile] wiringShift.c [Compile] piHiPri.c [Compile] piThread.c [Compile] wiringPiSPI.c [Compile] wiringPiI2C.c [Compile] softPwm.c [Compile] softTone.c [Compile] mcp23008.c [Compile] mcp23016.c [Compile] mcp23017.c [Compile] mcp23s08.c [Compile] mcp23s17.c [Compile] sr595.c [Compile] pcf8574.c [Compile] pcf8591.c [Compile] mcp3002.c [Compile] mcp3004.c [Compile] mcp4802.c [Compile] mcp3422.c [Compile] max31855.c [Compile] max5322.c [Compile] sn3218.c [Compile] drcSerial.c [Compile] wpiExtensions.c [Link (Dynamic)] [Install Headers] [Install Dynamic Lib] WiringPi Devices Library [UnInstall] [Compile] ds1302.c [Compile] maxdetect.c [Compile] piNes.c [Compile] gertboard.c [Compile] piFace.c [Compile] lcd128x64.c [Compile] lcd.c [Compile] piGlow.c [Link (Dynamic)] [Install Headers] [Install Dynamic Lib] GPIO Utility [Compile] gpio.c [Compile] readall.c [Compile] pins.c [Link] [Install] All Done. NOTE: To compile programs with wiringPi, you need to add: -lwiringPi to your compile line(s) To use the Gertboard, MaxDetect, etc. code (the devLib), you need to also add: -lwiringPiDev to your compile line(s). linaro@linaro-alip:/usr/local/share/gpio_lib_c_rk3399$ cd /home/linaro/Desktop/CSampleCode/spiSpeed/ linaro@linaro-alip:~/Desktop/CSampleCode/spiSpeed$ sudo gcc -o spiSpeed spiSpeed.c -lwiringPi -lpthread linaro@linaro-alip:~/Desktop/CSampleCode/spiSpeed$ ls /dev/spidev* /dev/spidev1.0 /dev/spidev5.0 linaro@linaro-alip:~/Desktop/CSampleCode/spiSpeed$ sudo ./spiSpeed +-------+--------+----------+----------+-----------+------------+ | MHz | Size | mS/Trans | TpS | Mb/Sec | Latency mS | +-------+--------+----------+----------+-----------+------------+ Unable to open SPI device: No such file or directory
-
hello @tooz , I have little knowledge of sysfs. Do you have sample source code? I need GPIO, I2C and SPI.
- 6 replies
-
- tinkerboard2s
- gpio
-
(and 1 more)
Tagged with:
-
Hi, I am following the URL below to start up SPI with WiringPi library. I can see spidev in /dev on my TinkerBoard2S. Therefore, I believe the spi settings are reflected at boot time. linaro@linaro-alip:~/Desktop/CSampleCode/spiSpeed$ ls /dev/spidev* /dev/spidev1.0 /dev/spidev5.0 When I run the sample code, I get an error "Unble to open SPI device". Can you please tell me the cause and countermeasure? linaro@linaro-alip:~$ cd /home/linaro/Desktop/CSampleCode/spiSpeed/ linaro@linaro-alip:~/Desktop/CSampleCode/spiSpeed$ sudo ./spiSpeed +-------+--------+----------+----------+-----------+------------+ | MHz | Size | mS/Trans | TpS | Mb/Sec | Latency mS | +-------+--------+----------+----------+-----------+------------+ Unable to open SPI device: No such file or directory Board:TinkerBoard2S Linux version:4.4.194 Best regards,
-
Thank you for your reply, @tooz . I don't think this method allows for complex processing like in C programming. I would like to use GPIOs not only for turning them on and off, but also for various types of communication. Is there any way to control GPIO faster in C or Python (or other languages)?
- 6 replies
-
- tinkerboard2s
- gpio
-
(and 1 more)
Tagged with:
-
Hi, I compared GPIO access speed between RaspberryPi4 and TinkerBoard2S. After setting GPIO1 to HIGH, I processed GPIO2 to LOW immediately. I observed the waveforms with an oscilloscope. As a result, TinkerBoard2S was much slower. I think TinkerBoard2S has better performance, but why? Please let me know if there is a way to access GPIO faster with TinkerBoard2S. The software are as follows. RaspberryPi4 ・OS RaspberryPiOS 64bit ・C language with BCM2835 library TinkerBoard2S ・OS Deabian 64bit ・C language with WiringPi library best regards,
- 6 replies
-
- tinkerboard2s
- gpio
-
(and 1 more)
Tagged with: