<?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>How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116579/how-to-connect-other-sensor-to-nrf9160-i2c-and-gpio</link><description>Hi, 
 
 I want to connect LDC2114 to nRF9160. I write the nrf9160dk_nrf9160_ns.overlay and the astri,ldc2114.yaml. I don&amp;#39;t know how to set GPIOs in &amp;amp; i2c1 - ldc2114: ldc2114 @ 2a which are the output pins of LDC2114 and input pins of nRF9160. 
 
 
 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Dec 2024 08:08:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116579/how-to-connect-other-sensor-to-nrf9160-i2c-and-gpio" /><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/514417?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 08:08:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec080dce-4644-4c52-997f-4fb9b058df88</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Liza,&lt;/p&gt;
&lt;p&gt;I see. Thanks for the clarification. Let me know if you&amp;nbsp;get any error messages from the nrfx driver.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/514415?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 08:02:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2a4cbdc-053a-4989-a0c6-cddc6190399d</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It is 1 byte write to 0x0c, 1 byte write to&amp;nbsp;0x0d,&amp;nbsp;1 byte write to&amp;nbsp;0x0e and so on. Totally 27 bytes&amp;nbsp;write to&amp;nbsp; &amp;nbsp;27 addresses (0x0c to 0x26).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;uint8_t configbuf[]={ 0xFF, 0x03, 0x3F, 0x00,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//0x0C ~0x0F&lt;/span&gt;&lt;span&gt;&lt;br /&gt; 0x3F, 0x01, 0x3F, 0x07, 0x3F, 0x07, 0x00, 0x02, //0x10 ~0x17&lt;br /&gt; 0x03, 0x00, 0xff, 0x00, 0xFF, 0x00, 0x00, 0x00,&amp;nbsp; //0x18 ~0x1F&lt;br /&gt; 0xA7, 0x00, 0xA7, 0x00, 0xA7, 0x00, 0xA7};&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//0x20 ~0x26&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Liza&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/514412?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 07:30:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68ae1e2f-93c1-4333-bb7a-1a3a96b8a86b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Liza,&lt;/p&gt;
&lt;p&gt;But why 27 bytes? Isn&amp;#39;t the register only 1 byte, or am I missing something?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/514411?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 07:20:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5873fe95-91cc-43e4-84ea-100523c6bc19</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Thanks for your information. I will try&amp;nbsp;&lt;span&gt;CONFIG_LOG.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I made a typo.&amp;nbsp;I write 27 bytes from LDC_REG_CHAN_EN(0x0c) to&amp;nbsp;&lt;/span&gt;&lt;span&gt;LDC_REG_SENSOR3_CONFIG&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;0x26).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Liza&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/514410?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 07:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8006286e-1c4f-4947-bc1c-a215cc9660f9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Liza,&lt;/p&gt;
&lt;p&gt;You may get more information about why the write failed by enabling CONFIG_LOG to get the logs from the nrfx I2C driver. The TWIM hardware supports sending up to 4096 bytes, but the data may be NACKed by the slave, which will cause the write transaction to be aborted. From the datasheet it seems that the LDC_REG_CHAN_EN register is only 1 byte.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/514401?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 05:54:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e9d5ec4-1cd9-4822-8ccc-16de9d341dae</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You are right! The RESET register is supposed to be 0 after reset. I read the&amp;nbsp;status register and get what I want.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But it seems that&amp;nbsp;i2c_burst_write()&amp;nbsp;and&amp;nbsp;i2c_burst_read() have byte limit?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; I try to write 27 bytes buff to&amp;nbsp;&lt;/span&gt;LDC_REG_CHAN_EN(0x0c) and the writing error occurs.&lt;span&gt;&amp;nbsp;Then I reduce the buff to 15 bytes, and write &amp;amp; read success.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/i2c_5F00_burst_5F00_write.txt"&gt;devzone.nordicsemi.com/.../i2c_5F00_burst_5F00_write.txt&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So I split the 27 bytes to 12 bytes and 15 bytes, then write and read successfully.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Liza&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/514056?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 14:21:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeed6d23-a46f-4c26-8cc8-63e0649eec4e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Liza,&lt;/p&gt;
&lt;p&gt;I have not worked with this IC before, but I had a look at the datasheet, and it seems like the RESET register is supposed to be 0 after reset. Section 7.3.6 also outlines a special handshake process to perform the write sequence. Have you tried reading the status register instead?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/513950?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 06:04:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46fe1f1c-ead0-4edb-b2e1-baff303fd734</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I use&amp;nbsp;i2c_burst_write() and&amp;nbsp;i2c_burst_read() to write and read value. I write 0x10 to&amp;nbsp;LDC_REG_RESET (reg address 0x0a), but read the value 0 from&amp;nbsp;&lt;span&gt;LDC_REG_RESET (reg address 0x0a). Both two methods return value 0 which indicates that write/read successful.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/i2c.txt"&gt;devzone.nordicsemi.com/.../i2c.txt&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Liza&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/513111?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 07:16:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e279ebc9-94a9-4f7e-901c-5e85e14ee7f1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Liza,&lt;/p&gt;
&lt;p&gt;This devacademy course explains how you can use the driver API from your application:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-6-serial-com-i2c/topic/i2c-driver/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-6-serial-com-i2c/topic/i2c-driver/&lt;/a&gt;.&amp;nbsp;&amp;nbsp;You can use&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/peripherals/i2c.html#c.i2c_write_dt" rel="noopener noreferrer" target="_blank"&gt;&lt;code&gt;i2c_write_dt()&lt;/code&gt;&lt;/a&gt;&lt;span&gt;, or&amp;nbsp;&amp;nbsp;&lt;a title="Write a set amount of data to an I2C device." href="https://docs.nordicsemi.com/bundle/zephyr-apis-latest/page/group_i2c_interface.html#ga2cc5f49493dce89e128ccbfa9d6149a0"&gt;i2c_write()&lt;/a&gt;&amp;nbsp;to set this register on your sensor.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vidar&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/513097?ContentTypeID=1</link><pubDate>Tue, 03 Dec 2024 04:03:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8bba34d4-84a6-497a-ace9-a6516133c4ab</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;#39;s better if I don&amp;#39;t need to write driver. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you know how to write data to the register address of LDC2114 through I2C? For example, the LDC2114 address is 0x2a, the output pin polarity can be configured in Register 0x1C.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Liza&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/512934?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 10:59:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82e0310a-2ae2-4d39-88da-d60b2c0f5896</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Liza,&lt;/p&gt;
&lt;p&gt;Do you have a node named &amp;#39;examplensor0&amp;#39; in your devicetree? You can check by reviewing the generated zephyr.dts file in your build folder. It might be simpler to use the Zephyr I2C API directly in your application instead of creating a new driver based on the Zephyr driver model. I coworker made a sample that does this with the Zephyr SPI driver here:&amp;nbsp;&lt;a href="https://github.com/too1/ncs-spi-master-slave-example"&gt;https://github.com/too1/ncs-spi-master-slave-example&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/512697?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 09:32:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:652291bf-6a74-4c61-8c97-cadb89901211</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/116579/how-to-connect-other-sensor-to-nrf9160-i2c-and-gpio/512291"]This one for example:&amp;nbsp;&lt;a href="https://blog.golioth.io/adding-an-out-of-tree-sensor-driver-to-zephyr/"&gt;https://blog.golioth.io/adding-an-out-of-tree-sensor-driver-to-zephyr/&lt;/a&gt;&amp;nbsp;[/quote]
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks. I will follow it to write my driver. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When build for the raw project&amp;nbsp;example-application, it also has error on &amp;quot;&lt;/span&gt;DEVICE_DT_GET&amp;quot; of &amp;quot;sensor = DEVICE_DT_GET(DT_NODELABEL(examplesensor0));&amp;quot;. It&amp;#39; confused. I don&amp;#39;t know why.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;This is the build log:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img style="max-height:400px;max-width:618px;" alt=" " height="400" src="https://devzone.nordicsemi.com/resized-image/__size/1236x800/__key/communityserver-discussions-components-files/4/A_5F006000_Z_7D00_B_5B00_S95YPB73EP_2900_XJQX0.png" width="617" /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;img style="height:412px;max-height:412px;max-width:637px;" alt=" " height="412" src="https://devzone.nordicsemi.com/resized-image/__size/1274x824/__key/communityserver-discussions-components-files/4/AF4R1_2900_BIXL_2400_7SA_7E00_97_7D00_UO_28002800_E.png" width="636" /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Liza&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/512291?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2024 09:45:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53a7bf9f-d531-4b8a-b7dc-39ee738f8066</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Liza,&lt;/p&gt;
&lt;p&gt;Zephyr does not include a driver for this specific device, unfortunately. You can use the Zephyr i2c driver api directly in your application, or create your own Zephyr driver following the Zephyr driver model. There are many blogs and tutorials for creating zephyr driver. This one for example:&amp;nbsp;&lt;a href="https://blog.golioth.io/adding-an-out-of-tree-sensor-driver-to-zephyr/"&gt;https://blog.golioth.io/adding-an-out-of-tree-sensor-driver-to-zephyr/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/512264?ContentTypeID=1</link><pubDate>Wed, 27 Nov 2024 07:35:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22bd40e0-b249-4206-9cef-77573a84b444</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;Vidar,&lt;/span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/116579/how-to-connect-other-sensor-to-nrf9160-i2c-and-gpio/512077"]Please note that DEVICE_DT_GET or device_get_binding() should be used in application code to verify whether a driver has been successfully initialized when working with a &lt;a href="https://docs.zephyrproject.org/latest/kernel/drivers/index.html"&gt;Zephyr driver&lt;/a&gt;&amp;nbsp;which are initialized at startup before the program reaches main(). [/quote]
&lt;p&gt;Could I use any existing Zephyr driver without writing the driver by myself in my case (connect LDC2114 to nRF9160DK with I2C)? Because it is difficult to write it. If not, do you have any tutorial about writing my own driver?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Liza&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/512077?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2024 11:00:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:060e04ab-d5af-47e9-9d00-302ba8971d0e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming. Yes, I was wondering if you were writing the driver yourself, or if you used an existing Zephyr driver made by someone else. Regarding the build error, please&amp;nbsp;make sure you are including the&amp;nbsp;&amp;lt;zephyr/devicetree.h&amp;gt; header in your source file. Please note that DEVICE_DT_GET or device_get_binding() should be used in application code to verify whether a driver has been successfully initialized when working with a &lt;a href="https://docs.zephyrproject.org/latest/kernel/drivers/index.html"&gt;Zephyr driver&lt;/a&gt;&amp;nbsp;which are initialized at startup before the program reaches main(). This is not needed if you are writing the driver in your application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/512023?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2024 04:09:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84d6e6fa-6f36-4cad-b2d2-c585bd118c6c</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;This is my whole project, I haven&amp;#39;t done the .c files. Do you think I need to add something to connect the LDC2114? It seems that I need to write the driver by myself.&lt;/p&gt;
&lt;p&gt;I got the &amp;quot;LDC2114 binding failed.&amp;quot; Do you have any idea?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/9160_5F00_ldc.zip"&gt;devzone.nordicsemi.com/.../9160_5F00_ldc.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/512018?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2024 02:49:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64958efa-3075-4f08-a0f4-3fa634587d8e</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Vidar,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I write &amp;quot;&amp;nbsp;&lt;/span&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;gpio_dt_spec&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;int_1_pin&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;GPIO_DT_SPEC_GET&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;(ldc2114), in1_gpios); &amp;quot; but error occurs:&amp;nbsp;Unrecognizable mark. So I said&amp;nbsp;I cannot call gpios.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="height:53px;max-height:53px;max-width:546px;" height="51" src="https://devzone.nordicsemi.com/resized-image/__size/1092x106/__key/communityserver-discussions-components-files/4/pastedimage1732590586712v1.png" width="545" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/116579/how-to-connect-other-sensor-to-nrf9160-i2c-and-gpio/511924"]Are you creating a custom zephyr driver?[/quote]
&lt;p&gt;What is the &amp;quot;&lt;span&gt;custom zephyr driver&amp;quot;? I am writing the ldc2114.c to init the sensor.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Liza&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/511924?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 14:06:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bff76fba-65cb-4a39-b3e5-9e5b77b96dd6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Liza,&lt;/p&gt;
&lt;p&gt;You can do something like this for getting the pin configuration for the driver:&lt;/p&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static const struct gpio_dt_spec int_1_pin =&amp;#160;GPIO_DT_SPEC_GET(ldc2114, in1_gpios);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Are you creating a custom zephyr driver? I could not find this driver in my SDK tree.&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Best regards,&lt;/div&gt;
&lt;div&gt;Vidar&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/511800?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 01:53:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2350afa-de59-41fe-942a-0ae85b8591ae</guid><dc:creator>Liza</dc:creator><description>&lt;p&gt;Hi Vidar Berg,&lt;/p&gt;
&lt;p&gt;I cannot call gpios from ldc2114 Devicetree. Since the gpios are input pins, so I call them from node gpio0&amp;nbsp;&lt;span&gt;&amp;quot;dev_gpio&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;device_get_binding&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DEVICE_DT_NAME&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;DT_NODELABEL&lt;/span&gt;&lt;span&gt;(gpio0)));&amp;quot; and it works.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you know how to call gpios from node ldc2114?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Liza&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connect other sensor to nrf9160 (i2c and GPIO)</title><link>https://devzone.nordicsemi.com/thread/511621?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2024 10:33:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:804823dd-c8c5-42b6-9ab0-cd910e2679c9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Liza,&lt;/p&gt;
&lt;p&gt;It looks like you have configured everything correctly in your Devicetree overlay. Are you getting build errors, or does it fail when you try to run the application?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>