<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QfileSystemWatcher works until I set the M4 with GPIO (different port , only  same bank)]]></title><description><![CDATA[<p dir="auto">Dear all,</p>
<p dir="auto">I used a QFileSystemWatcher on a Colibri Imx7 (A7 side) to check 5 files which gave me the Gpio button indication  with Linux SysFs.<br />
Every works, but when my M4 side change some gpio settings which have different number, two of 5 buttons doesn't send signal anymore.<br />
I double checked that I have no Spike or something strange with Oscilloscope and files are still changing their internal number (from 0 to 1 if I press them).</p>
<p dir="auto">Do you have any idea or Suggestion?<br />
Below the code which I used.</p>
<pre><code>A7 side:

QStringList gpioValueList = {gpioPathUp,gpioPathDown,gpioPathLeft,gpioPathRight,gpioPathOk};
   auto gpioButtonMonitor = new QFileSystemWatcher{gpioValueList, this};
   connect(gpioButtonMonitor, SIGNAL(fileChanged(const QString &amp;)), this, SLOT(fileChanged(const QString &amp;)));

M4 side, just init GPIO:
   GPIO_Init(BOARD_GPIO_AD1_CS-&gt;base,    &amp;gpioInit_AD1_CS);
   GPIO_Init(BOARD_GPIO_AD2_CS-&gt;base,    &amp;gpioInit_AD2_CS);
</code></pre>
]]></description><link>https://forum.qt.io/topic/126562/qfilesystemwatcher-works-until-i-set-the-m4-with-gpio-different-port-only-same-bank</link><generator>RSS for Node</generator><lastBuildDate>Sat, 20 Jun 2026 02:49:43 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/126562.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 11 May 2021 16:20:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QfileSystemWatcher works until I set the M4 with GPIO (different port , only  same bank) on Tue, 08 Jun 2021 06:37:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kromignon">@<bdi>KroMignon</bdi></a>, thank you. I got your point and fixed issue</p>
<blockquote>
<blockquote>
<p dir="auto">it does not mean state changes have been reported to kernel.<br />
Right, the issue was the interrupt kernel which stopped to work.</p>
</blockquote>
</blockquote>
]]></description><link>https://forum.qt.io/post/663940</link><guid isPermaLink="true">https://forum.qt.io/post/663940</guid><dc:creator><![CDATA[AndreaSc]]></dc:creator><pubDate>Tue, 08 Jun 2021 06:37:47 GMT</pubDate></item><item><title><![CDATA[Reply to QfileSystemWatcher works until I set the M4 with GPIO (different port , only  same bank) on Mon, 17 May 2021 08:05:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasc">@<bdi>AndreaSc</bdi></a> said in <a href="/post/660021">QfileSystemWatcher works until I set the M4 with GPIO (different port , only same bank)</a>:</p>
<blockquote>
<p dir="auto">That GPIO files are still updated.</p>
</blockquote>
<p dir="auto">Which files do you talking about?<br />
<code>value</code> is an virtual file, so it content is generated at reading time. So if you can read it, it only means that kernel can read IO state, it does not mean state changes have been reported to kernel.</p>
]]></description><link>https://forum.qt.io/post/660033</link><guid isPermaLink="true">https://forum.qt.io/post/660033</guid><dc:creator><![CDATA[KroMignon]]></dc:creator><pubDate>Mon, 17 May 2021 08:05:16 GMT</pubDate></item><item><title><![CDATA[Reply to QfileSystemWatcher works until I set the M4 with GPIO (different port , only  same bank) on Mon, 17 May 2021 07:01:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kromignon">@<bdi>KroMignon</bdi></a> said in <a href="/post/659937">QfileSystemWatcher works until I set the M4 with GPIO (different port , only same bank)</a>:</p>
<blockquote>
<p dir="auto">You want QFileSystemWatcher to raise signal on I/O state changes, but that is only possible when Linux itself is aware about I/O changes.<br />
Therefore, I/O must be able to trigger an interrupt, and that is only possible for IOs which have an edge virtual file.</p>
</blockquote>
<p dir="auto">Edge was already setted properly and the Linux is aware about I/O changes. I checked them before the issue and when QfileSystemWatcher stop to work (only in 3 on 5 Gpio) through the cat files. That GPIO files are still updated.</p>
]]></description><link>https://forum.qt.io/post/660021</link><guid isPermaLink="true">https://forum.qt.io/post/660021</guid><dc:creator><![CDATA[AndreaSc]]></dc:creator><pubDate>Mon, 17 May 2021 07:01:19 GMT</pubDate></item><item><title><![CDATA[Reply to QfileSystemWatcher works until I set the M4 with GPIO (different port , only  same bank) on Sun, 16 May 2021 16:10:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasc">@<bdi>AndreaSc</bdi></a> said in <a href="/post/659840">QfileSystemWatcher works until I set the M4 with GPIO (different port , only same bank)</a>:</p>
<blockquote>
<p dir="auto">This is only a very strange behavior about QfileSystemWatcher. Files update works as before, but I don't see anymore the fileSystem trigger....</p>
</blockquote>
<p dir="auto">I don't think so.<br />
GPIO uses SysFS, which is a virtual file system.<br />
You want QFileSystemWatcher to raise signal on I/O state changes, but that is only possible when Linux itself is aware about I/O changes.<br />
Therefore, I/O <strong>must</strong> be able to trigger an interrupt, and that is only possible for IOs which have an <code>edge</code> virtual file.</p>
<p dir="auto">Otherwise, you have to check per polling if IO state has changed!</p>
]]></description><link>https://forum.qt.io/post/659937</link><guid isPermaLink="true">https://forum.qt.io/post/659937</guid><dc:creator><![CDATA[KroMignon]]></dc:creator><pubDate>Sun, 16 May 2021 16:10:24 GMT</pubDate></item><item><title><![CDATA[Reply to QfileSystemWatcher works until I set the M4 with GPIO (different port , only  same bank) on Sat, 15 May 2021 20:18:05 GMT]]></title><description><![CDATA[<p dir="auto">There are a few debug messages that can be written to the <code>qt.core.filesystemwatcher</code> <a href="https://doc.qt.io/qt-5/qloggingcategory.html" target="_blank" rel="noopener noreferrer nofollow ugc">logging category</a>. Monitoring for them might be informative.</p>
]]></description><link>https://forum.qt.io/post/659859</link><guid isPermaLink="true">https://forum.qt.io/post/659859</guid><dc:creator><![CDATA[jeremy_k]]></dc:creator><pubDate>Sat, 15 May 2021 20:18:05 GMT</pubDate></item><item><title><![CDATA[Reply to QfileSystemWatcher works until I set the M4 with GPIO (different port , only  same bank) on Sat, 15 May 2021 18:35:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kromignon">@<bdi>KroMignon</bdi></a>,<br />
thanks for reply, but I know the kernel link page.</p>
<blockquote>
<blockquote>
<p dir="auto">Does those IOs support "edge"?<br />
SysFs works before and after SPI GPIO settings M4 side (different CPU on different O.S.).<br />
I can always read all the files /sys/class/gpio&lt;xxx&gt;/value  with the correct changed value and I have no spike on oscylloscope.</p>
</blockquote>
</blockquote>
<p dir="auto">I didn't get your point.<br />
Gpio's files are always updated properly and I have no clue that they have issue... Instead as I explained I didn't understand why QfileSystemWatcher after SPI settings on M4 doesn't work on some gpio files(not all) only after a different settings of a different O.S..</p>
<p dir="auto">E.g: I read on /sys/class/gpio108/value : 1. I press button and I read 0 (with a simple cat). Before an SPI settings on gpio port 5, but different pin QFileSystemWatcher works and send me a signal. After I can still read the same change, but QFileSystemWatcher only on the Gpio of port  5 doesn't sen me signal anymore.</p>
<p dir="auto">This is only a very strange behavior about QfileSystemWatcher. Files update works as before, but I don't see anymore the fileSystem trigger....</p>
]]></description><link>https://forum.qt.io/post/659840</link><guid isPermaLink="true">https://forum.qt.io/post/659840</guid><dc:creator><![CDATA[AndreaSc]]></dc:creator><pubDate>Sat, 15 May 2021 18:35:37 GMT</pubDate></item><item><title><![CDATA[Reply to QfileSystemWatcher works until I set the M4 with GPIO (different port , only  same bank) on Wed, 12 May 2021 07:38:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasc">@<bdi>AndreaSc</bdi></a> Hello and welcome to Qt Forum.</p>
<p dir="auto">I think, this has nothing to do with Qt itself but depends on how the GPIO driver works.<br />
Does those IOs support "edge"? ==&gt; <a href="https://www.kernel.org/doc/Documentation/gpio/sysfs.txt" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.kernel.org/doc/Documentation/gpio/sysfs.txt</a></p>
]]></description><link>https://forum.qt.io/post/659294</link><guid isPermaLink="true">https://forum.qt.io/post/659294</guid><dc:creator><![CDATA[KroMignon]]></dc:creator><pubDate>Wed, 12 May 2021 07:38:10 GMT</pubDate></item></channel></rss>