<?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>NRF/NRFX TWI manager configurations &amp;amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37879/nrf-nrfx-twi-manager-configurations-nrfx_twi0_inst_idx-undeclared</link><description>Cheers! 
 I&amp;#39;ve been working to enable TWI0 for our current project, but I&amp;#39;ve been getting stuck on this compile error: 
 
 ../SDK/modules/nrfx/drivers/include/nrfx_twi.h:73:35: error: &amp;#39;NRFX_TWI0_INST_IDX&amp;#39; undeclared here (not in a function); did you mean</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 26 Jul 2020 09:04:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37879/nrf-nrfx-twi-manager-configurations-nrfx_twi0_inst_idx-undeclared" /><item><title>RE: NRF/NRFX TWI manager configurations &amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/thread/261689?ContentTypeID=1</link><pubDate>Sun, 26 Jul 2020 09:04:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27bf37bf-8fe1-423b-b2a4-cf3e7645c649</guid><dc:creator>Sherief</dc:creator><description>&lt;p&gt;The problem is that somewhere in this header include maze NRFX is forcing the include of&amp;nbsp;&lt;span&gt;apply_old_config.h, which proceeds to #undef all your TWI #defines. In my case I added&amp;nbsp;-DAPPLY_OLD_CONFIG_H__ to my build flags, which causes the header guard checks in apply_old_config.h to fail thinking that the header has already been included - same thing as never including the header at all. Other options are to rip the header out of the SDK but I wanted to keep my code buildable with a stock install of the SDK.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF/NRFX TWI manager configurations &amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/thread/184257?ContentTypeID=1</link><pubDate>Mon, 29 Apr 2019 09:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9082a0e0-6b3d-4f7d-afcf-1eff676f22e2</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41707/fails-to-use-nrfx-modules"&gt;this answer&lt;/a&gt;, where I tried to explain the relation between the nrfx and the legacy API. If you are still confused, please explain what you don&amp;#39;t understand and I will try to help.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF/NRFX TWI manager configurations &amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/thread/184043?ContentTypeID=1</link><pubDate>Fri, 26 Apr 2019 11:13:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cde7ad23-30bc-4ff9-97cf-f5655e7384ee</guid><dc:creator>nikhilesh</dc:creator><description>&lt;p&gt;Hey Simon. Could you please help me?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF/NRFX TWI manager configurations &amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/thread/184000?ContentTypeID=1</link><pubDate>Fri, 26 Apr 2019 09:08:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8153dc69-fb0a-428e-b35e-b2d9802351be</guid><dc:creator>nikhilesh</dc:creator><description>&lt;p&gt;Hey birdmachine,&lt;/p&gt;
