<?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>nrf52 TWI communication with LIS3DH</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49486/nrf52-twi-communication-with-lis3dh</link><description>Hi, I&amp;#39;ve been recently working on trying to stablish an i2c (twi) communication between my nrf52 Dev kit and a LIS3DH located in a STEVAL-IDI-003V2 board. 
 In this post https://devzone.nordicsemi.com/f/nordic-q-a/34710/lis2dh12-driver-issue-in-nrf-sdk</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 03 Aug 2019 12:56:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49486/nrf52-twi-communication-with-lis3dh" /><item><title>RE: nrf52 TWI communication with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/202245?ContentTypeID=1</link><pubDate>Sat, 03 Aug 2019 12:56:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21ace54f-4767-45f0-9c27-061f11b5f440</guid><dc:creator>Seihan</dc:creator><description>&lt;p&gt;Thank you for your help.&lt;/p&gt;
&lt;p&gt;Finally I solved it by using GCC. The problem with undefined references was somewhere inside the sdk_config.h, I copied one from the twi_master example. The UNPLACED SECTIONS error was only inside SES.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 TWI communication with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/202061?ContentTypeID=1</link><pubDate>Fri, 02 Aug 2019 08:53:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0a30bb8-9877-4bf7-88d6-51319dfd33e7</guid><dc:creator>LFanals</dc:creator><description>&lt;p&gt;Hi Seihan,&lt;/p&gt;
&lt;p&gt;The first error suggests me that there is a problem with memory allocation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now some questions arise:&lt;/p&gt;
&lt;p&gt;- Are you using some kind of BLE communication, or is SoftDevide needed? If so I would suggest to manually allocate enough space. There are some threads that explain it better than me. Right now my configuration of a code that uses BLE looks like this. I am using Segger, in case you use Keil or other softwares menus change but you can configure it as well.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1564735027433v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Then, in Segger at least, you should see some bars as these&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1564735811067v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If your project is huge you may need more memory than the quantity you have available, yet I don&amp;#39;t thing it&amp;#39;s the case.&lt;/p&gt;
&lt;p&gt;- If you aren&amp;#39;t using SoftDevice or what I&amp;#39;ve previously said doesn&amp;#39;t work, try to copy paste my code and include all the libraries needed. It worked for me this way, and I don&amp;#39;t remember configurating memory space.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure that solves your problem, but I hope it works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 TWI communication with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/201524?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2019 11:16:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd10af98-2cb8-42cd-83b8-2a6736884069</guid><dc:creator>Seihan</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;can you please explain how do you got this project to work? I&amp;#39;ve copied your code in main.c of the twi_sensor example, included all *.h header files in projects properties and added the *.c files in projects explorer. After saving and reloading the project I got this errors:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output/Release/Exe/twi_sensor_pca10040.elf section `.nrf_queue&amp;#39; will not fit in region `UNPLACED_SECTIONS&amp;#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; region `UNPLACED_SECTIONS&amp;#39; overflowed by 20 bytes&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output/twi_sensor_pca10040 Release/Obj/nrf_twi_sensor.o: in function `nrf_twi_sensor_reg_read&amp;#39;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; undefined reference to `nrf_twi_mngr_schedule&amp;#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output/twi_sensor_pca10040 Release/Obj/nrf_twi_sensor.o: in function `nrf_twi_sensor_write&amp;#39;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; undefined reference to `nrf_twi_mngr_schedule&amp;#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output/twi_sensor_pca10040 Release/Obj/main.o: in function `main&amp;#39;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; undefined reference to `nrf_twi_mngr_init&amp;#39;&lt;br /&gt;Build failed&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you in advance,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hannes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 TWI communication with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/197145?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 12:55:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd51d8dc-440c-4d04-9da8-947934da2f2d</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Glad to hear you figured out the issue yourself! &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52 TWI communication with LIS3DH</title><link>https://devzone.nordicsemi.com/thread/197137?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 12:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:adc24196-0f87-431a-a000-b1253d85fb9c</guid><dc:creator>LFanals</dc:creator><description>&lt;p&gt;After a bit of testing I discovered&amp;nbsp;that instead of&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;LIS2DH12_INSTANCE_DEF(m_lis2dh12, &amp;amp;m_nrf_twi_sensor, LIS2DH12_BASE_ADDRESS_HIGH);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I should have&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;LIS2DH12_INSTANCE_DEF(m_lis2dh12, &amp;amp;m_nrf_twi_sensor, LIS2DH12_BASE_ADDRESS_LOW);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As the lis2dh12 or lis3dh datasheets explain on the I2C operation, the adress are 7 bits long and the LSB can either be 1 or 0 depending on how is a pin connected, making the address value equal 19 or 18. In my case, 18 was the right choice.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I apologize for the noobie mistake I&amp;#39;ve made, and I&amp;#39;m gonna keep updating the progress I make.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;LFanals&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>