<?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>Proper peripheral configuration with overlay file</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75196/proper-peripheral-configuration-with-overlay-file</link><description>Good evening, 
 
 I am using a nrf52840DK to set up a product prototype and I have a couple of questions about the peripherals. My nRF Connect SDK version is 1.5.99. 
 1. I am building for the nrf52840dk_nrf52840 target and use an overlay file to overwrite</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Jun 2021 14:33:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75196/proper-peripheral-configuration-with-overlay-file" /><item><title>RE: Proper peripheral configuration with overlay file</title><link>https://devzone.nordicsemi.com/thread/315671?ContentTypeID=1</link><pubDate>Wed, 16 Jun 2021 14:33:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71029a1a-af38-48a5-a93f-cc4956bb213d</guid><dc:creator>bigbear</dc:creator><description>&lt;p style="text-align:left;"&gt;&lt;span style="background-color:#ffffff;"&gt;Hi Marjeris,&lt;/span&gt;&lt;/p&gt;
&lt;p style="text-align:left;"&gt;&lt;span style="background-color:#ffffff;"&gt;thanks a lot for the explainations!&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p style="text-align:left;"&gt;&lt;span&gt;The code for disabling looks correct to me, so I am not sure why it&amp;#39;s not working for you. How do you know it isn&amp;#39;t working? And how does your zephyr.dts looks like? Is it included in the build?&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p style="text-align:left;"&gt;&lt;span&gt;I did know because the interrupt was not triggering, while changing to another pin, it worked. But If this is the correct way I will take a look at my configurations again, maybe I missed something else.&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p style="text-align:left;"&gt;&lt;span&gt;If you take a look at the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/memory.html?cp=4_0_0_3_1_3#topic"&gt;instatiation table&amp;nbsp;&lt;/a&gt;you will see that TWI0 and SPI0 share the same base address and you can only enable one at a time. You can use SPI0 and TWI1 instead for example.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p style="text-align:left;"&gt;&lt;span&gt;That makes sense!&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p style="text-align:left;"&gt;&lt;span&gt;That said the nRF52840 DK is no meant to be used in production but as a development tool, so having a couple of dB lower sensitivity while doing FW development should not be a problem either.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p style="text-align:left;"&gt;&lt;span&gt;That is true as well &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Proper peripheral configuration with overlay file</title><link>https://devzone.nordicsemi.com/thread/311493?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 13:38:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61afc5ae-dda2-4788-aa7a-e640944a4bbc</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi, &lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;I am sorry for the late reply, there has been some public holidays here in Norway and Devzone staffing a bit lower.&lt;/p&gt;
[quote user=""]&lt;p&gt;1. I am building for the&amp;nbsp;&lt;code&gt;nrf52840dk_nrf52840&lt;/code&gt; target and use an overlay file to overwrite with my own configs. I have an interrupt signal I want to put on P0.20. But that pin is used for qspi as defined in&amp;nbsp;&lt;code&gt;nrf52840dk_nrf52840.dts&lt;/code&gt;. How do I deactivate qspi so I can use that pin for my purpose? I know I could just use another one but for sake of knowing it, I am looking for an answer. I have this in my overlay file, but it doesn&amp;#39;t seem to have an effect, at least the interrupt signal is not coming. (I tested it on other pins and it works, so I am sure that the code is not the problem).&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;code&gt;&amp;amp;qspi {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; status = &amp;quot;disabled&amp;quot;;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;};&lt;/code&gt;&lt;/p&gt;[/quote]
&lt;p&gt;The code for disabling looks correct to me, so I am not sure why it&amp;#39;s not working for you. How do you know it isn&amp;#39;t working? And how does your zephyr.dts looks like? Is it included in the build?&lt;/p&gt;
[quote user=""]2. Some peripherals cannot be used at the same time, e.g. spi0 and i2c0 cannot be used together. I found out after looking at the .dts files. Is that information documented somewhere else? What&amp;#39;s the technical reason?[/quote]
&lt;p&gt;&amp;nbsp;Some peripherals share the same peripheral ID and base address, it could be because the peripheral share some registers or other common resources, or their operation are mutually exclusive, etc. You can read more about the Peripheral interface and Peripheral ID in the nRF52840 Product Specification or &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/peripheral_interface.html?cp=4_0_0_5_0"&gt;in this page in the infocenter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you take a look at the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/memory.html?cp=4_0_0_3_1_3#topic"&gt;instatiation table &lt;/a&gt;you will see that TWI0 and SPI0 share the same base address and you can only enable one at a time. You can use SPI0 and TWI1 instead for example.&lt;/p&gt;
[quote user=""]3. Some pins are marked as&amp;nbsp;&lt;span&gt;&lt;code&gt;Standard drive, low frequency I/O only&lt;/code&gt; in the docs. But the .dts file for the nRF52840DK put for example SPI on these pins, why is that? Is it for sake of Arduino compatibility or doesn&amp;#39;t it matter that much in the end? I will follow the recommandation but I&amp;#39;m just curious why the peripherals are being put there by default.&lt;/span&gt;[/quote]
&lt;p&gt;&amp;nbsp;This is mainly a design choice for Arduino shield compatibility yes, perhaps based on the pins we had available for routing, since there is no many GPIO pins extras when using LEDs, buttons, analog pins, etc in the DK. Using standard drive, low frequency i/o pins will only affect the radio sensitivity if you have high drive/frequency while the radio is active, so using these pins for SPI between radio events is no problem. That said the nRF52840 DK is no meant to be used in production but as a development tool, so having a couple of dB lower sensitivity while doing FW development should not be a problem either.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>