<?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>How to configure peripherals during runtime in NCS v2.5.0 ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107007/how-to-configure-peripherals-during-runtime-in-ncs-v2-5-0</link><description>Hi, 
 I am working on a project and I might need to reconfigure some of the GPIOs and use them for some different functions than the default one. Is there a way to do that in zephyr? 
 FYI I am using nrf52840 and ncs v2.5.0.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Jan 2024 12:31:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107007/how-to-configure-peripherals-during-runtime-in-ncs-v2-5-0" /><item><title>RE: How to configure peripherals during runtime in NCS v2.5.0 ?</title><link>https://devzone.nordicsemi.com/thread/462281?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2024 12:31:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6ad13a7-8cd6-44b2-98d0-16b1a2dbbfc5</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi again Sahil&lt;/p&gt;
&lt;p&gt;For question one. I would reefer to the Zephyr documentation you can read &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/kernel/drivers/index.html#initialization-levels"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For question two: The &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/kernel/drivers/index.html#system-drivers"&gt;sys_init()&lt;/a&gt; macor is used when you need to&amp;nbsp;run a function at boot stage. The&amp;nbsp;&lt;span&gt;macro does not take any config or runtime data structures and there isn’t a way to later get a device pointer by name. The same device policies for initialization level and priority apply. The Zephyr documentation explains it &lt;a href="https://docs.zephyrproject.org/apidoc/latest/group__sys__init.html"&gt;here&lt;/a&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;Regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Runar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripherals during runtime in NCS v2.5.0 ?</title><link>https://devzone.nordicsemi.com/thread/462202?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2024 08:34:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42a4744b-0f73-4d2a-b9e9-f28deb8c5a61</guid><dc:creator>sahil.b</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/runsiv"&gt;runsiv&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for the reply. I read the posts you shared and I have some questions.&lt;/p&gt;
&lt;p&gt;1. In the post it is said that peripherals are initialised before application main is executed. Can you explain how that is done? also, could you give me some example how those peripherals are getting initialised?&lt;/p&gt;
&lt;p&gt;2. Also, can you explain me what exactly SYS_INIT does in details?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Sahil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to configure peripherals during runtime in NCS v2.5.0 ?</title><link>https://devzone.nordicsemi.com/thread/462193?ContentTypeID=1</link><pubDate>Tue, 02 Jan 2024 07:20:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d002d4f-08e9-49da-9bfe-8a50f5f7dcb8</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi Sahil&lt;/p&gt;
&lt;p&gt;I would reefer to my colleagues response h&lt;a href="https://devzone.nordicsemi.com/support-private/support/289929#permalink=765272"&gt;ere&lt;/a&gt;&amp;nbsp;and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/103646/changes-any-peripheral-pins-configuration-at-runtime-after-build-and-flash-firmware"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>