<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: GPIO R/W speed far below the set kCLOCK_RootIpg (133 Mhz)</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/2114201#M238076</link>
    <description>Hi,&lt;BR /&gt;Do you got answer for this post??&lt;BR /&gt;</description>
    <pubDate>Wed, 11 Jun 2025 06:55:50 GMT</pubDate>
    <dc:creator>adithya369</dc:creator>
    <dc:date>2025-06-11T06:55:50Z</dc:date>
    <item>
      <title>GPIO R/W speed far below the set kCLOCK_RootIpg (133 Mhz)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1617992#M202922</link>
      <description>&lt;P&gt;We'd plan to use GPIO4 for data transfer(i.MX8P dual core) . Thus we gave a test of the GPIO speed.&lt;/P&gt;&lt;P&gt;M7 part test.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;//skipping the iomux setting and pin setting

while (i&amp;lt;100 000 000)

{

     //read

     GPIO_PinRead(GPIO4,0);

     //pulling high
     GPIO_PinWrite(GPIO4,18,1);
 
     //pulling low
     GPIO_PinWrite(GPIO4,18,0);
      i++;
}&lt;/LI-CODE&gt;&lt;P&gt;It cost 33 s, totally, the speed is far behind the IPG_clk we set, 133Mhz.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1696055385.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215271i961BF40A2832DBF2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1696055385.jpg" alt="1696055385.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As the image show, every high last 65 ns, every repeat last 330 ns.&lt;/P&gt;&lt;P&gt;If the read cost 2 clock loop, the clock time is 30 ns, which is 33Mhz, far behind the 133 hHz in reference Manual.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chengting_0-1679215423978.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215272iB706082CA53E2C41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chengting_0-1679215423978.png" alt="Chengting_0-1679215423978.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chengting_1-1679215601172.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/215273iC3928F9A9D926B7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chengting_1-1679215601172.png" alt="Chengting_1-1679215601172.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 08:47:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1617992#M202922</guid>
      <dc:creator>Chengting</dc:creator>
      <dc:date>2023-03-19T08:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO R/W speed far below the set kCLOCK_RootIpg (133 Mhz)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1619687#M203065</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/214390"&gt;@Chengting&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;I hope you are doing well.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The clock source for gpio modules is&amp;nbsp;&lt;STRONG&gt;ipg_clk_s&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(Clock root: IPG_CLK_ROOT).&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Here, ipg_clk_s is used for synchronization in gpio sampling, reading register values, etc...&lt;/DIV&gt;
&lt;DIV&gt;It does not mean the frequency at which gpio output toggles in this example.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;This test does have the overhead of other instructions (loop condition, increment,).&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;GPIO_PinWrite() function also contains various conditional branching.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks &amp;amp; Regards&lt;/DIV&gt;
&lt;DIV&gt;Sanket Parekh&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Mar 2023 09:59:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1619687#M203065</guid>
      <dc:creator>Sanket_Parekh</dc:creator>
      <dc:date>2023-03-22T09:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO R/W speed far below the set kCLOCK_RootIpg (133 Mhz)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1626800#M203618</link>
      <description>&lt;P&gt;Thanks for your reply. How do I know the correct speed (or the highest speed the platform can support)?&lt;/P&gt;&lt;P&gt;That's what I really really need. Thank you again.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;static inline uint32_t GPIO_PinRead(GPIO_Type *base, uint32_t pin)
{
    assert(pin &amp;lt; 32U);

    return (((base-&amp;gt;DR) &amp;gt;&amp;gt; pin) &amp;amp; 0x1U);
}

