GPIO on UP Squared - its terrible!

aanistratenko New Member Posts: 8

I need to use GPIO on UP Squared with Ubuntu 22 server - reed many sources and try any days without success(((

I have problem with pin for LED:
-gpioset gpiochip4 27=0 or 1 - turn on led onle for amount 0.5sec
-doesn't matter led connect to 3.3 or gnd.
-try some modes "push-pull|open-drain"
-try without led only with oscilloscope for little current - only one pulse
How to turn on GPIO for a long time or for pulse with my duration?

Documentation is very bad - no one workable instuctions!
Have no docs for Ubuntu 22, dont need to change core, because driver pincrtl is present in default
2 No any information for HAT GPIO parameters in BIOS!
Is there a need to change them?
I set up in BIOS Output mode, but in gpioinfo it still as Input!
No information that driver pincrtl in in core.
No samples for use pincrtl.
Sample with Bash "echo 26 > /sys/class/gpio/export" - dont work!
"/sys/class/gpio# ls" - dont include simple GPIO, only chips
"export gpiochip0 gpiochip779 gpiochip822 gpiochip869 gpiochip946 unexport"
Pionouts are bad - for example pin 13:

  • in table pin13-up pinout gpio4-linux gpio 27
  • in BIOS pin13-gpio5
  • What is correct?


  • aanistratenko
    aanistratenko New Member Posts: 8

    Also I have problem with return back ports to functional mode - pins 3,5 dont return to i2c after reboot.
    In docs i see "Warning: The current pinctrl driver implementation does not allow to restore a pin in function mode (e.g. UART) once it has been already switched to GPIO mode until the operating system is rebooted" - but it dont work.
    How I can return to i2c mode?

  • aanistratenko
    aanistratenko New Member Posts: 8

    I made some experiments and saw that i2c dont work after install package gpiod !
    But after remove package i2c still dint work(((
    What tools can i use with gpio and i2c simultaneously ?

  • ShaunaB1
    ShaunaB1 New Member Posts: 1

    To use GPIO on UP Squared with Ubuntu 22, follow these steps:

    1. Check Documentation: Although documentation is scarce, explore the UP Squared Wiki and Pinout pages for any available information.
    2. BIOS Configuration: Set GPIO pins in BIOS to act as output. Ensure the pin direction is correctly configured. Can dog eat
    3. Bash Commands: Use commands like echo 26 > /sys/class/gpio/export to enable GPIO pins. Verify the exported pins using /sys/class/gpio# ls.
    4. Verify Pin Numbers: Confirm the correct pin numbers between the UP Squared Wiki and BIOS settings.
Privacy Policy