监控GPIO引脚时出现不可接受的后台App延迟 [英] Unacceptable Background App delay when monitoring GPIO pins
问题描述
我正在编写一个后台应用程序来监控RPi GPIO引脚。 GPIO引脚可以独占访问。我正在使用GpioPin_ValueChanged事件来捕捉上升和下降的边缘。我发现这些事件并非如此发生。
所以我将按钮连接到GPIO端口设置为输入下拉,我放置了Debug.WriteLine("{0}:{1}",DateTime.Now.ToString(" hh) :mm:ss.fff"),s); ValueChanged事件中的命令报告事件发生的时间。我从
IDE运行它,以便我可以看到调试输出,我看到的是当我按下并释放按钮时没有发生这些事件。时间戳已经过时了。有时响应很快,有时会出现明显的延迟,大约为45-60
秒。我不需要毫秒准确的响应时间,但我确实需要0.1秒的准确响应时间。如何解决这个问题?
I'm writing a background app to monitor an RPi GPIO pin. The GPIO pins are opend for exclusive access. And I'm using GpioPin_ValueChanged event to catch the rising and falling edge. What I've found is that these events were not happening when the they should. So I wired up a push button to a GPIO port set to input pull down and I've placed Debug.WriteLine("{0}: {1}", DateTime.Now.ToString("hh:mm:ss.fff"), s); commands in the ValueChanged event to report when the events occur. I run it from the IDE so that I can see the debug output and what I see is that these events are not occurring when I press and release the button. The timestamps are way off. Sometimes the response is quick and sometimes there is a significant delay, on the order of 45-60 seconds. I don't need millisecond accurate response times, but I do need 0.1 second accurate response times. How can this be solved?
标记
推荐答案
你好
你描述的这种延迟听起来像是一个错误,应该通过反馈中心应用程序报告以解决问题。
such a delay you describe sounds like a bug and should be reported through Feedback Hub App to get solved
Raspberry Pi正在支持DMAP驱动程序,可以尝试使用GPIO性能改进。
the Raspberry Pi's are supporting DMAP drivers with GPIO performance improvements you could try to use
您可以在
https://docs.microsoft.com/en-us/windows/iot -core / develop-your-app / lightningproviders
br
Andre
br
Andre
这篇关于监控GPIO引脚时出现不可接受的后台App延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!