<?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>SHT4X: Failed to reset the device.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126000/sht4x-failed-to-reset-the-device</link><description>Describe the bug 
 if (!device_is_ready(sht)) { printk(&amp;quot;Device %s is not ready.\n&amp;quot;, sht-&amp;gt;name); return 0; } 
 I&amp;#39;m having trouble resetting my device. 
 Is there a way to fix this? 
 
 
 
 
 
 Relevant log output 
 
 [00:00:00.269,836] &amp;lt; err &amp;gt; SHT4X: Failed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Dec 2025 12:46:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126000/sht4x-failed-to-reset-the-device" /><item><title>RE: SHT4X: Failed to reset the device.</title><link>https://devzone.nordicsemi.com/thread/556327?ContentTypeID=1</link><pubDate>Fri, 05 Dec 2025 12:46:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e49e0dd-9468-430b-a2d0-7866c1ca7199</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The error is logged in the driver init here:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/c09c6abd11695d6b9c2ea24c4e88822eee9ff3f9/drivers/sensor/sensirion/sht4x/sht4x.c#L191"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/c09c6abd11695d6b9c2ea24c4e88822eee9ff3f9/drivers/sensor/sensirion/sht4x/sht4x.c#L191&lt;/a&gt;.&amp;nbsp;&lt;span&gt;I assume the sensor might&amp;nbsp;simply not have been ready to receive the command this early on startup&amp;nbsp;and therefore NACKed it since the log shows that the measurement commands sent afterwards work just fine. To confirm this theory you could try adding a delay before the reset command. E.g.,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;    /* Extra delay */
    k_sleep(K_MSEC(SHT4X_RESET_WAIT_MS));

	rc = sht4x_write_command(dev, SHT4X_CMD_RESET);
	if (rc &amp;lt; 0) {
		LOG_ERR(&amp;quot;Failed to reset the device.&amp;quot;);
		return rc;
	}&lt;/pre&gt;&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></channel></rss>