<?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>DevAcademy I2C doing weird things nRF52840 DK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114459/devacademy-i2c-doing-weird-things-nrf52840-dk</link><description>I&amp;#39;m having 3 issues with I2C: A) It keeps returning -5 (-EIO), failed to write to I2C device..., however I do sometimes see the byte going out so I&amp;#39;m not sure why it always fails even when I can see it being transmitted. 
 B) The function i2c_write_dt</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Sep 2024 12:25:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114459/devacademy-i2c-doing-weird-things-nrf52840-dk" /><item><title>RE: DevAcademy I2C doing weird things nRF52840 DK</title><link>https://devzone.nordicsemi.com/thread/501928?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 12:25:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e861f783-9a4e-4f37-8564-d93988c3fa29</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Glad to hear you figured out the issue. Don&amp;#39;t hesitate to create new tickets in the future is there is any question&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DevAcademy I2C doing weird things nRF52840 DK</title><link>https://devzone.nordicsemi.com/thread/501913?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 11:59:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b76c678b-9bbc-4e29-93e6-071783950a7d</guid><dc:creator>Sub7</dc:creator><description>&lt;p&gt;Thanks for the replies. I ended up solving the issue, the sensor was a knock-off and used a different address. It didn&amp;#39;t provide the ACK, so I think that was the root cause. I&amp;#39;m not sure why the I2C transmissions ended up looking different from one time to the next, I would have expected it to look the same and I don&amp;#39;t know why it would basically freeze the program (at least it appeared that way). Let&amp;#39;s chalk it up to me not knowing what I&amp;#39;m doing. If I discover issues again I will create a new thread / ticket. Thank you for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DevAcademy I2C doing weird things nRF52840 DK</title><link>https://devzone.nordicsemi.com/thread/501072?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2024 06:11:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30443638-e4f2-45c0-86f7-4ab0ff795e0b</guid><dc:creator>runsiv</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Just a few questions to start with&lt;/p&gt;
&lt;p&gt;Which version of NCS are you using?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you doing any of the exercises in the fundamentals or the intermediate course, if so which? Just so that I can try to replicate what you seeing.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]C) When I call&amp;nbsp;i2c_write_dt from an interrupt twice (void button_pressed(... and I press the button twice), the program seems to just crash and nothing else happens, I have to hit reset and it works again. I probably made a mistake calling that from an interrupt however it&amp;#39;s a little bit worrisome that something so trivial causes the program to stop working.&amp;nbsp;Is Zephyr / nRF Connect SDK prone to crashing / hanging?[/quote]
&lt;p&gt;The best would if you can provide any log of what is happening. I would also suggest checking out the link Louis posted.&amp;nbsp;&lt;/p&gt;
[quote user=""]At this point I&amp;#39;m going through DevAcademy because I&amp;#39;ve never used Zephyr before so I&amp;#39;m trying to learn it. I&amp;#39;m used to working directly with the hardware so this Zephyr thing is like inserting a black box between me and the hardware, most of the time I have no idea what&amp;#39;s going on, I really hope that will change as I get better with it.[/quote]
&lt;p&gt;Talking from experience it gets better and at times it feels good to don&amp;#39;t have to write everything from scratch each time. Zephyr is in active development and it have greatly improved since I started with it and the tools have improved.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Runar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DevAcademy I2C doing weird things nRF52840 DK</title><link>https://devzone.nordicsemi.com/thread/501029?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 16:45:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22790bdf-78a5-4415-ae49-323325c483c6</guid><dc:creator>nordicator_prim3</dc:creator><description>&lt;p&gt;Check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/105170/i2c-read-write-functions-in-gpio-interrupt"&gt;this&lt;/a&gt; previous ticket in regards to using i2c in an ISR context.&lt;/p&gt;
&lt;p&gt;Zephyr does get easier as you fall deeper and deeper into the black box lol. Just be ready to have nightmares about 20 layers of MACRO expansions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>