fprime-community/fprime-workshop-led-blinker

Failed to open GPIO

Closed this issue · 2 comments

The tutorial leads the LED to blink and connect to GPIO 13. After configuration and gds, the GPIO fails to open everytime and displays an error on GPIO 6. The RateGroups also display warnings and the parameter file fails to be read.

image

image

I was unable to find the article that helped me figure this out, but the addressing for the GPIO pins changed.

Fprime is using sysfs to open the GPIO pins. Looking in /sys/class/gpio on my Pi4 shows gpiochip512 and gpiochip570.
The new addressing uses these chip### as the base for pin addresses.

As an example, to open pin 6, your deployment xxxTopology.cpp file would have:
bool gpio_success = gpioDriver.open((512+6), Drv::LinuxGpioDriver::GpioDirection::GPIO_OUT);

Thank you so much for the suggestion! It worked!