void GPIO_PinWrite(GPIO_Type *base, uint32_t pin, uint8_t output)
{
    assert(pin &amp;lt; 32U);
    if (output == 0U)
    {
#if (defined(FSL_FEATURE_IGPIO_HAS_DR_CLEAR) &amp;amp;&amp;amp; FSL_FEATURE_IGPIO_HAS_DR_CLEAR)
        base-&amp;gt;DR_CLEAR = (1UL &amp;lt;&amp;lt; pin);
#else
        base-&amp;gt;DR &amp;amp;= ~(1UL &amp;lt;&amp;lt; pin); /* Set pin output to low level.*/ //==&amp;gt; this branch
#endif
    }
    else
    {
#if (defined(FSL_FEATURE_IGPIO_HAS_DR_SET) &amp;amp;&amp;amp; FSL_FEATURE_IGPIO_HAS_DR_SET)
        base-&amp;gt;DR_SET = (1UL &amp;lt;&amp;lt; pin);
#else
        base-&amp;gt;DR |= (1UL &amp;lt;&amp;lt; pin);  /* Set pin output to high level.*/  //==&amp;gt; this branch
#endif
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 10:31:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1626800#M203618</guid>
      <dc:creator>Chengting</dc:creator>
      <dc:date>2023-04-03T10:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO R/W speed far below the set kCLOCK_RootIpg (133 Mhz)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1627169#M203646</link>
      <description>&lt;P&gt;Thanks for your reply. How do I know the correct speed (or the highest speed the platform can support)?&lt;/P&gt;&lt;P&gt;That's what I really really need. Thank you again.&lt;/P&gt;&lt;PRE&gt;static inline uint32_t GPIO_PinRead(GPIO_Type *base, uint32_t pin)
{
    assert(pin &amp;lt; 32U);

    return (((base-&amp;gt;DR) &amp;gt;&amp;gt; pin) &amp;amp; 0x1U);
}

void GPIO_PinWrite(GPIO_Type *base, uint32_t pin, uint8_t output)
{
    assert(pin &amp;lt; 32U);
    if (output == 0U)
    {
#if (defined(FSL_FEATURE_IGPIO_HAS_DR_CLEAR) &amp;amp;&amp;amp; FSL_FEATURE_IGPIO_HAS_DR_CLEAR)
        base-&amp;gt;DR_CLEAR = (1UL &amp;lt;&amp;lt; pin);
#else
        base-&amp;gt;DR &amp;amp;= ~(1UL &amp;lt;&amp;lt; pin); /* Set pin output to low level.*/ //==&amp;gt; this branch
#endif
    }
    else
    {
#if (defined(FSL_FEATURE_IGPIO_HAS_DR_SET) &amp;amp;&amp;amp; FSL_FEATURE_IGPIO_HAS_DR_SET)
        base-&amp;gt;DR_SET = (1UL &amp;lt;&amp;lt; pin);
#else
        base-&amp;gt;DR |= (1UL &amp;lt;&amp;lt; pin);  /* Set pin output to high level.*/  //==&amp;gt; this branch
#endif
    }
}&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Apr 2023 01:04:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1627169#M203646</guid>
      <dc:creator>Chengting</dc:creator>
      <dc:date>2023-04-04T01:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO R/W speed far below the set kCLOCK_RootIpg (133 Mhz)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1628920#M203811</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/214390"&gt;@Chengting&lt;/a&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;I hope you are doing well.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The correct gpio togging speed is not documented&amp;nbsp;anywhere as it depends upon many things and overheads of applications can also affect it.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks &amp;amp; Regards,&lt;/DIV&gt;
&lt;DIV&gt;Sanket Parekh&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Apr 2023 08:32:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/1628920#M203811</guid>
      <dc:creator>Sanket_Parekh</dc:creator>
      <dc:date>2023-04-06T08:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO R/W speed far below the set kCLOCK_RootIpg (133 Mhz)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/2114201#M238076</link>
      <description>Hi,&lt;BR /&gt;Do you got answer for this post??&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Jun 2025 06:55:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/2114201#M238076</guid>
      <dc:creator>adithya369</dc:creator>
      <dc:date>2025-06-11T06:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: GPIO R/W speed far below the set kCLOCK_RootIpg (133 Mhz)</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/2114263#M238080</link>
      <description>&lt;P&gt;The person asking the question doesn't know what information to provide, such as pad settings and voltage. The person answering the question is not familiar with imx at all.&lt;BR /&gt;The datasheets of all imx chips have descriptions of IO AC characteristics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="111.png" style="width: 497px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/342408i93470AAC55FBEFCC/image-size/large?v=v2&amp;amp;px=999" role="button" title="111.png" alt="111.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 07:47:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/GPIO-R-W-speed-far-below-the-set-kCLOCK-RootIpg-133-Mhz/m-p/2114263#M238080</guid>
      <dc:creator>gidame</dc:creator>
      <dc:date>2025-06-11T07:47:06Z</dc:date>
    </item>
  </channel>
</rss>

