<?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>initialise periphery</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79431/initialise-periphery</link><description>Hi I&amp;#39;m new on zephyr 
 
 In my hardware the sensors around the soc are most of time not powered. 
 At Startup the OS initialise SPI, I2C, UART and some pins are set to 1. 
 This results in parasitic power of the sensor and the pin can be overloaded. </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Sep 2021 10:35:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79431/initialise-periphery" /><item><title>RE: initialise periphery</title><link>https://devzone.nordicsemi.com/thread/330615?ContentTypeID=1</link><pubDate>Wed, 22 Sep 2021 10:35:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f9acc87-98f8-48c7-b85c-9fce4112ee3f</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Then you might have to disable the Zephyr drivers.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First disable the individual device tree nodes in order to prevent the zephyr drivers from allocating devices for them. Make sure you have the status = &amp;quot;disabled&amp;quot;; on the DT node you don&amp;#39;t want to a device allocated for, and it will be free to use elsewhere.&lt;/p&gt;
&lt;p&gt;Then you are free to use nrfx directly or modify required drivers for your purpose. We have done handled similar cases before &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/drivers/sensor/pmw3360/pmw3360.c#L891"&gt;with a trick like this.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: initialise periphery</title><link>https://devzone.nordicsemi.com/thread/330022?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 11:55:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8dec9d0-c84d-4a3a-8516-40a48c2600db</guid><dc:creator>Canastra</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I read the blog but I didn&amp;#39;t see any solution for my problem.&lt;/p&gt;
&lt;p&gt;My problem is, that the OS initialise UART, SPI, I2C at startup.&amp;nbsp;At this time&amp;nbsp;the external Sensor are not powered.&lt;/p&gt;
&lt;p&gt;Before I go to Standby I set all periphery to&amp;nbsp;PM_DEVICE_STATE_OFF. After that I switch off the power of the Sensors.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;After Standby I&amp;nbsp;&lt;span&gt;switch on the power of the Sensors and then I&amp;nbsp;set all periphery to PM_DEVICE_STATE_ACTIVE.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This works fine.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But How can I force the OS to initialise the&amp;nbsp;&lt;span&gt;periphery in PM_DEVICE_STATE_OFF.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Otherwise the&amp;nbsp;periphery power my sensor until the Power Pin is enabled.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: initialise periphery</title><link>https://devzone.nordicsemi.com/thread/329394?ContentTypeID=1</link><pubDate>Tue, 14 Sep 2021 11:04:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3711ded-7ae2-4d82-9901-91fa7f1625ab</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hey again Reto!&lt;/p&gt;
&lt;p&gt;I see. Try putting these peripherals in another power management state and see if that fixes your issue. For instance&amp;nbsp;PM_STATE_SUSPEND_TO_DISK.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/optimizing-power-on-nrf53-designs"&gt;There is a great new blog post about it here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If that doesn&amp;#39;t help we will have to look at manually disabling the drivers.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: initialise periphery</title><link>https://devzone.nordicsemi.com/thread/329044?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 13:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:288b2cbe-343a-445d-ac98-4f5b30fd2213</guid><dc:creator>Canastra</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;span&gt;Elfving&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve a radar sensor, a ultrasonic sensor, a time of flight sensor, a camera, a sd card.&lt;/p&gt;
&lt;p&gt;Most time this devices are powered of to save batteries.&lt;/p&gt;
&lt;p&gt;The device are connected over SPI or I2C or UART to the nRF9160.&lt;/p&gt;
&lt;p&gt;After powerup Zephyr initialise SPI, I2C, UART and for example TX are driven to High.&lt;/p&gt;
&lt;p&gt;Now the&amp;nbsp;Sensor become a high over the data line and the internal ESD protection diodes forward this to VDD.&lt;/p&gt;
&lt;p&gt;Normally a GPIO is overloaded with the load of some sensors.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/4073.Power.png" /&gt;&lt;/p&gt;
&lt;p&gt;So I need a solution to initialise SPI, I2C, UART on demand and only after the sensor power is on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: initialise periphery</title><link>https://devzone.nordicsemi.com/thread/328863?ContentTypeID=1</link><pubDate>Thu, 09 Sep 2021 14:01:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ca68799-f61a-4d87-bfdf-ca2e773022b0</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello Reto!&lt;/p&gt;
[quote user=""]Is there a way to not initialise some periphery until it is used?[/quote]
&lt;p&gt;Not using the zephyr drivers. You could switch to using the nrfx ones, however that has its downsides too.&lt;/p&gt;
&lt;p&gt;Could you explain further what you mean by parasitic power and how you have observed this happening? And what sensor are you using?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>