&lt;p&gt;So you resolved the error?&lt;/p&gt;
&lt;p&gt;I keep getting this error please help me&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Error[Pe020]: identifier &amp;quot;NRFX_TWIM0_INST_IDX&amp;quot; is undefined&amp;nbsp;&lt;/p&gt;
&lt;p&gt;in main.c&lt;/p&gt;
&lt;p&gt;:(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF/NRFX TWI manager configurations &amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/thread/146751?ContentTypeID=1</link><pubDate>Fri, 31 Aug 2018 11:56:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2510d506-f346-4529-82fe-cabbdf84a1b8</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Glad to hear that you finally made it work. Please ask if you enter any more problems.&lt;/p&gt;
&lt;p&gt;Cheers, Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF/NRFX TWI manager configurations &amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/thread/146402?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 06:16:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4bf9e16-f1ff-4ac2-977b-81be25c213d2</guid><dc:creator>birdmachine</dc:creator><description>&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;br /&gt;I get TRUE finally when I do the opposite, actually. I took another shot at purging every non-nrfx mention of TWI from the sdk_config and now it gives me both true and compiles as intended! I must have left something behind last I tried this. &lt;strong&gt;THANK YA&amp;#39;LL&lt;/strong&gt; for the help :D !!&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Gave it a shot with &lt;br /&gt;TWI0_ENABLED 1&lt;br /&gt;TWI0_USE_EASY_DMA 1&lt;br /&gt;with the nrfx_twi definitions both present and completely striped from the sdk_config. Seems like it simply overwrites if it&amp;#39;s already present/defined, but at this point I&amp;#39;m trying everything. Neither method fixes this unfortunately.&lt;br /&gt;&lt;br /&gt;so nrfx_twi.c is definitely being brought in and compiled; Added&amp;nbsp; a few tests in here as well to see what&amp;#39;s going on...&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#if NRFX_CHECK(NRFX_TWI_ENABLED)
    #error &amp;quot;NRFX_TWI_ENABLED TRUE&amp;quot;
#else
    #error &amp;quot;NRFX_TWI_ENABLED FALSE&amp;quot;
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;With the above I&amp;#39;m getting NRFX_TWI_ENABLED FALSE on compile.&lt;br /&gt;Also tried massaging that into&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;#if NRFX_TWI_ENABLED==0
    #error &amp;quot;NRFX_TWI_ENABLED FALSE&amp;quot;
#else
    #error &amp;quot;NRFX_TWI_ENABLED TRUE&amp;quot;
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;And still, FALSE. &lt;br /&gt;&lt;br /&gt;The result&amp;#39;s the same&lt;br /&gt;No matter what I change, add, or remove, NRFX_TWI_ENABLED is 0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF/NRFX TWI manager configurations &amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/thread/146194?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2018 00:59:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1620c7a6-669b-40ee-8c5e-c3974b7e0932</guid><dc:creator>laserdan</dc:creator><description>&lt;p&gt;Update: I guess something else in the sdk_config file is forcing apply_old_config, so I have to go back to nrf_drv_ functions--but I am back to getting &amp;quot;undefined reference to &amp;#39;nrfx_twi_tx&amp;quot; and &amp;quot;nrfx_twi_rx&amp;quot;.&amp;nbsp; In sdk_config.h iI have only set&amp;nbsp;TWI_ENABLED&amp;nbsp; and&amp;nbsp; NRFX_TWI_ENABLED&amp;nbsp; since that was in the logical statement and it still failed. Then I put in a print line to see if TWI_PRESENT was defined and it was. So I&amp;#39;m confused as to why this redefinition in&amp;nbsp; is not executing and the nrfx_twi_tx function is not defined. Way down in nrfx_twi.h where this function is defined I ran the same NRFX_CHECK error check and it passed. I can muck with nrfx_twi.h and get errors so I know it is being called by nrf_drv_twi.h and TWI_PRESENT is defined. So why are they functions being defined?&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Looks like my nrfx_twi.c function is not being compiled--I can muck with it but it doesn&amp;#39;t do anything. I need to figure out how to modify the makefile to link it.&lt;/p&gt;
&lt;p&gt;Update: Solved. For some reason the Keil project was able to find and link nrfx_twi.c and nrf_drv_twi.c but I had to manually add them to the makefile for gcc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF/NRFX TWI manager configurations &amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/thread/146191?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2018 00:42:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6fad026-82a5-4ec7-9bae-b40c8a4c45d2</guid><dc:creator>laserdan</dc:creator><description>&lt;p&gt;I have the same issue. I&amp;#39;m trying to use the &amp;quot;nrfx_twim.h&amp;quot; library and functions in the ble_app_hrs example. I am getting the same error. I have NRFX_TWIM_ENABLED = 1, NRFX_TWIM0_ENABLED = 1, THen I set, TWI_ENABLED = 1 and TWI0_ENABLED = 1. I can&amp;#39;t figure out why if I am using the new libraries and functions I should need the apply_old_config.h file. I also can&amp;#39;t figure out why that section of code in nrfx_twim.h is failing. I added debuggers in main.c and the output confirms the asserted definitions above are correct. What am I missing? BTW, I am trying to compile with GCC. I switched the functions from&amp;nbsp; nrf_drv to nrfx_ because it won&amp;#39;t compile in GCC, although it did compile in Keil with nrf_drv_&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF/NRFX TWI manager configurations &amp; NRFX_TWI0_INST_IDX undeclared</title><link>https://devzone.nordicsemi.com/thread/146152?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 14:54:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:530d620a-ba85-455c-8b7c-a8cee5f1b892</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Have you tried to set TWI0_ENABLED and TWI_ENABLED&amp;nbsp;to 1 (not NRFX_TWI..), I think that will solve your problem.&lt;/p&gt;
&lt;p&gt;The reason for this is that NRFX_TWI0_ENABLED is defined as follows (in the file apply_old_config.h):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#undef NRFX_TWI0_ENABLED
#define NRFX_TWI0_ENABLED   (TWI0_ENABLED &amp;amp;&amp;amp; !TWI0_USE_EASY_DMA)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards, Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>