<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Configuring the GPIO takes too long?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/127345/configuring-the-gpio-takes-too-long</link><description>Hi Nordic Team: 
 I am developing the firmware for nRF54H20 using NCS v3.2.0. I need to quickly configure 16 GPIOs as input with pull-up resistors, so I adopted the coding approach shown below. However, actual measurements show that executing KEY_IO_CFG_INPUT</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Mar 2026 07:22:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/127345/configuring-the-gpio-takes-too-long" /><item><title>RE: Configuring the GPIO takes too long?</title><link>https://devzone.nordicsemi.com/thread/562991?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2026 07:22:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2d6a065-4a5a-4a87-ae46-797e5c1cd1be</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Yes, your data is real.&lt;/p&gt;
&lt;p&gt;I had to look it up, turns out GPIO is an AHB peripherial on the NRF52840. On later chips (53xx, 54xxx) its an ABP peripherial that can run on a slower clock.&lt;/p&gt;
&lt;p&gt;You can try to interleave your&amp;nbsp;NRF_P2 and&amp;nbsp;NRF_P1 writes - that might use the write buffers more efficient. But the GPIO register access is indeed much slower on the newer chips.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring the GPIO takes too long?</title><link>https://devzone.nordicsemi.com/thread/562982?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2026 02:15:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:232b9b6c-4ec1-40dd-bcca-2e0a9e450ce4</guid><dc:creator>abstract1340</dc:creator><description>&lt;p&gt;Hi Turbo J,&amp;nbsp;&lt;span&gt;It&amp;#39;s not a measurement issue. Executing KEY_IO_CFG_INPUT() 1000 times in a loop takes more than 8 ms, so the function KEY_IO_CFG_INPUT() itself consumes a lot of time, not because gpio_pin_configure_dt is inaccurate.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Moreover, even when changed to OUTSET and OUTCLR, the measured time is still long&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring the GPIO takes too long?</title><link>https://devzone.nordicsemi.com/thread/562898?ContentTypeID=1</link><pubDate>Tue, 10 Mar 2026 09:47:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8317efeb-34e2-4e88-aa3d-16ff0fe33fc0</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Looking at the implementation,&amp;nbsp;&lt;code&gt;gpio_pin_configure_dt() &lt;/code&gt;might take a non-trivial amount of your measured time here. Also depends on assert and tracing configs.&lt;/p&gt;
&lt;p&gt;For these kind of measurements you want to use the OUTSET and OUTCLR registers directly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>