<?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>NRF_ERROR_DRV_TWI_ERR_ANACK ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80905/nrf_error_drv_twi_err_anack</link><description>Dear Members, 
 
 I want to use MAX17048 and getting thiis message : 
 &amp;lt;error&amp;gt; app: ERROR 33281 [NRF_ERROR_DRV_TWI_ERR_ANACK] at ..\..\..\MAX17048.c:71 
 void MAX17048_init_i2c(uint32_t scl, uint32_t sda) { _i2caddr = MAX17048_WRITE_ADDR; twi_master_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Oct 2021 08:16:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80905/nrf_error_drv_twi_err_anack" /><item><title>RE: NRF_ERROR_DRV_TWI_ERR_ANACK ?</title><link>https://devzone.nordicsemi.com/thread/335413?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 08:16:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f80a670-05ab-497e-8cb8-68a3877a9d70</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again, Rixtronixlab&lt;br /&gt;&lt;br /&gt;Great - I am glad to see that the devices are showing up in the scanner (so we know there is no hardware issues), and that you have found the right addresses for your device!&lt;/p&gt;
[quote user="RixtronixLAB"]I wrote for WRITE :[/quote][quote user="RixtronixLAB"]how can I write for READ ?[/quote]
&lt;p&gt;I would recommend that you make use of &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.1.0%2Fgroup__nrf__drv__twi.html&amp;amp;anchor=ga44215084d42d6a29aa4044c3c2792fc0"&gt;the nrf_drv_twi_xfer function&lt;/a&gt;&amp;nbsp;in combination with the &lt;a title="NRF_DRV_TWI_XFER_DESC_TX" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/group__nrf__drv__twi.html?cp=8_1_6_8_0_38_1_14#gad27e7b6bea0cacd52fb65dee7a4f80d6"&gt;NRF_DRV_TWI_XFER_DESC_TX&lt;/a&gt;&amp;nbsp;and _RX transfer descriptors, instead of the deprecated nrf_drv_twi_tx and _rx functions with manually loaded packets, for your transfers. The nrf_drv_twi_xfer function gives you a lot more functionality easily accessible (see the different FLAGS descriptions), compared to the deprecated versions.&lt;br /&gt;&lt;br /&gt;If you would still like to use the deprecated functions you could see their usage demonstrated in &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/twi_sensor_example.html"&gt;the twi_sensor example&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Are you creating your device&amp;#39;s driver from scratch, or are you basing it on an existing driver for the device?&lt;br /&gt;Usually, the header file of provided drivers will include all the registers as #defines, with a different name for read and write of the same register - since the values are different. This is a usual way to do it, in order to avoid manually having to add the read write bit, and to avoid confusion.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_DRV_TWI_ERR_ANACK ?</title><link>https://devzone.nordicsemi.com/thread/335384?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 02:34:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c2cfa11-dc26-4e71-adb9-0f49478ed622</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;I wrote for WRITE : &lt;/p&gt;
&lt;p&gt;//WRITE TO 0xFE REGISTER ON MAX17408 (CMD) BEGIN&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; buffer_tx[0] = 0xFE;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;buffer_tx[1] = 0x54;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;buffer_tx[2] = 0x00;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;ret = nrf_drv_twi_tx(&amp;amp;m_twi_master_MAX17048, 0X36, buffer_tx, 3, false);&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;how can I write for READ ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_DRV_TWI_ERR_ANACK ?</title><link>https://devzone.nordicsemi.com/thread/335383?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 02:30:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80ea8ca7-3f53-4133-83bf-abd6c6277f35</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;The address is 0x36,&lt;/p&gt;
&lt;p&gt;////////////////////////////////&lt;br /&gt;#define MAX1704x_ADDRESS 0x36 // Unshifted I2C address. Becomes 0x6C for write and 0x6D for read.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_DRV_TWI_ERR_ANACK ?</title><link>https://devzone.nordicsemi.com/thread/335320?ContentTypeID=1</link><pubDate>Thu, 21 Oct 2021 12:54:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea7f515a-4339-495c-8bef-f954ad15f84e</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;the schematic :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2021_2D00_10_2D00_21-20_5F00_52_5F00_19_2D00_Max17048.png" /&gt;&lt;br /&gt;nfo&amp;gt; app: TWI scanner started.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x8.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x36.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x3C.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x50.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x51.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x52.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x53.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x54.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x55.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x56.&lt;/p&gt;
&lt;p&gt;nfo&amp;gt; app: TWI device detected at address 0x57.&lt;/p&gt;
&lt;p&gt;from MAX17048 datasheet,&lt;/p&gt;
&lt;p&gt;The 7-bit slave address&lt;br /&gt;is fixed to 0x6C (write)/0x6D (read):&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2021_2D00_10_2D00_21-20_5F00_52_5F00_19_2D00_Max17048-address.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2021_2D00_10_2D00_21-20_5F00_52_5F00_19_2D00_Max17048-address-2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Any clues ? thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_DRV_TWI_ERR_ANACK ?</title><link>https://devzone.nordicsemi.com/thread/335280?ContentTypeID=1</link><pubDate>Thu, 21 Oct 2021 11:32:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36337f40-9c8a-40e9-8f4d-c1e9fa741020</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Your error indicates that the address is not acknowledged. How have you connected the TWI slaves to the nRF, could you show a diagram or schematic exempt?&lt;br /&gt;&lt;br /&gt;Please try to &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/twi_scanner_example.html"&gt;run the TWI scanner example from the SDK&lt;/a&gt;&amp;nbsp;to ensure that the slave devices can be found on the bus, and let me know what your logger says when you run this example.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF_ERROR_DRV_TWI_ERR_ANACK ?</title><link>https://devzone.nordicsemi.com/thread/335200?ContentTypeID=1</link><pubDate>Thu, 21 Oct 2021 07:36:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d16c5fc-a080-4813-aff6-406c08e5719e</guid><dc:creator>RixtronixLAB</dc:creator><description>&lt;p&gt;the buffer is correct but p_data is different, what do I miss here ?&lt;/p&gt;
&lt;p&gt;Screenshot :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/2021_2D00_10_2D00_21-15_5F00_29_5F00_36_2D00_MAX17048-Debug.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>