<?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>i2c_nrfx_twim: Error 0x0BAE0001 occurred for message 0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102999/i2c_nrfx_twim-error-0x0bae0001-occurred-for-message-0</link><description>I know this topic has been raised before in theses places but I have tried all they suggest. 
 
 
 I have tried the code on multiple boards and all give the same repeated error when calling the API function eeprom_write once. The eeprom in question is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Aug 2023 00:29:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102999/i2c_nrfx_twim-error-0x0bae0001-occurred-for-message-0" /><item><title>RE: i2c_nrfx_twim: Error 0x0BAE0001 occurred for message 0</title><link>https://devzone.nordicsemi.com/thread/442393?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2023 00:29:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61a63b0b-88a8-4535-af67-b0cef15bf8bb</guid><dc:creator>geoffF</dc:creator><description>&lt;p&gt;Thanks.&amp;nbsp; Hate making changes to your SDK files but yes that does seem like the only solution. Agree neither side of the implementation here is wrong perse, just that ACK polling EEPROMs just is not considered in the Zephyr i2c API.&amp;nbsp; Thanks for your help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c_nrfx_twim: Error 0x0BAE0001 occurred for message 0</title><link>https://devzone.nordicsemi.com/thread/442337?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 14:04:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:893f50a6-be5a-4c33-b743-e641faf7b505</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The nrfx layer is implemented to conform to the generic Zephyr i2c API, and the ACK polling mechanism in the at24 driver also relies on the i2c write API to return an error code when the write isn&amp;#39;t acknowledged. So I would say the driver is working correctly.&amp;nbsp;But it would have been nice if these error messages were suppressed during the ACK polling. I think the only solution to really avoid this is to turn off logging from the nrfx module or remove the line where the message is being printed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c_nrfx_twim: Error 0x0BAE0001 occurred for message 0</title><link>https://devzone.nordicsemi.com/thread/442305?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 12:51:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f533917-648c-44b8-8b0c-f4ccb0fc7bd8</guid><dc:creator>geoffF</dc:creator><description>&lt;p&gt;Thanks you for replying.&amp;nbsp; Understood and syspected that was the case.&amp;nbsp; So would you say that the nrfx driver is not really compatible with how the at24 driver has been implemented? ie. there is not way to avoid the error messages? Shall probably have to write my own in that case. Nordic is so prolific within Zephyr community, figured it would always be a standard against which drivers were written.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c_nrfx_twim: Error 0x0BAE0001 occurred for message 0</title><link>https://devzone.nordicsemi.com/thread/442301?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 12:36:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d59d023-697b-4f0e-b7dc-a2e4e71752b8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The underlying nrfx driver lacks knowledge about the operations of the EEPROM device and the ACK polling implemented by the at24 device driver. The write function will simply return an error code to notify the device driver when a requested transfer fails (address NACK in this case). &lt;/span&gt;&lt;span&gt;The ACK polling mechanism is implemented by repeatedly calling i2c_write() until it returns &amp;#39;0&amp;#39; or until the timeout occurs after 10 ms as you can see from the implementation here: [&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/9e7d6bbdf82f8d1fa17c1dc82c6a868554000025/drivers/eeprom/eeprom_at2x.c#L327"&gt;link&lt;/a&gt;].&lt;/span&gt;&lt;/p&gt;
[quote user="geoffF"]Why does it&amp;nbsp;&lt;em&gt;i2c_nrfx_twim_transfer&lt;/em&gt;&lt;span&gt;&amp;nbsp;not return&amp;nbsp;&lt;/span&gt;EBUSY rather than the log message and&amp;nbsp;EIO? Does it not support ACK polling without that error message?[/quote]
&lt;p&gt;The nrfx driver does not know why the device is not ACKing the address in this scenario.&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: i2c_nrfx_twim: Error 0x0BAE0001 occurred for message 0</title><link>https://devzone.nordicsemi.com/thread/442154?ContentTypeID=1</link><pubDate>Sat, 19 Aug 2023 05:04:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afc7296d-fa6a-49b2-9428-0f1afe508547</guid><dc:creator>geoffF</dc:creator><description>&lt;p&gt;Seems this is just the&amp;nbsp;underlying driver in&amp;nbsp;&lt;em&gt;i2c_nrfx_twim.c&lt;/em&gt; not waiting the write timeout period before writing again? If I breakpoint at the bottom of &lt;em&gt;i2c_nrfx_twim_transfer&lt;/em&gt; (where this error is generated) to allow a delay after each&amp;nbsp;call it works without error. There is a rety for this purpose in the higher function &lt;em&gt;eeprom_at24_write&lt;/em&gt; in &lt;em&gt;eeprom_at2x.c&lt;/em&gt; which tries for the timeout defined in the device tree so is why does this error even print since the write eventually goes though?&lt;/p&gt;
&lt;p&gt;Why does it&amp;nbsp;&lt;em&gt;i2c_nrfx_twim_transfer&lt;/em&gt;&lt;span&gt;&amp;nbsp;not return&amp;nbsp;&lt;/span&gt;EBUSY rather than the log message and&amp;nbsp;EIO? Does it not support ACK polling without that error message? See:&amp;nbsp;&amp;nbsp;&lt;a href="https://onlinedocs.microchip.com/pr/GUID-8B75A8E3-EAC8-47E4-B4E2-84DB84C60333-en-US-2/index.html?GUID-D2EBF17F-0AE2-4C1F-8FCD-1638100570B3"&gt;https://onlinedocs.microchip.com/pr/GUID-8B75A8E3-EAC8-47E4-B4E2-84DB84C60333-en-US-2/index.html?GUID-D2EBF17F-0AE2-4C1F-8FCD-1638100570B3&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: i2c_nrfx_twim: Error 0x0BAE0001 occurred for message 0</title><link>https://devzone.nordicsemi.com/thread/442151?ContentTypeID=1</link><pubDate>Sat, 19 Aug 2023 03:28:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be91bb47-827e-4e37-9db1-14d832655f21</guid><dc:creator>geoffF</dc:creator><description>&lt;p&gt;Also the write is performed successfully, despite the error. Guess that is expected as it is an ACK error only.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>