<?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 PIN 0.00 and P0.01 as GPIO</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98109/configuring-pin-0-00-and-p0-01-as-gpio</link><description>I am trying to use P0.00 and P0.01 as GPIOs on nrf5340 DK board. I have opened SB1 and SB2. Also, soldered SB3 and SB4. I am using blinky example to test the configuration. However, I can not set the logic levels. The Pin 0.00 set to logic 0. 
 I have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Mar 2023 08:01:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98109/configuring-pin-0-00-and-p0-01-as-gpio" /><item><title>RE: Configuring PIN 0.00 and P0.01 as GPIO</title><link>https://devzone.nordicsemi.com/thread/417595?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2023 08:01:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:349318fb-18aa-48df-92a0-e6424c6969a9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;When I test the code with the configuration from your last post, this works as expected if I build for nrf5340dk_nrf5340_cpuapp. However, it does not work when building for&amp;nbsp;nrf5340dk_nrf5340_cpuapp_ns. Is that what you are doing?&lt;/p&gt;
&lt;p&gt;If so, the problem is that TF-M&amp;nbsp;does respect&amp;nbsp;CONFIG_SOC_ENABLE_LFXO=n. I have reported this to the maintainers. I do not have an elegant solution for now, but you can simply comment out these two lines in the implementation of&amp;nbsp;spu_periph_init_cfg() in &amp;lt;SDK&amp;gt;/modules/tee/tf-m/trusted-firmware-m/platform/ext/target/nordic_nrf/common/nrf5340/target_cfg.c:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    /* Configure properly the XL1 and XL2 pins so that the low-frequency crystal
     * oscillator (LFXO) can be used.
     * This configuration can be done only from secure code, as otherwise those
     * register fields are not accessible.  That&amp;#39;s why it is placed here.
     */
    nrf_gpio_pin_control_select(PIN_XL1, NRF_GPIO_PIN_SEL_PERIPHERAL);
    nrf_gpio_pin_control_select(PIN_XL2, NRF_GPIO_PIN_SEL_PERIPHERAL);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring PIN 0.00 and P0.01 as GPIO</title><link>https://devzone.nordicsemi.com/thread/417479?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 15:18:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2c95f93-cfa6-4c6c-be8e-9da0bfd4341e</guid><dc:creator>Surendra Amina</dc:creator><description>&lt;p&gt;I have modified another board as well and redone the test. Result is same.&lt;span&gt;The Pin P0.00 set to&amp;nbsp; logic 0.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring PIN 0.00 and P0.01 as GPIO</title><link>https://devzone.nordicsemi.com/thread/417478?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 15:09:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24e2ca28-7014-4829-b89f-7ea73778105d</guid><dc:creator>Surendra Amina</dc:creator><description>&lt;p&gt;I have checked solder bridge seems to be OK. I have checked SB1 and SB2, both are open.&amp;nbsp;&amp;nbsp;&lt;span&gt;SB3 and SB4 are closed.&lt;br /&gt;&lt;br /&gt;Did you get the chance to test the code?&lt;br /&gt;&lt;br /&gt;&amp;nbsp;prj.conf looks as follows&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_GPIO=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y
CONFIG_SOC_ENABLE_LFXO=n&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring PIN 0.00 and P0.01 as GPIO</title><link>https://devzone.nordicsemi.com/thread/417477?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 14:47:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c9eada2-8fe7-4c59-af36-17b867c2dbc1</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;This looks good. Can you check with a multimeter or similar that the solder bridges that should have been cut are actually cut (so that they ar&amp;nbsp;eventually open), and the once hat should be soldered are actually closed?&lt;/p&gt;
&lt;p&gt;Edit:&amp;nbsp;There is one other config that is needed that I forgot about, and that is&amp;nbsp;CONFIG_SOC_ENABLE_LFXO=n. This is y by default.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring PIN 0.00 and P0.01 as GPIO</title><link>https://devzone.nordicsemi.com/thread/417476?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 14:00:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c38fa7c8-e96a-4e65-9b5d-9b8f14fc6430</guid><dc:creator>Surendra Amina</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Please find the screen capture of PIN_CNF register&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:102px;max-width:502px;" alt="PIN CFG register" height="102" src="https://devzone.nordicsemi.com/resized-image/__size/1004x204/__key/communityserver-discussions-components-files/4/PIN_5F00_CFG-register.png" width="502" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please find the register dump&amp;nbsp; in CSV as well&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Ozone_5F00_GPIO_5F00_Registers_5F00_1_5F00_230324.csv"&gt;devzone.nordicsemi.com/.../Ozone_5F00_GPIO_5F00_Registers_5F00_1_5F00_230324.csv&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Surendra&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Configuring PIN 0.00 and P0.01 as GPIO</title><link>https://devzone.nordicsemi.com/thread/417475?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2023 13:16:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dec16bd-1525-425e-a98a-e945f0f874ca</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no other configuration that is needed. As long as you don&amp;#39;t enable the 32.768 kHz crystal oscillator, the pins will be normal GPIO pins from the IC perspective. I did not get a change to test now, but can you check the GPIO registers from a debugger to see if the pins are configured as output and set and cleared as you would expect in the IC itself (at least seen from a debugger)?&lt;/p&gt;
&lt;p&gt;PS: Your configuration is wrong, as you are trying to enable both the LFRC and synthesized (from HF clock). So you should remove the line in with&amp;nbsp;CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=y in you prj.conf. (That should not matter with regard to this issue, though.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>