<?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>There is a problem adding I2S code.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70686/there-is-a-problem-adding-i2s-code</link><description>Hello 
 I am using nrf52832 and sdk v17.0 I recently succeeded in controlling several ws2812 LEDs through I2S. And now I&amp;#39;m going to combine these codes with the others. 
 However, when I debug the combined code, &amp;#39;i2s_init()&amp;#39; outputs the following error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Jan 2021 23:56:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70686/there-is-a-problem-adding-i2s-code" /><item><title>RE: There is a problem adding I2S code.</title><link>https://devzone.nordicsemi.com/thread/290624?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 23:56:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fa76f50-b788-4222-b494-0d940ac70165</guid><dc:creator>schosdas</dc:creator><description>&lt;p&gt;Oh... I see..&lt;br /&gt;I&amp;#39;ll try a little more.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: There is a problem adding I2S code.</title><link>https://devzone.nordicsemi.com/thread/290456?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 10:44:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f58306c3-9fa4-4803-857e-3ae9b26e4c0a</guid><dc:creator>awneil</dc:creator><description>[quote userid="92575" url="~/f/nordic-q-a/70686/there-is-a-problem-adding-i2s-code/290384#290384"]I solved this problem by disabling NRFX_ASSERT().[/quote]
&lt;p&gt;Err ... No, that&amp;#39;s doesn&amp;#39;t solve the problem - it just masks the symptoms!&lt;/p&gt;
&lt;p&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f62e.svg" title="Open mouth"&gt;&amp;#x1f62e;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;An Assert is to tell you when you&amp;#39;re doing stuff wrong; removing the Assert means you&amp;#39;re still doing stuff wrong - just not being told about it!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: There is a problem adding I2S code.</title><link>https://devzone.nordicsemi.com/thread/290384?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 04:33:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:633c93d2-976d-47c3-9358-98cfbcd08937</guid><dc:creator>schosdas</dc:creator><description>&lt;p&gt;Hello&lt;br /&gt;Thank you so much for your help.&lt;/p&gt;
&lt;p&gt;I solved this problem by disabling NRFX_ASSERT().&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: There is a problem adding I2S code.</title><link>https://devzone.nordicsemi.com/thread/290273?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 13:30:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8563efb-ddd2-458e-be6e-6742e18942dc</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;in the nrfx_i2s.c driver, it assumes that you use SCK and LRCK:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void configure_pins(nrfx_i2s_config_t const * p_config)
{
    uint32_t mck_pin, sdout_pin, sdin_pin;

    // Configure pins used by the peripheral:

    // - SCK and LRCK (required) - depending on the mode of operation these
    //   pins are configured as outputs (in Master mode) or inputs (in Slave
    //   mode).
    if (p_config-&amp;gt;mode == NRF_I2S_MODE_MASTER)
    {
        nrf_gpio_cfg_output(p_config-&amp;gt;sck_pin);
        nrf_gpio_cfg_output(p_config-&amp;gt;lrck_pin);
    }
    ....&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When the preprocessor symbol &amp;quot;DEBUG_NRF&amp;quot; is defined, it enables the NRFX_ASSERT(), and it asserts on the nrf_gpio_cfg()-&amp;gt;nrf_gpio_pin_port_decode() function unless the input pin is within a valid range for the target device you&amp;#39;re compiling for.&lt;/p&gt;
&lt;p&gt;If you supply it with any unused pin, it should not assert. You can alternatively patch the above function with an additional if pin !=&amp;nbsp;NRFX_I2S_PIN_NOT_USED.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: There is a problem adding I2S code.</title><link>https://devzone.nordicsemi.com/thread/290175?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 09:45:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4eab653a-b8c7-45cc-acf8-ab74ff9f8b25</guid><dc:creator>schosdas</dc:creator><description>&lt;p&gt;Hello&lt;br /&gt;Thank you for your help.&lt;br /&gt;&lt;br /&gt;I am also referring to that example, but I mainly referred to the example of the site below.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/cheehieu/nrf52-sk6812-led-driver#overview"&gt;https://github.com/cheehieu/nrf52-sk6812-led-driver#overview&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;a href="https://github.com/cheehieu/nrf52-sk6812-led-driver#overview"&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="vertical-align:inherit;"&gt;&lt;span style="vertical-align:inherit;"&gt;For an error caused by not specifying a valid pin, should I replace the pin I&amp;#39;m using with another pin?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thank you.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: There is a problem adding I2S code.</title><link>https://devzone.nordicsemi.com/thread/290155?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 09:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:979f343d-87f8-4429-85ac-7ffbc4e39865</guid><dc:creator>awneil</dc:creator><description>[quote userid="92575" url="~/f/nordic-q-a/70686/there-is-a-problem-adding-i2s-code"]controlling several ws2812 LEDs through I2S[/quote]
&lt;p&gt;So you&amp;#39;re looking at this:&amp;nbsp;&lt;a href="https://electronut.in/nrf52-i2s-ws2812/"&gt;https://electronut.in/nrf52-i2s-ws2812/&lt;/a&gt;&amp;nbsp;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: There is a problem adding I2S code.</title><link>https://devzone.nordicsemi.com/thread/290152?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 08:59:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d515fec-01b5-4356-bb4c-6df5b14a5b9e</guid><dc:creator>awneil</dc:creator><description>[quote userid="92575" url="~/f/nordic-q-a/70686/there-is-a-problem-adding-i2s-code"] NRFX_ASSERT(nrf_gpio_pin_present_check(*p_pin)); // &amp;lt; &amp;lt; error [/quote]
&lt;p&gt;So the&amp;nbsp;&lt;strong&gt;nrf_gpio_pin_present_check&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is failing - ie, it thinks you are not specifying a valid pin.&lt;/p&gt;
&lt;p&gt;Look into&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;nrf_gpio_pin_present_check&lt;/strong&gt;() to see if you can find that error code ...&lt;/p&gt;
&lt;p&gt;Use the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;debugger&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;to see what&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;&lt;strong&gt;is&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/em&gt;being passed...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: There is a problem adding I2S code.</title><link>https://devzone.nordicsemi.com/thread/290148?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 08:54:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee347f82-7918-4389-ab28-95e34e584151</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;em&gt;(sorry, the forum really messed that up - why is it not possible to quote source code?! &lt;/em&gt;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f61e.svg" title="Disappointed"&gt;&amp;#x1f61e;&lt;/span&gt;&lt;em&gt; )&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>