MSDN Community Forums

Encountering persistent issues with GPIO on Raspberry Pi 4 running Windows IoT Core
JS
Hello everyone,

I'm working on a project involving a Raspberry Pi 4 with Windows IoT Core (Version 10.0.19041.0) and I've been struggling with GPIO functionality for the past few days. I'm trying to control a simple LED using a GPIO pin, but it seems to be intermittently failing.

I'm using the `Windows.Devices.Gpio` namespace and have initialized the controller correctly. However, after a certain period of operation (sometimes minutes, sometimes hours), the pin stops responding. Re-initializing the controller or even rebooting the device sometimes resolves the issue temporarily, but it always returns.

My setup is quite basic: a single GPIO pin configured as output, connected directly to an LED with a current-limiting resistor. I've tested the hardware itself, and it works fine with other operating systems like Raspberry Pi OS.

Has anyone else experienced similar persistent GPIO issues with Windows IoT Core on Raspberry Pi 4? Are there any known bugs or common pitfalls I might be overlooking? Any advice on debugging this further would be greatly appreciated.
MK
Hi JunoSmith,

I've encountered something similar in the past, though not always on the Pi 4 specifically. One thing that sometimes helps is ensuring your application is running with sufficient privileges, although for GPIO this is usually handled by the OS service. Are you running your app as a UWP app or a desktop application compiled for IoT?

Also, double-check the pin numbering scheme you're using. There are different schemes (like physical vs. GPIO numbering), and sometimes a mismatch can cause unexpected behavior, though usually it's an immediate failure rather than intermittent.
AL
JunoSmith, I had a similar problem with an older version of IoT Core. It turned out to be a driver issue or a resource conflict. Have you tried updating the firmware or any specific drivers for the Raspberry Pi hardware on Windows IoT Core? Sometimes, a clean installation of Windows IoT Core on a fresh SD card can also resolve deep-seated issues. Also, monitor the system's resource usage (CPU, memory) when the issue occurs; sometimes high load can affect peripheral responsiveness.

Reply to this thread