Questions tagged [gpio]

General Purpose Input/Output (GPIO) is a generic pin on a chip whose behavior (including whether it is an input or output pin) can be controlled (programmed) by the user at run time.

GPIO pins have no special purpose defined, and go unused by default. The idea is that sometimes the system integrator building a full system that uses the chip might find it useful to have a handful of additional digital control lines, and having these available from the chip can save the hassle of having to arrange additional circuitry to provide them. For example, the Realtek ALC260 chips (audio codec) have 8 GPIO pins, which go unused by default. Some system integrators (Acer Inc. laptops) employing the ALC260 use the first GPIO (GPIO0) to turn on the amplifier used for the laptop's internal speakers and external headphone jack.

Further information and deeper analysis: Opus on wikipedia

1751 questions
3
votes
1 answer

Failed to wakeup Linux with GPIO keys

I am working on an embedded Linux kernel v5.10.24, where power management is enabled, and there is a GPIO to wake system up when it is in standby/SDR mode. But with my testing, the GPIO cannot wake up the system. Here is the DTS of the GPIO…
wangt13
  • 959
  • 7
  • 17
3
votes
0 answers

Running Linux gpioget on pin connected to logic HIGH voltage always reads zero

Working with the QSXP-M181 SOM from Ka-ro Electronics we have a line tied to GPIO bank 2 pin 18 which is physical pin 41 on the device (pin 50 to the Linux kernel). It has been verified with a multi-meter that this pin is correctly attached to…
3
votes
3 answers

Built-in led won't turn on STM32F303RE Nucleo board

I am trying to turn the led (LD2 in schematic) inside the nucleo board on using only registers with the STM32CubeIDE. The user manual states the following addresses for the clock, mode and data registers: Led pin: PA5 Address of the Clock control…
CKiamy
  • 51
  • 3
3
votes
0 answers

Jetson Nano Not Detecting Grove Sensors Using Grove Base HAT

I recently got started trying to connect a Grove PIR Motion Sensor & Grove NFC Reader to my Jetson Nano, using the Grove Base HAT: I followed these two guides to get the necessary libraries set up in order to interface with the Grove…
Sam Skinner
  • 376
  • 3
  • 12
3
votes
1 answer

Proper way to manipulate registers (PUT32 vs GPIO->ODR)

I'm learning how to use microcontrollers without a bunch of abstractions. I've read somewhere that it's better to use PUT32() and GET32() instead of volatile pointers and stuff. Why is that? With a basic pin wiggle "benchmark," the performance of…
crossroad
  • 131
  • 2
3
votes
2 answers

PyCharm IDE can't find RPI.GPIO module

On the advice of TheZadok42 I installed PyCharm 2020.3.3 on both my Windows machine and my Raspberry PI 4. I have also bought and installed the FreeNove Ultimate Starter Kit for Raspberry on both. The first tutorial lesson is Blink.py, which just…
3
votes
3 answers

Python rpi GPIO output control based on GPIO input and time of day

I'm trying to write a little script to control two raspberry pi's gpio output pins based on two factors: the state of GPIO.input.17 and the time of day. I would like gpio.output.23 and gpio.output.25 to be low when gpio.input.17 is low. I would like…
chuckrocks
  • 33
  • 5
3
votes
1 answer

Docker Django GPIO Rasbian buster

I am a complete beginner at Docker, so please do easy on me. I am trying to deploy a Django project in a Docker container on a Raspberry Pi 3B, but I am running into a problem accessing the GPIO ports. Every time I try to initialise Docker with…
Radial
  • 342
  • 1
  • 4
  • 14
3
votes
1 answer

Can't access gpio line with gpiod_line_request_output() on Adafruit FT232H

I am using an Adafruit Ft232H breakout to add GPIO ports to my Linux pc. Although I had some success to flash a led with libftdi and bitbang mode, I don't have the same luck with libgpiod because gpiod_line_request_output is failing. Some gpio…
Petross404
  • 177
  • 1
  • 12
3
votes
3 answers

Raspberry pi 4 controle GPIO with java

I want to controle a 16*2 lcd display on my raspberry pi4 with java. The problem is that Pi4J - the solution to modify the gpios with java is not updated to pi4. Is there another solution? This error occures when I start the…
John A.
  • 31
  • 2
3
votes
2 answers

libgpiod API usage (Linux shared libraries)

Does anyone have any experience with the libgpiod API? I have installed it on my linux platform but am unable to call its library functions. I installed by: git clone git://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git cd…
Bastinoboy
  • 63
  • 1
  • 4
3
votes
1 answer

Control LED brightness by using MCP3002 Analog to Digital Converter

I'm trying to control a list of PWMLED brightness by using MCP3002 ADC and Potentiometer. My issue is when I run my script everything is functioning as expected, except the potentiometer that is connected to MCP3002 ADC, it won't adjust the…
MrYosuko
  • 47
  • 7
3
votes
0 answers

FT232H user space GPIO device

I have a FT232H breakout board by Adafruit. I'd like for that device to appear in Ubuntu as a user space GPIO device so I can use it with libgpiod. I've found these patches to the ftdi_sio Kernel driver that seem to say they enable this. Looking at…
Ryan
  • 6,432
  • 7
  • 40
  • 54
3
votes
3 answers

CORTEX_M4_0: error occurs in GPIO code in debug mode

I am having this error whenever I try to debug my program using Code Composer Studio V 9.1.0 : CORTEX_M4_0: Trouble Reading Memory Block at 0x400043fc on Page 0 of Length 0x4: Debug Port error occurred I am using a Texas Instruments TM4C123GXL…
Ryan
  • 41
  • 7
3
votes
1 answer

`ioctl` to read and write GPIO: invalid argument

I'm imitating the gpio-hammer example in Linux source code. I'm using Raspberry Pi 3B+ and want an LED to blink. Here's what I do: #include #include #include #include #include #include…