-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Do you see any log messages about failing to open the GPIO pin? You may need to run the flight software as root to have GPIO pin permissions |
Beta Was this translation helpful? Give feedback.
-
I wrote an answer on an issue in the led-blinker repository https://github.com/fprime-community/fprime-workshop-led-blinker/issues/67 You might have a GPIO open error further up in the log where the component is initialized. If this is the case, this answer should help you. As an example, to open pin 6, your deployment xxxTopology.cpp file would have: The LinuxGpioDriver might need an update to accommodate the new sysfs or the tutorial can be updated to reflect the pin addressing change. |
Beta Was this translation helpful? Give feedback.
I wrote an answer on an issue in the led-blinker repository https://github.com/fprime-community/fprime-workshop-led-blinker/issues/67
You might have a GPIO open error further up in the log where the component is initialized. If this is the case, this answer should help you.
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);
The LinuxGpioDriver might need an update to accommodate the new …