I was unsuccessful in operating the GPIOs from my ssh terminal. I am sure you are aware, the pin # and GPIO # are different on the raspberry pi. From my understanding, pinctrl requires GPIO # and I tried your method of pincrtl set and get on GPIO 14 (pin 8) and GPIO 15 (pin 10) without any luck.You can check the drive logic on the pins using pinctrl (or raspi-gpio - the syntax is the same). With a loopback cable between pins 8 & 10:Code:
pinctrl set 8 ippinctrl set 10 op dhpinctrl get 8 # Should show it as an input with a high level (or level 1 if using raspi-gpio)pinctrl set 10 op dlpinctrl get 8 # Should show it as an input with a low/0 levelpinctrl set 10 ippinctrl set 8 op dhpinctrl get 10 # Should show it as an input with a high/1 levelpinctrl set 8 op dlpinctrl get 10 # Should show it as an input with a low/0 level
I went on further by attaching an oscilloscope probe to pin 8 (and oscilloscope ground to rpi ground) and tried the following command:
pinctrl set 14 op pn dh
... and the voltage remained at 0
I tried the same thing with pin 16 (GPIO 23) and got the same results.
I made sure my oscilloscope configurations were correct by testing pin 2 voltage and I was able to see 5V on the screen.
Before I write off my rpi, could it be a device tree problem or the fact that I'm using raspberry pi os lite (latest version) on rpi zero 2 W?
Statistics: Posted by medp1991 — Sun Feb 04, 2024 12:42 am