<?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>Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33890/get-x-y-z-values-from-lis3dh-using-nrf52-development-board</link><description>Hi! 
 I am trying to interface LIS3DH module ( https://www.adafruit.com/product/2809 ) with nRF52 DK, SDK 11, via i2c/spi. I tested on Arduino UNO &amp;amp; it gave x,y,z values. So, I decided to write nrf driver for LIS3DH using Adafruit LIS3DH driver( https</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Feb 2022 16:23:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33890/get-x-y-z-values-from-lis3dh-using-nrf52-development-board" /><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/351196?ContentTypeID=1</link><pubDate>Thu, 03 Feb 2022 16:23:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73121dab-7086-4601-b9e4-dd9d084a64eb</guid><dc:creator>Piyush_9536</dc:creator><description>&lt;p&gt;can you please tell me how you had taken the values of divider corresponding to different G?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/250404?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 10:28:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93f27a7e-bb07-4787-b3f8-2da7e8d46202</guid><dc:creator>Nats</dc:creator><description>&lt;p&gt;Can you kindly share the code if possible along with drivers?...Im kinda facing the same problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/172378?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 18:16:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ab0b9b2-47a4-4996-83e0-68ed7d2bd01d</guid><dc:creator>B.John</dc:creator><description>&lt;p&gt;Hey Prasad, wondering if you finally got it to work and would be great if you could please share your work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/158342?ContentTypeID=1</link><pubDate>Wed, 21 Nov 2018 09:12:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66349a60-3b1a-48b8-8dc3-1dda6a82288a</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;Yes, MDBT42 module advertises BLE &amp;amp; data is received on Android. The issue with MDBT modules is sometimes they won&amp;#39;t work or fit on the custom PCB&amp;nbsp;you want to design or gives routing issues which result in abnormal behavior of other GPIO peripherals like LEDs won&amp;#39;t glow proper or i2c will not work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/144999?ContentTypeID=1</link><pubDate>Mon, 20 Aug 2018 21:20:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2812ee9-8cc9-4f98-94e1-108268527dbe</guid><dc:creator>Rajneesh</dc:creator><description>&lt;p&gt;Hi Vishal, Does MDBT42V advertise BLE? Which setting did you do? I see there is no any external crystals are connected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/140174?ContentTypeID=1</link><pubDate>Mon, 16 Jul 2018 08:59:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec4c782a-47ad-4a8e-9ac4-4d135e96e191</guid><dc:creator>Prasad PL</dc:creator><description>&lt;p&gt;Thanks Edvin.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/140158?ContentTypeID=1</link><pubDate>Mon, 16 Jul 2018 06:45:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22991214-8fbc-4fc0-9b9d-59a2f7eadd7e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;If you are looking for code that enables interrupts on pins, I would suggest that you look at the SDK\examples\peripheral\pin_int_change example. I believe that this does what you are looking for.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Description &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fpin_change_int_example.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/139471?ContentTypeID=1</link><pubDate>Mon, 09 Jul 2018 21:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31101c46-36ae-469b-ab0b-d3bb48833b7c</guid><dc:creator>Prasad PL</dc:creator><description>&lt;p&gt;Edvin,&lt;/p&gt;
&lt;p&gt;I could get the LIS3DH over i2C to read and write using these files on some of my custom hardware using v15 SDK.&lt;/p&gt;
&lt;p&gt;But I am stuck at GPIOTE code to capture the interrupt from LIS3DH.&lt;/p&gt;
&lt;p&gt;It is not clear what code/libraries has become obsolete from Nordic info center.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.0.0%2Flib_gpiote.html"&gt;https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.0.0%2Flib_gpiote.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Some critical code &amp;quot;app_gpiote_user_register&amp;quot; that is being used in these files - seems obsolete as per documentation.&lt;/p&gt;
&lt;p&gt;retval =&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a class="code" title="Function for registering a GPIOTE user." href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__app__gpiote.html#ga14cfb7838b6f4393c62f6e91c765c6e5"&gt;app_gpiote_user_register&lt;/a&gt;(&amp;amp;m_example_user_id,&lt;/p&gt;
&lt;div class="line"&gt;low_to_high_bitmask,&lt;/div&gt;
&lt;div class="line"&gt;high_to_low_bitmask,&lt;/div&gt;
&lt;div class="line"&gt;example_gpiote_event_handler);&lt;/div&gt;
&lt;div class="line"&gt;&lt;/div&gt;
&lt;div class="line"&gt;Would you route me to some example code or information on recent legacy GPIOTE driver one must use for new projects.&lt;/div&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Prasad&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/134028?ContentTypeID=1</link><pubDate>Wed, 30 May 2018 12:34:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:226ce684-f56b-4078-847d-511898730709</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Can you analyze i2c/twi traffic over it? I would recommend something like the &lt;a href="https://www.google.no/search?q=saleae&amp;amp;oq=saleae&amp;amp;aqs=chrome..69i57j0l5.846j0j4&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8" target="_blank" rel="noopener noreferrer"&gt;saleae analyzer&lt;/a&gt;, as it can translate the i2c signal into chars that are readable for humans, but I assume that you can test with the oscilloscope as well. Just see if there is any data on the i2c wires makes any sense.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/134000?ContentTypeID=1</link><pubDate>Wed, 30 May 2018 10:28:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:759d924e-7212-4dac-97de-27b018e5fe3c</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;We have&amp;nbsp;&lt;a href="http://www.gwinstek.com/en-global/products/Oscilloscopes/Digital_Storage_Oscilloscopes/GDS-1000A-U"&gt;http://www.gwinstek.com/en-global/products/Oscilloscopes/Digital_Storage_Oscilloscopes/GDS-1000A-U&lt;/a&gt;&amp;nbsp;this Oscilloscope right now can be debug the target board using this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/132951?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 10:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a81934de-9f78-4504-ac23-6167ef7fdbbe</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok,&lt;/p&gt;
&lt;p&gt;Try to &amp;quot;sniff&amp;quot; the I2C traffic using a logic analyzer, such as the saleae analyzer. See if you can see any difference using the module and the DK. It might be that the&amp;nbsp;LIS3DH&amp;nbsp;has a more strict timing requirement. But either way, try to check the signal using a logic analyzer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/132945?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 09:44:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e469dfd-cfeb-4f9f-b30a-a8ead841338d</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;BLE is advertising &amp;amp; I am getting TEMPERATURE from MAX IC on BLE using external pull-ups of 4.7kohm. then I don&amp;#39;t think there&amp;#39;s a crystal problem?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/132943?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 09:33:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72205b9f-988d-466e-ae88-23420169bae8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Sorry. SDK11 was before the sdk_config.h file was introduced. But if you have a LFXTAL, you should not use the RC Oscillator, so never mind.&lt;/p&gt;
&lt;p&gt;I am no XTAL expert, but am I right if the load capacitance of your LFXTAL is 12.5pF? Please confirm this before looking at the calculations below (!)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;According to the nRF Spec, the capacitance of C9 and C10. The formula for the external capacitors is:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-21f6c20f6a4d477788b9c4f34c490661/pastedimage1527067566649v1.gif" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Since 21pF is not available, you should go for 18pF on C9 and C10. I got this confirmed from one of our HW guys. He recommended to go down to 18pF, since you often have a bit of capacitance in the PCB trace, and a bit more if you are close to a ground pane.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Since the LFXTAL often is the biggest difference between the DK and other PCBs/3rd party modules, I would recommend that you try this. You will have to change this anyway, since the C9 and C10 are too low for the spec.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/132921?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 08:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12ad67a7-d9d4-46f4-9132-6bbdbce5b58e</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/06402.Capture.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Using&amp;nbsp;LFXTAL009678Reel SMD&lt;/p&gt;
&lt;p&gt;What is the directory of &lt;strong&gt;sdk_config.h&lt;/strong&gt; ? I can&amp;#39;t find in my project folder.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/132865?ContentTypeID=1</link><pubDate>Wed, 23 May 2018 06:36:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94eefaf2-71b5-4f53-b948-ad68f94e5485</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Oh. Ok. Now I understand. So it works with the DK, but not with the nRF52 module.&lt;/p&gt;
&lt;p&gt;Do you use a LFXTAL with your 3rd party module? That is the only change I can think of. I assume that you have the correct pins connected to the TWI while using the target board/module. Either wired up the same pins, or changed the GPIOs in SW.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you do not have a LFXTAL, what is your RC Oscillator settings (from sdk_config.h)?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/132750?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 12:14:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9669f9ea-9399-4ae5-a361-7b2649fd39f8</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;Target board is &lt;strong&gt;MDBT42V&lt;/strong&gt; module (&lt;a href="http://www.raytac.com/product_detail.php?id=73"&gt;http://www.raytac.com/product_detail.php?id=73&lt;/a&gt;) is based on nrf52832 which has LIS3DH &amp;amp; MAX30205 IC .&lt;/p&gt;
&lt;p&gt;I2C address for both ICs are correct.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/132698?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 09:23:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14bcc1d6-6d19-4a0b-83b8-e88addd9bab0</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;which one is the &amp;quot;target board&amp;quot;? The &lt;a href="https://datasheets.maximintegrated.com/en/ds/MAX30205.pdf"&gt;MAX30205&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Do you use the correct TWI/I2C address for the MAX30205?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/132636?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 06:45:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cffa3cc-f777-4f07-8aae-a04ee383fd0c</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Now, I am getting response from LIS3DH module with x,y,z values using nRF52 DK. But, using same driver I am not getting response from target board:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0675.test.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MDBT42V which has nRF52832&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;LIS3DH +&amp;nbsp;MAX30205 IC&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Given external pull-ups of 4.7k ohm as well as tried with 10k ohm to i2c bus)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;i2c SCL-9, SDA-10 defined same in code &amp;amp; target board&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Please suggest how to debug this issue&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/131870?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 12:33:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a06ab7fa-ec63-4090-b5a9-d55daf75d700</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;It looks like it was written for one of the older SDKs. SDK13 has a function called app_twi_perform, found in app_twi.c and app_twi.h. It returns an uint32_t (ret_code_t)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/131827?ContentTypeID=1</link><pubDate>Mon, 14 May 2018 09:24:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fcd4190-9cd3-4e79-92e3-286c9999baa2</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks a lot for your suggestions. I tried same way using i2c example given here:&amp;nbsp;htt&lt;a href="https://github.com/Martinsbl/nrf5-mpu-examples/blob/master/nrf_drv_mpu_twi.c"&gt;ps://github.com/Martinsbl/nrf5-mpu-examples/blob/master/nrf_drv_mpu_twi.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;err_code = &lt;span class="pl-c1"&gt;nrf_drv_twi_tx&lt;/span&gt;(&amp;amp;m_twi_instance, LIS3DH_I2C_ADDRESS, &amp;amp;reg, num_regs, &lt;span class="pl-c1"&gt;false&lt;/span&gt;);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;in&amp;nbsp;lis3dh_read_regs() &amp;amp;&amp;nbsp;lis3dh_write_regs()&lt;/p&gt;
&lt;p&gt;but can&amp;#39;t understand these:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;transfers[0].p_data = &amp;amp;reg;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; transfers[0].length = 1;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; transfers[0].operation = APP_TWI_WRITE_OP(LIS3DH_I2C_ADDRESS);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; transfers[0].flags = APP_TWI_NO_STOP;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;transfers[1].p_data = contents;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; transfers[1].length = num_regs;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; transfers[1].operation = APP_TWI_READ_OP(LIS3DH_I2C_ADDRESS);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; transfers[1].flags = 0;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;return app_twi_perform(ACC_TWI_INSTANCE, transfers, ARRAY_SIZE(transfers), twi_idle_func);&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What it is returning? Please explain?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I call function like&amp;nbsp;&lt;span&gt;&lt;em&gt;&lt;strong&gt;lis3dh_read_regs(OUT_X_L, &amp;amp;reg_val, 1)&lt;/strong&gt;&lt;/em&gt; then it should give X value in &lt;strong&gt;reg_val ?&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/131347?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 11:51:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4a609e6-9a43-4a71-bbcc-73950e08c03c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What is your slave_reg&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First of all, you need to init the lis3dh, using the same method as in the github example. Then I suggest you check out how the&amp;nbsp;lis3dh_read_regs() sets up the app_twi_transfer_t structure, and make sure that you get the same when you call.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Like you see in the init function of the github project that you linked to, you need to write to several registers at the lis3dh to initialize it properly.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suggest you start with looking into the&amp;nbsp;TWI (same as I2C) example in the SDK\examples\peripheral\spim and get familiar with I2C. Then you can try to write to the sensor, and see what you get in return.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/131295?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 07:46:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cd80ae2-ed6e-4fd2-babd-814754d8c98b</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;status = lis3dh_read_regs(slave_reg, &amp;amp;contents, 1);&lt;br /&gt;&lt;br /&gt;Shall I call like this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/131292?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 07:41:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:942f7286-9372-4cbc-9508-48a4e6c24db8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;No. This driver does not have a function called &amp;quot;readXYZ()&amp;quot;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The example that you found on Github. Have you tested it? It seems like this example receives data from the LIS3DH, like you are looking for.&amp;nbsp;I assume you can use the driver that I sent for the readLisReg() and WriteLisReg(). That is, change them to&amp;nbsp;lis3dh_read_regs() and&amp;nbsp;lis3dh_write_regs().&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/131279?ContentTypeID=1</link><pubDate>Tue, 08 May 2018 05:32:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df2c3864-a04d-4e33-a00e-aba68ae6dc8c</guid><dc:creator>Vishal Aditya</dc:creator><description>&lt;p&gt;So, this (drv_acc_lis3dh.c) will only wake-up LIS3DH. I am not getting any error while compiling your files but I can&amp;#39;t find any function to read X,Y,Z values defined in&amp;nbsp;drv_acc_lis3dh.h file:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;typedef struct&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;{&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; int16_t AXIS_X;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; int16_t AXIS_Y;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt; int16_t AXIS_Z;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;} AccAxesRaw_t;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Is driver incomplete? Please suggest me how to read the registers for LIS3DH data like here below:&lt;/p&gt;
&lt;p&gt;static uint8_t mosiBuf [2];&lt;br /&gt;&lt;em&gt;static uint8_t misoBuf [2];&lt;/em&gt;&lt;br /&gt;&lt;em&gt;void writeLisReg(uint8_t subAddr, uint8_t value)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt; uint32_t err_code;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; while(spi_master_get_state(SPI_MASTER_0) != SPI_MASTER_STATE_IDLE);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; mosiBuf[0] = subAddr &amp;amp; ~0xc0;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; mosiBuf[1] = value;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; err_code = spi_master_send_recv(SPI_MASTER_0, mosiBuf, 2, misoBuf,2);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; APP_ERROR_CHECK(err_code);&lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;uint8_t readLisReg(uint8_t subAddr)&lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt; uint32_t err_code;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; while(spi_master_get_state(SPI_MASTER_0) != SPI_MASTER_STATE_IDLE);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; mosiBuf[0] = subAddr | 0x80;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; mosiBuf[1] = 0;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; misoBuf[0] = 0x55;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; misoBuf[1] = 0xAA;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; err_code = spi_master_send_recv(SPI_MASTER_0, mosiBuf, 2, misoBuf,2);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; APP_ERROR_CHECK(err_code);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; while(spi_master_get_state(SPI_MASTER_0) != SPI_MASTER_STATE_IDLE);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; return misoBuf[1];&lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;void init_lis3dh() {&lt;/em&gt;&lt;br /&gt;&lt;em&gt; writeLisReg(LIS3DH_CTRL_REG1, 0x57); //All axes, normal, 100Hz&lt;/em&gt;&lt;br /&gt;&lt;em&gt; writeLisReg(LIS3DH_CTRL_REG2, 0x00); // No HighPass filter&lt;/em&gt;&lt;br /&gt;&lt;em&gt; writeLisReg(LIS3DH_CTRL_REG3, 0x00); // No interrupts&lt;/em&gt;&lt;br /&gt;&lt;em&gt; writeLisReg(LIS3DH_CTRL_REG4, 0x0); // all defaults&lt;/em&gt;&lt;br /&gt;&lt;em&gt; writeLisReg(LIS3DH_CTRL_REG5, 0x0); // all defaults&lt;/em&gt;&lt;br /&gt;&lt;em&gt; writeLisReg(LIS3DH_CTRL_REG6, 0x0); // all defaults&lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;void readLisData()&lt;/em&gt;&lt;br /&gt;&lt;em&gt;{&lt;/em&gt;&lt;br /&gt;&lt;em&gt; int16_t x,y,z;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; double dx, dy, dz;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; while(readLisReg(LIS3DH_STATUS_REG) &amp;amp; 0x8 == 0 );&lt;/em&gt;&lt;br /&gt;&lt;em&gt; x = readLisReg(LIS3DH_OUT_X_H) * 256 + readLisReg(LIS3DH_OUT_X_L);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; y = readLisReg(LIS3DH_OUT_Y_H) * 256 + readLisReg(LIS3DH_OUT_Y_L);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; z = readLisReg(LIS3DH_OUT_Z_H) * 256 + readLisReg(LIS3DH_OUT_Z_L);&lt;/em&gt;&lt;br /&gt;&lt;em&gt; dx = x/16384.0;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; dy = y/16384.0;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; dz = z/16384.0;&lt;/em&gt;&lt;br /&gt;&lt;em&gt; printf(&amp;quot;X: %f; Y: %f; Z: %f; SUM: %f\n\r&amp;quot;, dx , dy, dz, sqrt(dx*dx + dy*dy + dz*dz));&lt;/em&gt;&lt;br /&gt;&lt;em&gt;}&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is SPI example found here: &lt;a href="https://github.com/elmot/nRF51822xxAA-LIS3DH/blob/master/main.c"&gt;https://github.com/elmot/nRF51822xxAA-LIS3DH/blob/master/main.c&lt;/a&gt;&amp;nbsp;but I need data via i2c communication&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get X,Y,Z values from LIS3DH using nrf52 development board</title><link>https://devzone.nordicsemi.com/thread/131191?ContentTypeID=1</link><pubDate>Mon, 07 May 2018 12:22:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c02924c-94f4-4cd6-9eef-417e94a2000b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I see that the&amp;nbsp;projects where the driver is used, it only uses the LIS3DH to wake up the chip from sleep, so maybe the drivers that you initially found would be a better approach.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please specify what kind of issues you see when you try to use it? You say: &amp;quot;&amp;nbsp;I am getting errors like i2c begin&amp;quot;. What do you mean by that?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>