<?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>nrf52832 , SPI interface with LIS3DH</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62670/nrf52832-spi-interface-with-lis3dh</link><description>Hello, 
 
 TASK:---------------------------------------------------------------------------------------------------------------------------------- 
 I&amp;#39;m trying to interface LIS3DH in SPI, and read the who_am_i register. 
 
 INFORMATION:--------------</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Jun 2020 11:27:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62670/nrf52832-spi-interface-with-lis3dh" /><item><title>RE: nrf52832 , SPI interface with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/256158?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2020 11:27:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3643c6af-40fc-4724-9ba9-53718c000a27</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Nagashree"]And i have used SES in debug mode.[/quote]
&lt;p&gt;Great! Could you confirm for me that the &amp;quot;DEBUG&amp;quot; is included in the &amp;quot;Preprocessor definitions&amp;quot;?&lt;br /&gt;It is not enough to just select &amp;quot;debug&amp;quot; instead of &amp;quot;release&amp;quot; configuration.&lt;br /&gt;If DEBUG is defined in SES then you should be able to see where an error was generated.&lt;/p&gt;
[quote user="Nagashree"]The Nrfx_spim example is for PCA10056 only and not PCA10040.[/quote]
&lt;p&gt;You have nRF52832 in the title of your ticket, and you have tagged the ticket with nRF52 DK.&lt;br /&gt;Do I understand you correctly that you have now changed your development kit to an nRF52840 DK?&lt;/p&gt;
[quote user="Nagashree"]Even if i implement on this, as soon as i goto debug mode, it shows system handler error.[/quote]
&lt;p&gt;Can you tell me more about this behavior? What error is generated, and where is it generated?&lt;br /&gt;If you have SES in debug mode then it should be visible as soon as the error handler is called.&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: nrf52832 , SPI interface with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/256149?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2020 10:12:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51fe242b-9438-4e91-abd2-f017c950bc39</guid><dc:creator>Nats</dc:creator><description>&lt;p&gt;Dear Karl,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There is no indication on the Sensor module. And i have used SES in debug mode.&lt;/p&gt;
&lt;p&gt;The Nrfx_spim example is for PCA10056 only and not PCA10040. Even if i implement on this, as soon as i goto debug mode, it shows system handler error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 , SPI interface with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/256138?ContentTypeID=1</link><pubDate>Mon, 22 Jun 2020 09:12:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87b3192b-70db-448a-915d-c24659dab145</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Nagashree"]Thank you, the greyed out area problem is resolved.[/quote]
&lt;p&gt;I am happy to hear that issue is resolved.&lt;br /&gt;&lt;br /&gt;Could you configure DEBUG is SES, so that you may see any errors that are called?&lt;br /&gt;I suspect that the 0 you are seeing being returned is in fact the NRF_SUCCESS, indicating your call to spi_transfer was successful.&lt;br /&gt;&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-6e7c7c4e55dc4e09b56305276f782ae8/enabling_5F00_debug_5F00_SES.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Furthermore, what are you seeing on your sensor side of things - does the sensor indicate in any way that communication is happening ( such as a LED blinking ) ?&lt;br /&gt;What is the output of your logs when your code is running?&lt;br /&gt;I would recommend that you base your project upon the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/nrfx_spim_example.html"&gt;nrfx_spim example&lt;/a&gt;, rather than the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/spi_master_example.html"&gt;spi_master example&lt;/a&gt;, since it makes use of the newest nrfx drivers rather than the legacy nrf_drv driver.&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: nrf52832 , SPI interface with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/255969?ContentTypeID=1</link><pubDate>Fri, 19 Jun 2020 12:29:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63d0ac15-445d-43a3-a494-8d43e3aa18d3</guid><dc:creator>Nats</dc:creator><description>&lt;p&gt;Thank you, the greyed out area problem is resolved. But the spi_event handler doesnt execute.&lt;/p&gt;
&lt;p&gt;Debugging flow&lt;/p&gt;
&lt;p&gt;1. nrf_drv_spi_transfer function call&lt;br /&gt;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1592569251795v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. from nrf_drv_spi_transfer , nrfx_spi_xfer is called from&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1592569327738v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;3. from nrfx_spi_xfer, the spi_xfer is called&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1592569491534v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;4&amp;nbsp;nrf_spi_int_enable is called from&amp;nbsp;&lt;span&gt;&amp;nbsp;the spi_xfer&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1592569540618v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And&amp;nbsp;they start reverting the function values back,(backtrack the above path.) and finally return 0.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 , SPI interface with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/255419?ContentTypeID=1</link><pubDate>Wed, 17 Jun 2020 07:57:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:057fba54-1a1f-4b02-bf9b-f8ddab8709a4</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;The fact that your nrfx_spi defines are grayed out indicated that they are not defined, and thus not visible to the preprocessor.&lt;br /&gt;Most likely, this is caused by having unused defines in your sdk_config file - I recommend that you do not set *_ENABLED to 0 in the SDK config, because this will still leave them as defined, even though they are set to 0.&lt;br /&gt;For more information about this, please see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/61337/apply_old_config-h-issue"&gt;this&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/60127/compare-sdk_config-files"&gt;this ticket&lt;/a&gt;. In essence, leaving the *_ENABLED defined to 0 will still make the apply_old override the nrfx driver.&lt;br /&gt;&lt;br /&gt;So, could you try to comment out or remove the legacy spi *_ENABLED 0 defines from your sdk_config, and see if this resolves your issue?&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></channel></rss>