<?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>SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30516/spi-initialization-for-communicating-with-the-sensor</link><description>I am using a custom board based on nRF52 (nRF52832-QFAB-R). I am using the ble_hid_mouse app and performing the initialization for SPI in the main routine. But with the SPI initialization code enabled the device stops even advertising whereas with SPI</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 26 Feb 2018 13:03:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30516/spi-initialization-for-communicating-with-the-sensor" /><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/121960?ContentTypeID=1</link><pubDate>Mon, 26 Feb 2018 13:03:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2461957d-8ea6-43de-8feb-b14987f6d4e0</guid><dc:creator>alokmishra</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I worked with the attached zip file once again and this project as it is works with error code 0.&lt;/p&gt;
&lt;p&gt;But doing it in exactly same way also in my implementation it does not work. Error code 8 means invalid state i.e, either the pin is in use or the module is not initialized.&amp;nbsp;Considering the attached zip is not doing much and just involve one user.. Pin number seems not to be in use already and module also is getting initialized. Can you please provide some input?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/121883?ContentTypeID=1</link><pubDate>Sat, 24 Feb 2018 17:58:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e4c438d-5812-4aca-a1b9-c2433789e6c5</guid><dc:creator>alokmishra</dc:creator><description>&lt;p&gt;I am still not able to resolve this issue with&amp;nbsp;&lt;span&gt;app_gpiote_user_register() as my custom board is not able to advertise and connect if I keep this&amp;nbsp;app_gpiote_user_register() as enabled. If I comment it out, the custom board is able to advertise and connect everytime. Debugging this I am getting error code 8 for the&amp;nbsp;app_gpiote_user_register() routine. The attached zip also gives the same error code for me.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/121569?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2018 17:52:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86a36783-c2fd-41d4-840d-7b3867c3f664</guid><dc:creator>alokmishra</dc:creator><description>&lt;p&gt;Thanks.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/121505?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2018 11:40:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69521d26-2ab1-42a6-b863-819955f38f28</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I&amp;#39;ve attached a keil project that seems to work:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-3f9d27f69d6a48f48d9ba8137fa4c550/app_5F00_gpiote.zip"&gt;devzone.nordicsemi.com/.../app_5F00_gpiote.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/121283?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2018 15:18:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9eb927bd-8179-4ba2-8e37-ce4c02d5c638</guid><dc:creator>alokmishra</dc:creator><description>&lt;p&gt;MAX_USER is 5.&lt;/p&gt;
&lt;p&gt;Initially I was performing these same steps as you have mentioned above but, the&amp;nbsp;&lt;span&gt;app_gpiote_user_register() fails with&amp;nbsp;ERROR code 4.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/121278?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2018 14:46:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ed7e813-1cce-47da-af73-4dc32608feb1</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;What is the size of MAX_USER?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You do not need to&amp;nbsp;initialize&amp;nbsp;the driver or pass it configs when using the app_gpiote library.&lt;/p&gt;
&lt;p&gt;Steps to use the library:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;APP_GPIOTE_INIT&lt;span&gt;(&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;app_gpiote_user_register()&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;&lt;span&gt;app_gpiote_user_enable()&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;See SDK14.2/components/libraries/gpiote/app_gpiote.h for more information&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/121185?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2018 06:30:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fc3707f-a549-442f-b506-b51174d265bf</guid><dc:creator>alokmishra</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;I am still not able to resolve this issue. Can you please let me know if some pointers on this?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/121065?ContentTypeID=1</link><pubDate>Fri, 16 Feb 2018 10:49:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae44df9e-0907-4b07-b2f9-b01657dea60a</guid><dc:creator>alokmishra</dc:creator><description>&lt;p&gt;Any input on why the app_gpiote_user_register() routine returns the ERROR code? Is it required to perform APP_GPIOTE_INIT(MAX_USERS)&amp;nbsp; before registering the user (though the result is same for me even if done this way)?&lt;/p&gt;
&lt;p&gt;Result is same by performing the same in following way :&lt;/p&gt;
&lt;p&gt;&lt;span class="pl-k"&gt;if&lt;/span&gt; (!&lt;span class="pl-c1"&gt;nrf_drv_gpiote_is_init&lt;/span&gt;())&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; err_code = &lt;span class="pl-c1"&gt;nrf_drv_gpiote_init&lt;/span&gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="pl-c1"&gt;APP_ERROR_CHECK&lt;/span&gt;(err_code);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;span class="pl-c1"&gt;nrf_drv_gpiote_in_config_t&lt;/span&gt; gpiote_in_config;&lt;br /&gt;gpiote_in_config.&lt;span class="pl-smi"&gt;is_watcher&lt;/span&gt; = val&lt;span class="pl-c1"&gt;&lt;/span&gt;;&lt;br /&gt;gpiote_in_config.&lt;span class="pl-smi"&gt;hi_accuracy&lt;/span&gt; = val&lt;span class="pl-c1"&gt;&lt;/span&gt;;&lt;br /&gt;gpiote_in_config.&lt;span class="pl-smi"&gt;pull&lt;/span&gt; = val;&lt;br /&gt;gpiote_in_config.&lt;span class="pl-smi"&gt;sense&lt;/span&gt; = val;&lt;/p&gt;
&lt;p&gt;err_code = &lt;span class="pl-c1"&gt;nrf_drv_gpiote_in_init&lt;/span&gt;(Pin, &amp;amp;gpiote_in_config, gpiote_evt_handler);&lt;br /&gt;&lt;span class="pl-c1"&gt;APP_ERROR_CHECK&lt;/span&gt;(err_code);&lt;br /&gt;&lt;span class="pl-c1"&gt;nrf_drv_gpiote_in_event_enable&lt;/span&gt;(Pin, &lt;span class="pl-c1"&gt;true&lt;/span&gt;);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/120939?ContentTypeID=1</link><pubDate>Thu, 15 Feb 2018 08:53:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbdc0b17-fc41-4352-8482-a111e22f27b2</guid><dc:creator>alokmishra</dc:creator><description>&lt;p&gt;Hi H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;While performing the initialization for the SPI, I am configuring a pin in order to monitor the motion events from the sensor over SPI using the routine : nrf_gpio_cfg_input(pin num, NRF_GPIO_PIN_NOPULL). After this I am registering a gpiote user/handler for the same using the call to &lt;strong&gt;app_gpiote_user_register()&lt;/strong&gt; routine.&lt;/p&gt;
&lt;p&gt;On debugging, it is found that the app_gpiote_user_register() routine returns the ERROR code 4(No Memory).&lt;/p&gt;
&lt;p&gt;Just to inform that I am not doing APP_GPIOTE_INIT(MAX_USERS) or app_gpio_init() before this anywhere in the code currently but I have already tested by performing the above initialization also with same result.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI initialization for communicating with the sensor</title><link>https://devzone.nordicsemi.com/thread/120873?ContentTypeID=1</link><pubDate>Wed, 14 Feb 2018 15:13:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2b53320-3890-43ba-b1b2-d5d8c5cc0a0e</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Hey Alok,&lt;/p&gt;
&lt;p&gt;We need more information. &amp;quot;&lt;span&gt;with the SPI initialization code enabled the device stops even advertising&amp;quot;, what do you mean by stops advertising, does your softdevice calls return any error message?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Håkon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>