<?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>Migrating to NCS v2.0.0 &amp;quot;error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89531/migrating-to-ncs-v2-0-0-error-nrfx_twi-defined-at-c-ncs-v2-0-0-zephyr-modules-hal_nordic-nrfx-kconfig-277</link><description>I&amp;#39;ve been working on porting a project to NCS using VS Code as my IDE. Now that NSC v2.0.0 is out, I wanted to move to that. I found the migration guide: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/migration/migration_guide_1.x_to_2</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Aug 2022 02:46:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89531/migrating-to-ncs-v2-0-0-error-nrfx_twi-defined-at-c-ncs-v2-0-0-zephyr-modules-hal_nordic-nrfx-kconfig-277" /><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/380247?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2022 02:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d822e272-3b90-4b9b-8e87-d710f35a92ae</guid><dc:creator>yoyou</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;in NCS1.9.99-,&amp;nbsp; get note pin number from follow line:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span style="color:#0000ff;"&gt;#define I2S_MCK_PIN &amp;nbsp; &amp;nbsp; &amp;nbsp;DT_PROP(DT_NODELABEL(i2s0), mck_pin)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;how to get pin number in NCS2.0.2?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/377942?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2022 20:16:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62494f41-9320-419e-a437-70a0b680a084</guid><dc:creator>Ryjan</dc:creator><description>&lt;p&gt;I&amp;#39;ll need to watch that again. There&amp;#39;s a lot of information. I&amp;#39;m glad to see that I&amp;#39;m not just being critical when I think that the documentation and examples provided are sparse. Another thing is it seems like there are about 5 or 6 ways things can be done and most of my searches show a different approach. I was handed this project a few weeks ago where it already ran, but I needed to format the repo so it&amp;#39;s not 5GB on our git hub account. V2.0.0 splits the SDK files from the toolchain and I&amp;#39;m hoping has some improvements with relative paths (which is quite handy for deploying a repo on another machine). This issue and another I am having with getting the MCUboot signing and versioning seem very straightforward and seem like the transition should be simple, but the bits I am able to find are all done from a kconfig/device tree or as a command line input or in the CMakeLists or in a prj.conf or in an overlay. It makes sense that they are accomplishing the same thing, since it all boils down to different commands in a script. If I was starting from a simple project from the ground up I&amp;#39;d just pick a method, but the project worked fine in V1.9.1, with the exception on the bootloader stuff, but in he transition to V2.0.0 the new pin control fails to work. There is a deeper incompatibility with the way it was setup that the migrations guide does not seem to address. The migration guide&amp;#39;s example doesn&amp;#39;t give a full picture of before and after. It assumes I have the device tree setup in slightly different way. I&amp;#39;m going to continue digging deeper. I can see the power in this device tree setup, but it&amp;#39;s a lot to master still.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/377780?ContentTypeID=1</link><pubDate>Wed, 20 Jul 2022 07:41:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48b71275-c65a-4449-920a-b73857ddc279</guid><dc:creator>gerardmarull</dc:creator><description>&lt;p&gt;Regarding PWM issues, it looks like you are creating DT nodes without any compatible. You need to create one so that DT parser knows what &amp;quot;pwms&amp;quot; contains. You can also make use of the special zephyr,user node, which operates without compatibles (useful for quick samples).&lt;/p&gt;
&lt;p&gt;I&amp;#39;d suggest watching&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=o-f2qCd2AXo"&gt;https://www.youtube.com/watch?v=o-f2qCd2AXo&lt;/a&gt;&amp;nbsp;where you&amp;#39;ll actually find a driver using PWM. You&amp;#39;ll find links to the source code in the video.&lt;/p&gt;
&lt;p&gt;You can also look at this recently updated set of samples upstream:&amp;nbsp;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/boards/bbc_microbit"&gt;github.com/.../bbc_microbit&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/377245?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2022 16:40:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fa24b15-9365-4389-bc28-f5990352ec25</guid><dc:creator>Ryjan</dc:creator><description>&lt;p&gt;I tried implement your suggestions.&lt;/p&gt;
&lt;p&gt;I placed it in a root node just by adding the &amp;quot;/{}; around the 3 channel definitions. I have errors where is wants a compatibility binding. I think that it is misinterpreting what these definitions are. The macro seems to be broken by this misinterpretation since the that&amp;#39;s where the compiler fails and the string it makes looks like the ending concatenation is not correct. It&amp;#39; looks like this: &amp;#39;__device_dts_ord_DT_N_S_pwm_motor_lead_0_P_pwms_IDX_0_PH_ORD&amp;#39; and I think that &amp;quot;IDX_0_PH_ORD&amp;quot; is likely not expanding correctly because it&amp;#39;s not interpreting the entries in the device tree correctly.&lt;/p&gt;
&lt;p&gt;I inspect the example you suggested and it looked like there is a top section where the root is shown and the pwm_led0 is a part of that, so I moved my pwm channel definitions into that scope and ran into the same issues where it wants a compatible binding. I did try &amp;quot;nordic,nrf-pwm&amp;quot; and it did not like that.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve looked for answers to my above-mentioned assumptions in above attached documents but I did not find it there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/377141?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2022 09:27:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b471eb2b-c107-4375-937e-9276bc11be2c</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I think that the &amp;quot;Property not mentioned in &amp;quot;/&amp;quot;&amp;quot; error is that you are supposed to put in in a root node.&lt;/p&gt;
&lt;p&gt;So if you don&amp;#39;t have one, try&lt;br /&gt;/ {&lt;br /&gt;&amp;nbsp; {all your pwm_m nodes}&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;Take a look where the pwm_led0 is defined in zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts&lt;br /&gt;&lt;br /&gt;Here is a mention of root nodes:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/zephyr/build/dts/intro.html#syntax-and-structure"&gt;developer.nordicsemi.com/.../intro.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/377037?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2022 17:45:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34f01131-050b-4f7a-ba4d-f41edbe454f0</guid><dc:creator>Ryjan</dc:creator><description>&lt;p&gt;I&amp;#39;ve been trying to fix my device tree files to be like the examples in the migration guide, but I get a compiler error.&lt;/p&gt;
&lt;p&gt;Here is the guide: PWM migration&lt;/p&gt;
&lt;p&gt;It does not mention pin-control but the format looks correct from what I understand. Since it does not mention pin-control, it does not specify where the code goes so I made the assumption that the default and sleep setting are the only part that ends up in the pin-control module and the new node (which are referred to as &amp;quot;definitions&amp;quot; in the migration guide, but use the macro&amp;nbsp; &amp;quot;DT_NODE_LABEL&amp;quot; to retrieve, but in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/pwm.html#c.PWM_DT_SPEC_GET_BY_IDX"&gt;PWM developer guide&lt;/a&gt; they are called &amp;quot;node_id&amp;quot;). SO I am assuming that they are all the same thing. My code ends up looking like this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;board pinctrl.dtsi:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
	pwm0_default: pwm0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT0, 0, 17)&amp;gt;,
				&amp;lt;NRF_PSEL(PWM_OUT1, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(PWM_OUT2, 0, 19)&amp;gt;;
		};
	};

	pwm0_sleep: pwm0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT0, 0, 17)&amp;gt;,
				&amp;lt;NRF_PSEL(PWM_OUT1, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(PWM_OUT2, 0, 19)&amp;gt;;
			low-power-enable;
		};
	};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;board.dts:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;&amp;amp;pwm0 {
	compatible = &amp;quot;nordic,nrf-pwm&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;pwm0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;pwm0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

pwm_m0: pwm_motor_lead_0 {
	pwms = &amp;lt;&amp;amp;pwm0 0 PWM_MSEC(20) PWM_POLARITY_NORMAL&amp;gt;;
};

pwm_m1: pwm_motor_lead_1 {
	pwms = &amp;lt;&amp;amp;pwm0 1 PWM_MSEC(20) PWM_POLARITY_NORMAL&amp;gt;;
};

pwm_m2: pwm_motor_lock {
	pwms = &amp;lt;&amp;amp;pwm0 2 PWM_MSEC(20) PWM_POLARITY_NORMAL&amp;gt;;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Once again I have made several assumptions. In the in the section of the developer guide for the PWM it shows single node with multiple entries, and the migration guide shows multiple definitions with single entries. Assuming that these are the same, I chose the latter so I can access the channel using &lt;span class="cp"&gt;DT_NODELABEL(pwm_m0). I&amp;#39;ve made the assumption that the pin-control keyword &amp;quot;PWM_OUT0&amp;quot; links to &amp;quot;0&amp;quot; in the definition pwms = &amp;lt;&amp;amp;pwm0 0 PWM_POLARITY_NORMAL&amp;gt;. That what it looks like in the migration guide, though it does not explicitly say that. But at this point it still fails to compile. VS Code underlines each instance of &amp;quot;pwms&amp;quot; with the message &amp;#39;Property not mentioned in &amp;quot;/&amp;quot;&amp;#39;. I&amp;#39;m not sure what to make of that error, but the compiler fails out on my definition &amp;quot;pwm_motor_lead_0&amp;quot; which is the line just above the first &amp;quot;pwms =&amp;lt;...&amp;quot; definition statement. &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="cp"&gt;Are my assumptions correct? and what have I still done wrong?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="cp"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="cp"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/376855?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2022 21:31:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb3890eb-5e50-46fe-8322-261d6e4f456b</guid><dc:creator>Ryjan</dc:creator><description>&lt;p&gt;Unfortunately this has not yet solved the issue. I2C still has a compiler error somewhere buried deep in a macro. If I am understanding how the pin-control module works nothing so far has addressed that issue. The examples shown, even for the PWM Blinky v2.0.0 still jut use the legacy device tree without the pin-control module, as far as I understand it. I&amp;#39;m trying to move to the new system. It worked fine before I moved to pin-control. I looked at the examples Michal listed and tried to implement them, but in the end when I looked deeper at the examples I saw that they were not using pin-control. I&amp;#39;ve looked through the pin_control.h header file to find some suitable macros, but I could not find them there.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve looked at this before: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/migration/migration_guide_1.x_to_2.x.html#changes-in-pwm-api"&gt;Migration of PWM&lt;/a&gt;. I&amp;#39;m going to dive deeper into this. I did see a previous attempt of mine that had the &amp;quot;&lt;a class="reference external" title="(in Zephyr Project v3.0.99)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/peripherals/pwm.html#c.PWM_DT_SPEC_GET"&gt;&lt;code class="xref c c-macro docutils literal notranslate"&gt;&lt;span class="pre"&gt;PWM_DT_SPEC_GET&lt;/span&gt;&lt;/code&gt;&lt;/a&gt;&amp;quot; commented out. Now that I&amp;#39;m a lot more familiar with this I see where it talked about changing a in number out for a channel number. I don&amp;#39;t see a way to specify a channel for the PWM.&lt;/p&gt;
&lt;p&gt;For the time being, I&amp;#39;m going to roll back to the non pin-control setup to continue development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/376795?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2022 13:24:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93cfcc3d-860f-4b99-b393-62fc3f1f623a</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I think that the easiest way would be to look at the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/zephyr/samples/basic/blinky_pwm/README.html"&gt;blinky_pwm&lt;/a&gt; sample from NCS 2.0.0 should help (zephyr/samples/basic/blinky_pwm).&lt;/p&gt;
&lt;p&gt;Also please look here for more information about the devicetree PWM implementation:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/api.html#pwm"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/api.html#pwm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You will need to add a few lines to your board.dts file setting up your initial PWM configuration, like in the documentation above.&lt;br /&gt;Please take a look for &amp;quot;pwm_led0&amp;quot; in zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts file.&lt;/p&gt;
&lt;p&gt;Remember to also add an alias for that PWM node in board.dts file under aliases, for example&lt;br /&gt;pwm_led0 = &amp;amp;pwm_led0;&lt;br /&gt;&lt;br /&gt;If you do or extracting the channel number you can use&lt;br /&gt;static const struct pwm_dt_spec pwm_led0 = PWM_DT_SPEC_GET(DT_ALIAS(pwm_led0));&lt;br /&gt;and just follow the sample.&lt;/p&gt;
&lt;p&gt;Hopefully that will solve the PWM issue.&lt;/p&gt;
[quote user="titan vista"]My TWI issue shows up when I am displaying the pin numbers used by that peripheral, but I should be able to make it work. [/quote]
&lt;p&gt;So is the I2C/TWI issue only about extracting the pin numbers, or is there some bigger problem?&lt;/p&gt;
&lt;p&gt;For extracting the pin numbers one way would be to use some functions from the TWI HAL:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrfx/drivers/twi/hal.html#c.nrf_twi_scl_pin_get"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrfx/drivers/twi/hal.html#c.nrf_twi_scl_pin_get&lt;/a&gt;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrfx/drivers/twi/hal.html#c.nrf_twi_sda_pin_get"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrfx/drivers/twi/hal.html#c.nrf_twi_sda_pin_get&lt;br /&gt;&lt;/a&gt;You can have a look for how it&amp;#39;s done in the&amp;nbsp;&lt;span&gt;i2c_nrfx_twim_recover_bus&lt;/span&gt;() function in the latest Zephyr version:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/bdf3322de88fc4c1eb1950db28479d6367613498/drivers/i2c/i2c_nrfx_twim.c#L306"&gt;https://github.com/zephyrproject-rtos/zephyr/blob/bdf3322de88fc4c1eb1950db28479d6367613498/drivers/i2c/i2c_nrfx_twim.c#L306&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As for the original Kconfig issue, it should be enough to include&lt;/p&gt;
&lt;p&gt;CONFIG_I2C=y&lt;br /&gt;CONFIG_I2C_NRFX=y&lt;/p&gt;
&lt;p&gt;Which I can see that you have done already.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/376655?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2022 15:12:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ce6b5f9-10b0-4f1d-85b4-708b87bd6369</guid><dc:creator>Ryjan</dc:creator><description>&lt;p&gt;I might be missing something in the migration guide, but I have tried to follow it. I ran the script for spliting out the pincontrol in to a new .dtsi file. As of right now I have issues with the TWI and PWM modules, but when I bring the SPI online, I will expect to see issues there. My TWI issue shows up when I am displaying the pin numbers used by that peripheral, but I should be able to make it work. Before the switch to the pin control module, the DT_PROP() macro was used to get the attribute, in this case the pin numbers, from the board file.&lt;/p&gt;
&lt;p&gt;As far as I understand it, the board file should be the source of truth for the pin setup. After running the provided update script according to the migration guide (&lt;span class="n"&gt;pinctrl_nrf_migrate&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt;) a new *-pinctrl.dsti was created with the proper migration complete. In the switch to pin control, the DT_PROP()macro fails to recover the pin numbers. I can recover the set frequency because that still remained in the parent board .dts file. DT_PROP() does not appear to work for a pinctrl property. I haven&amp;#39;t found instructions on how to accomplish it.&lt;/p&gt;
&lt;p&gt;This becomes important when I have to run a recovery on the TWI bus for a particular encoder that we are using, It requires us to bit-bang the bus with a sequence to recover the device from a locked up mode. To run that I have to get the pin numbers.&lt;/p&gt;
&lt;p&gt;The PWM module call &amp;quot;pwm_set()&amp;quot; requires a channel number which is also defined in the pinctrl module. We were using &amp;quot;DT_PROP(PWM_CTRL, ch0_pin)&amp;quot; to access that channel in v1.9.1, but that does not work because that property is deeper in the pincrl file rather than in the board device tree top level.&lt;span style="color:#dcdcaa;" data-darkreader-inline-color=""&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;pwm_pin_set_usec(pwm_dev, DT_PROP(PWM_CTRL, ch0_pin), PWM_PER_US, SPEED2PULSE(speed), flags);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll go a head and include the requested code below:&lt;/p&gt;
&lt;p&gt;prj.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;# Incresed stack due to settings API usage
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Logging
CONFIG_CONSOLE=y
CONFIG_LOG=y
CONFIG_LOG_PROCESS_THREAD=y
CONFIG_LOG_DEFAULT_LEVEL=4
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG_THREAD_INFO=y
CONFIG_PRINTK=y
CONFIG_LOG_PRINTK=y

# Segger RTT
CONFIG_USE_SEGGER_RTT=y
CONFIG_RTT_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BUFFER_SIZE=15360
CONFIG_SEGGER_RTT_BUFFER_SIZE_UP=15360

# Random Number Generator
CONFIG_ENTROPY_GENERATOR=y
CONFIG_ENTROPY_NRF5_RNG=y
CONFIG_ENTROPY_NRF5_THR_POOL_SIZE=16
CONFIG_ENTROPY_NRF5_THR_THRESHOLD=6

# Flash NVS
CONFIG_FLASH=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_NVS=y
CONFIG_NVS_LOG_LEVEL_DBG=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y

# Bluetooth
CONFIG_BT=y
CONFIG_BT_SETTINGS=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_SMP=n
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP=n
CONFIG_BT_ATT_PREPARE_COUNT=5
CONFIG_BT_DEVICE_NAME=&amp;quot;myLIFTER&amp;quot;
CONFIG_BT_DEVICE_APPEARANCE=1856
CONFIG_BT_DEVICE_NAME_DYNAMIC=n
CONFIG_BT_DIS_MODEL=&amp;quot;project V0.1&amp;quot;
CONFIG_BT_DIS_SERIAL_NUMBER=y
CONFIG_BT_DIS_SERIAL_NUMBER_STR=&amp;quot;10001&amp;quot;
CONFIG_BT_DIS_MANUF=&amp;quot;company Inc&amp;quot;

# I2C
CONFIG_I2C=y
CONFIG_I2C_NRFX=y
# CONFIG_NRFX_TWI=y
# CONFIG_NRFX_TWI0=y
# CONFIG_NRFX_TWIM=y
# CONFIG_NRFX_TWIM0=y
CONFIG_I2C_LOG_LEVEL_DBG=y

# ADC
CONFIG_ADC=y
CONFIG_ADC_NRFX_SAADC=y
CONFIG_ADC_LOG_LEVEL_DBG=y

# PWM
CONFIG_PWM=y
CONFIG_PWM_LOG_LEVEL_INF=y

# SETTINGS
CONFIG_STACK_SENTINEL=y
CONFIG_SETTINGS=y
CONFIG_NEWLIB_LIBC=y

# BOOTLOADER
# Stuff I am experimenting with:
# nRF immutable secure bootloader
# CONFIG_SECURE_BOOT=y
# b0_CONF_FILE=prj_minimal.conf
# CONFIG_SB_SIGNING_KEY_FILE=&amp;quot;priv.pem&amp;quot;
# For use without the private key that may be managed separately
# CONFIG_SB_SIGNING_CUSTOM=y
# CONFIG_SB_SIGNING_PUBLIC_KEY=&amp;quot;/path/to/pub.pem&amp;quot;
# CONFIG_SB_SIGNING_COMMAND=&amp;quot;my_command&amp;quot;

# MCUBOOT for OTA
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_IMG_MANAGER=y
CONFIG_IMG_ENABLE_IMAGE_CHECK=y

# BOOT_SIGNATURE_KEY_FILE =&amp;quot;${workspacefolder}/sec/sh_myl_key.pem&amp;quot;
# CONFIG_MCUBOOT_SIGNATURE_KEY_FILE=&amp;quot;${workspacefolder}/sec/sh_myl_key.pem&amp;quot;
# CONFIG_MCUMGR=y
# CONFIG_MCUMGR_CMD_OS_MGMT=y
# CONFIG_MCUMGR_CMD_IMG_MGMT=y
# CONFIG_MCUMGR_SMP_BT=y
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;board.dts:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/dts-v1/;
#include &amp;lt;nordic/nrf52832_qfaa.dtsi&amp;gt;
#include &amp;quot;board-pinctrl.dtsi&amp;quot;

/ {
	model = &amp;quot;project&amp;quot;;
	compatible = &amp;quot;company,board&amp;quot;;

	chosen {
		zephyr,console = &amp;amp;uart0;
		zephyr,shell-uart = &amp;amp;uart0;
		zephyr,uart-mcumgr = &amp;amp;uart0;
		zephyr,bt-mon-uart = &amp;amp;uart0;
		zephyr,bt-c2h-uart = &amp;amp;uart0;
		zephyr,sram = &amp;amp;sram0;
		zephyr,flash = &amp;amp;flash0;
		zephyr,code-partition = &amp;amp;slot0_partition;
	};

	leds {								/* added mot_en here for now need to find out how to define plain gpio output pin*/
		compatible = &amp;quot;gpio-leds&amp;quot;;
		led0: led_0 {
			gpios = &amp;lt;&amp;amp;gpio0 2 GPIO_ACTIVE_HIGH&amp;gt;;
			label = &amp;quot;LED_R&amp;quot;;
		};		
		led1: led_1 {
			gpios = &amp;lt;&amp;amp;gpio0 31 GPIO_ACTIVE_HIGH&amp;gt;;
			label = &amp;quot;LED_G&amp;quot;;
		};
		moten: mot_en {
			gpios = &amp;lt;&amp;amp;gpio0 20 GPIO_ACTIVE_HIGH&amp;gt;;
			label = &amp;quot;MOT_EN&amp;quot;;
		};
	};

	buttons {
		compatible = &amp;quot;gpio-keys&amp;quot;;
		button0: button_0 {
			gpios = &amp;lt;&amp;amp;gpio0 6 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Lim_SW1&amp;quot;;
		};
		button1: button_1 {
			gpios = &amp;lt;&amp;amp;gpio0 7 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Bind_SW&amp;quot;;
		};
		button2: button_2 {
			gpios = &amp;lt;&amp;amp;gpio0 18 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)&amp;gt;;
			label = &amp;quot;Lim_SW0&amp;quot;;
		};
	};
	
	/*
	vsys0: vsys {
		compatible = &amp;quot;voltage-divider&amp;quot;;
		status = &amp;quot;okay&amp;quot;;
		label = &amp;quot;VIN_AN&amp;quot;;
		io-channels = &amp;lt;&amp;amp;adc 1&amp;gt;, &amp;lt;&amp;amp;adc 2&amp;gt;, &amp;lt;&amp;amp;adc 3&amp;gt;;
		io-channel-names = &amp;quot;TEMP_AN&amp;quot;, &amp;quot;I_MOT_AN&amp;quot;, &amp;quot;VIN_AN&amp;quot;;
		output-ohms = &amp;lt;2000&amp;gt;;
		full-ohms = &amp;lt;(6490 + 2000)&amp;gt;;
	};
	*/


	/* These aliases are provided for compatibility with samples */
	aliases {
		led0 = &amp;amp;led0;
		led1 = &amp;amp;led1;
		sw0 = &amp;amp;button0;
		sw1 = &amp;amp;button1;
		sw2 = &amp;amp;button2;
		bootloader-led0 = &amp;amp;led0;
		/*notes */
		ledr = &amp;amp;led0;
		ledg = &amp;amp;led1;
		limsw1 = &amp;amp;button0;
		bindsw = &amp;amp;button1;
		limsw0 = &amp;amp;button2;
		anin = &amp;amp;adc;
		pwm	= &amp;amp;pwm0;
		moten = &amp;amp;moten;

	};
};

&amp;amp;gpiote {
	compatible = &amp;quot;nordic,nrf-gpiote&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;gpio0 {
	status = &amp;quot;okay&amp;quot;;
};

&amp;amp;adc {
	compatible = &amp;quot;nordic,nrf-saadc&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	io-channels = &amp;lt;&amp;amp;adc 1&amp;gt;, &amp;lt;&amp;amp;adc 2&amp;gt;, &amp;lt;&amp;amp;adc 3&amp;gt;;
	io-channel-names = &amp;quot;TEMP_AN&amp;quot;, &amp;quot;I_MOT_AN&amp;quot;, &amp;quot;VIN_AN&amp;quot;;
};

&amp;amp;i2c0 {
	compatible = &amp;quot;nordic,nrf-twi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	clock-frequency = &amp;lt; 400000 &amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;i2c0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;i2c0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;pwm0 {
	compatible = &amp;quot;nordic,nrf-pwm&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;pwm0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;pwm0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;spi1 {
	compatible = &amp;quot;nordic,nrf-spi&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	cs-gpios = &amp;lt;&amp;amp;gpio0 13 GPIO_ACTIVE_LOW&amp;gt;;
	pinctrl-0 = &amp;lt;&amp;amp;spi1_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;spi1_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;
};

&amp;amp;flash0 {

	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x00000000 0xc000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0000C000 0x32000&amp;gt;;
		};
		slot1_partition: partition@3e000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x0003E000 0x32000&amp;gt;;
		};
		scratch_partition: partition@70000 {
			label = &amp;quot;image-scratch&amp;quot;;
			reg = &amp;lt;0x00070000 0xa000&amp;gt;;
		};
		storage_partition: partition@7a000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x0007a000 0x00006000&amp;gt;;
		};		
	};
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;pinctrl.dtsi:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;&amp;amp;pinctrl {
	i2c0_default: i2c0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 0, 8)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 0, 9)&amp;gt;;
		};
	};

	i2c0_sleep: i2c0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(TWIM_SDA, 0, 8)&amp;gt;,
				&amp;lt;NRF_PSEL(TWIM_SCL, 0, 9)&amp;gt;;
			low-power-enable;
		};
	};

	pwm0_default: pwm0_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT0, 0, 17)&amp;gt;,
				&amp;lt;NRF_PSEL(PWM_OUT1, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(PWM_OUT2, 0, 19)&amp;gt;;
		};
	};

	pwm0_sleep: pwm0_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(PWM_OUT0, 0, 17)&amp;gt;,
				&amp;lt;NRF_PSEL(PWM_OUT1, 0, 16)&amp;gt;,
				&amp;lt;NRF_PSEL(PWM_OUT2, 0, 19)&amp;gt;;
			low-power-enable;
		};
	};

	spi1_default: spi1_default {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 12)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 10)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 11)&amp;gt;;
		};
	};

	spi1_sleep: spi1_sleep {
		group1 {
			psels = &amp;lt;NRF_PSEL(SPIM_SCK, 0, 12)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MOSI, 0, 10)&amp;gt;,
				&amp;lt;NRF_PSEL(SPIM_MISO, 0, 11)&amp;gt;;
			low-power-enable;
		};
	};

};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;You may note that in prj.conf I have commented out the &amp;quot;CONFIG_NRFX&amp;quot; TWI stuff and left in &amp;quot;CONFIG_I2C&amp;quot; stuff as that was causing a compile time issue that was discussed earlier in this ticket.&lt;/p&gt;
&lt;p&gt;Thank you for looking into this for me, your help is much appreciated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/376623?ContentTypeID=1</link><pubDate>Tue, 12 Jul 2022 13:17:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8384b360-6d79-4cd7-8e27-6d7f263b3c73</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thank you for your patience with this. The summer holidays have begun here in Norway, and thus DevZone is operating at reduced capacity. Apologies for any inconveniences this might cause.&lt;br /&gt;&lt;br /&gt;You will need to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_pinctrl.html#migration-of-the-devicetree-files"&gt;make changes to the Device Tree according to the migration guide for the pinctrl migration documentation&lt;/a&gt;&amp;nbsp;in order for this to work after the upgrade to NCS v2.0.0.&lt;br /&gt;Could you possibly share your entire prj.conf and device tree? I could take a look to see if I spot where it is going wrong.&lt;br /&gt;&lt;br /&gt;Please let me know if you would like me to change the ticket to&amp;nbsp;&lt;em&gt;private&amp;nbsp;&lt;/em&gt;before you do any sharing - this will make it viewable by only yourself and the support engineers here at Nordic.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/375881?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 19:36:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:675cfa90-a7c0-4abb-9568-20a293d35052</guid><dc:creator>Ryjan</dc:creator><description>&lt;p&gt;I think I understand what I am looking for now, but I don&amp;#39;t see it. The code I was upgrade from v1.9.1 to v2.0.0 is still having a problem with the I2C (TWI) settings and the PWM settings. Those were both update in a script to migrate them to the newer pinctrl overlay. That seems to be the source of my latest issues. Before, this line of code would set a PWM going:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;		pwm_pin_set_usec(pwm_dev, DT_PROP(PWM_CTRL, ch1_pin), PWM_PER_US, OFF, flags);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;DT_PROP() is giving me trouble here and where it was used for the I2C. It talks about accessing properties from the device tree in the the docs &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api-usage.html#node-identifiers"&gt;here&lt;/a&gt;, but with the new pinctrl setup is does not seem to address the change and the device tree does not seem to work the same. The macro seems to not work for this case. &amp;#39;ch1_pin&amp;#39; doesn&amp;#39;t exist. &amp;#39;clock_frequency&amp;#39; does seem to for the I2C, but the pin and channel numbers do not seem accessible through the &amp;#39;DT_PROP()&amp;#39; macro. Unfortunately, the documentation does not seem to address the change in how I2C, PWM and SPI properties are accessed as far as I can tell.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/375150?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 15:39:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:905629f3-413f-4dfa-a1dd-cab02d593f86</guid><dc:creator>Ryjan</dc:creator><description>&lt;p&gt;It looks like this project had both CONFIG_I2C and CONFIG_NRFX_TWI equaling &amp;#39;y&amp;#39; and I suppose that led to a conflict that was not present in sdk versions older than 2.0.0. I commented out all the NRFX stuff:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;# I2C
CONFIG_I2C=y
CONFIG_I2C_NRFX=y
# CONFIG_NRFX_TWI=y
# CONFIG_NRFX_TWI0=y
# CONFIG_NRFX_TWIM=y
# CONFIG_NRFX_TWIM0=y
CONFIG_I2C_LOG_LEVEL_DBG=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I still haven&amp;#39;t gotten it to compile since the macro &amp;quot;&lt;span style="color:#569cd6;" data-darkreader-inline-color=""&gt;DT_PROP&lt;/span&gt;&amp;quot; appears to use &amp;quot;DT_CAT&amp;quot; to concatenate some stuff to get the identifier for the i2c channel pin. That must have changed between the Zephyr usage and the NRFX usage. I&amp;#39;m digging to find out how to use something else in it&amp;#39;s place, but it looks like you&amp;#39;ve got me on the right track.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migrating to NCS v2.0.0 "error: NRFX_TWI (defined at C:\NCS\v2.0.0\zephyr\modules\hal_nordic\nrfx\Kconfig:277"</title><link>https://devzone.nordicsemi.com/thread/375059?ContentTypeID=1</link><pubDate>Fri, 01 Jul 2022 11:17:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:935619b5-92d5-453d-97a7-2881b8754242</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you were using CONFIG_NRFX_TWI, try using CONFIG_NRFX_TWI1 for example instead, replacing the number with the instance of i2c you are using. This is specifically if you are not using the Zephyr API. When using the Zephyr API just use CONFIG_I2C.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>