<?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>Enabling TWIS driver</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119233/enabling-twis-driver</link><description>Hi, 
 I am trying to create a I2C slave application on the nrF Connect 2.9 SDK for nRF51840. But I have trouble tor enable the twis driver (e.g. the irq_hanlder is not included). 
 In the first attempt I will not create a driver for the master device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Feb 2025 12:05:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119233/enabling-twis-driver" /><item><title>RE: Enabling TWIS driver</title><link>https://devzone.nordicsemi.com/thread/524573?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 12:05:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c132a5d0-25a6-4e88-acda-b340810f2b0c</guid><dc:creator>k.leonhardt</dc:creator><description>&lt;p&gt;Found something&lt;/p&gt;
&lt;p&gt;The driver is still not enabled. But I think that I have corrected something since the build output above.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;warning: NRFX_TWIS1 (defined at C:/ncs/v2.9.0/zephyr/modules/hal_nordic\nrfx/Kconfig:938,
modules\hal_nordic\nrfx/Kconfig:938) was assigned the value &amp;#39;y&amp;#39; but got the value &amp;#39;n&amp;#39;. Check these
unsatisfied dependencies: n (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRFX_TWIS1 and/or look up NRFX_TWIS1 in the
menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
and Kconfig - Tips and Best Practices sections of the manual might be helpful too.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Now the build actually reports that the driver is disabled&lt;/p&gt;
&lt;p&gt;I found out that I had removed the&amp;nbsp;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;compatible = &amp;quot;nordic,nrf-twis&amp;quot;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;from the overlay file, because the original guide I followed instructed not to add it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now project compiles. Thanks. Now debugging time . . .&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;By the way, the examples does not compile in SDK version 2.9. But I got the SDK 2.7 version compiled, after correcting some&amp;nbsp;a invalid reference to the&amp;nbsp;&amp;nbsp;&lt;/span&gt;common-pinctrl.dtsi file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling TWIS driver</title><link>https://devzone.nordicsemi.com/thread/524510?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 08:46:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:189a2d0d-5d7b-4d93-aec3-ea698ae3df82</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;If you haven&amp;#39;t already you should go through:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/"&gt;https://academy.nordicsemi.com/&lt;/a&gt;&lt;/p&gt;
[quote user="k.leonhardt"]In &amp;quot;old days&amp;quot; we enabled drivers in the sdk_config file. But how do you do it when using the new SDK&amp;#39;s?[/quote]
&lt;p&gt;This is done in .conf files, such as this one:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/blob/master/nrfx/samples/src/nrfx_twim_twis/boards/nrf52840dk_nrf52840.conf"&gt;https://github.com/zephyrproject-rtos/hal_nordic/blob/master/nrfx/samples/src/nrfx_twim_twis/boards/nrf52840dk_nrf52840.conf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But also you need the twis in the devicetree:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/blob/master/nrfx/samples/src/nrfx_twim_twis/boards/nrf52840dk_nrf52840.overlay"&gt;https://github.com/zephyrproject-rtos/hal_nordic/blob/master/nrfx/samples/src/nrfx_twim_twis/boards/nrf52840dk_nrf52840.overlay&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling TWIS driver</title><link>https://devzone.nordicsemi.com/thread/524490?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2025 07:33:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:112c1972-58ab-40e3-8e8b-d8894ce11afc</guid><dc:creator>k.leonhardt</dc:creator><description>&lt;p&gt;Hi Kenneth&lt;/p&gt;
&lt;p&gt;Thanks for the answer.&lt;/p&gt;
&lt;p&gt;But I believe that I generally did as the examples you pointed out. The problem is that the nrfx_twis.c file is not compiled as the driver is not enabled because NRFX_CHECK(NRFX_TWIS_ENABLED) is not true. (And the irq handler would probably not be enabled anyway).&lt;/p&gt;
&lt;p&gt;In &amp;quot;old days&amp;quot; we enabled drivers in the sdk_config file. But how do you do it when using the new SDK&amp;#39;s?&lt;/p&gt;
&lt;p&gt;Kasper&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling TWIS driver</title><link>https://devzone.nordicsemi.com/thread/524330?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 12:21:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f684a15f-a813-4cea-9143-82435f5c4925</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Unfortunately I do not believe there is support for i2c slave in zephyr.&lt;/p&gt;
&lt;p&gt;So I don&amp;#39;t see any way to do this without using the nrfx api directly, you can find this as a guide:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_twim_twis"&gt;https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_twim_twis&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling TWIS driver</title><link>https://devzone.nordicsemi.com/thread/524237?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 07:16:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2215b85c-3a0e-4b8c-8d92-3a6c4db270a4</guid><dc:creator>k.leonhardt</dc:creator><description>&lt;p&gt;I forgot to mention that I&amp;#39;m using the&amp;nbsp;&lt;span&gt;nRF52840-DK as is, and I&amp;#39;m using the board configuration for the board in the build configuration.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling TWIS driver</title><link>https://devzone.nordicsemi.com/thread/524232?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2025 07:05:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd9a28a9-7c71-409e-800d-c6d1a3f3f847</guid><dc:creator>k.leonhardt</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I just noticed that when I open the devicetree overlay in the graphical presentation, the I2C1 peripheral is not shown. And if I try to enable it, it is not available.&lt;/p&gt;
&lt;p&gt;The other serial peripherals I&amp;#39;m using for other purpose are: SPI3, I2C0, UART0. These are show correctly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling TWIS driver</title><link>https://devzone.nordicsemi.com/thread/524200?ContentTypeID=1</link><pubDate>Sun, 23 Feb 2025 10:48:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56f761b9-602a-4f36-9c4b-14339ca4c20d</guid><dc:creator>k.leonhardt</dc:creator><description>&lt;p&gt;By the way, I tried to follow the guide on&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/peripherals/posts/twi-ic2-implementation-with-nrfx-twis-driver"&gt;TWI/I2C implementation with nRFx TWIS Driver&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But it uses an old SDK with different pin control setup in the device tree.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Enabling TWIS driver</title><link>https://devzone.nordicsemi.com/thread/524199?ContentTypeID=1</link><pubDate>Sun, 23 Feb 2025 09:55:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cf80dde-dc46-4aa3-bc10-f9228d52a9ed</guid><dc:creator>k.leonhardt</dc:creator><description>&lt;p&gt;By the way, by looking at the nrfx_twis.c file in VS Code I can se that&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;#if NRFX_CHECK(NRFX_TWIS_ENABLED)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;compiles to false.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>