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
5
votes
1 answer

How can I get edge events via GPIO on Linux without a busy-loop?

I'm working an a system with embedded Linux (Kernel 2.6.31). It is a AT91SAM9G20 chip inside, and some of the Pins are forwarded to the outside. Now I want to use them as GPIO Inputs. I read the gpio.txt documentation about using the GPIOs via…
Tom Mekken
  • 1,019
  • 1
  • 12
  • 27
5
votes
2 answers

GPIO IRQ on ARM based Embedded Linux

I'm trying to program an GPIO IRQ on AT91SAM9M10-EKES evaluation board. I successfully registered the IRQ, and the IRQ is working. However, some interrupts are missed. I'm sending 26, and I get only 22. The code: static irqreturn_t…
stdcall
  • 27,613
  • 18
  • 81
  • 125
5
votes
2 answers

Interfacing TFT screen with STM32F446 using display bus interface

I'm trying to understand how to interface a TFT screen module with an STM32F4 chip on a custom PCB. Here is the module and its basic info. To write commands and data to the screen, the ILI9481 driver on the screen module uses the Display Bus…
5
votes
2 answers

Programming GPIO pins on a FINTEK F81866A chipset

I have a Cincoze DE-1000 industrial PC, that features a Fintek F81866A chipset. I have to manage the DIO pins to read the input from a phisical button and to set on/off a LED. I have experience in C++ programming, but not at low/hardware level. On…
Giorgio R
  • 85
  • 1
  • 9
5
votes
1 answer

changing the baud rate of a serial port on a raspberry pi 3

I installed lineage os 14 on raspberry pi 3 I connected a gps module with UART port, however, the baud rate of GPS is 9600 but baud rate of /dev/ttyS0 is 115200 I want to change the baud rate of ttyS0 in order to read GPS data I tried stty…
Daniel.V
  • 2,322
  • 7
  • 28
  • 58
5
votes
3 answers

Push button GPIO.FALLING event getting triggered twice

This is my first attempt at coding a Raspberry Pi and a hardware push button on a breadboard. The program is simple, when a button press is detected, turn on an LED on the breadboard for 1 second. My code seems to work, but strangely every so…
szaske
  • 1,887
  • 22
  • 32
5
votes
1 answer

Trouble getting GPIO pin value in node.js

I've a problem with using node.js for RaspberryPi GPIO Programming. I am using the onoff library. This is my code: var Gpio = require('onoff').Gpio, led = new Gpio(20, 'out'), button = new Gpio(18, 'in', 'both'); button.watch(function (err,…
Jens Laur
  • 53
  • 3
5
votes
1 answer

Why there is `gpio_request` instead of `request_region` in raspberry pi driver?

In the book LDD3, if one driver want to control the pins of CPU, it should call request_region() function to declare the usage of the ports. When I want to implement a simple driver module on my Raspberry Pi, however, that I found in this example…
Douglas Su
  • 3,214
  • 7
  • 29
  • 58
5
votes
2 answers

Shared variable with GPIO callback function with Raspberry

I wrote this simple test program in python to check if something happen when I press a button in my Raspberry Pi: import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BCM) GPIO.setup(24, GPIO.IN, pull_up_down =…
NiBE
  • 857
  • 2
  • 16
  • 39
5
votes
2 answers

TraceBack (most recent call last), and GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) errors

I have been struggling with a script that will turn a Pi's BCM pins 17, 27, and 10 on for 1 second then off for 1 second sequentially 100ish times. When I run the script LED1 will turn on and then it turns off and the program shuts down with this…
Kris
  • 175
  • 1
  • 1
  • 12
5
votes
2 answers

Dump Flash Memory through a single GPIO pin

I'm working with Infineon's XMC4500 Relax Kit and I'm trying to extract the firmware through a single GPIO pin. My very naive idea is to dump one bit at a time through the GPIO pin and somehow "sniff" the data with a logic…
5
votes
3 answers

Notify gpio interrupt to user space from a kernel module

I have a code which detects GPIO interrupt in a kernel module. Now,I am looking for a mechanism to notify user space upon detecting gpio interrupt from kernel module. Any example / code snippet with certain advantages/disadvantages over different…
5
votes
1 answer

How is sysfs updated when a GPIO changes state?

Assume that the gpio X can be exported in sysfs as an input pin, after doing that a directory called gpioX will be created into /sys/class/gpio/. gpioX/ contains few file such as "value" which represents the current state of the gpio X (high or…
b0b0b
  • 134
  • 1
  • 8
5
votes
2 answers

BeagleBone Black Adafruit IO Python library GPIO user permissions

I have a problem with GPIO in Adafruit Python IO library on Debian (from armhf.org). It works as root, but not as regular user. I've added udev rule; KERNEL=="gpio*", SUBSYSTEM=="gpio", ACTION=="add", PROGRAM="/bin/sh -c 'chown -R debian:gpio…
Oleg Antonyan
  • 2,943
  • 3
  • 28
  • 44
5
votes
2 answers

Multiple Sensors on Raspberry Pi GPIO

I am working up a sensor package for my PI. I have already added the TMP102 temperature sensor from Sparkfun. On the GPIO it is powered from pin 1, grounded on pin 6, with pin 3 and 5 handling the serial data. I have written a python script to read…
codingCat
  • 2,396
  • 4
  • 21
  • 27