<?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>nrf9160 (MODBUS)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99696/nrf9160-modbus</link><description>Good day 
 Our custom board contains RS485 implementation. The file schematic for that looks like this: 
 
 I have noticed that a driver and sample exists but the driver doesn&amp;#39;t seem to incorporate re-gpios. My DTS and DTSI file contains this: 
 
 
 &amp;amp;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Oct 2024 14:22:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99696/nrf9160-modbus" /><item><title>RE: nrf9160 (MODBUS)</title><link>https://devzone.nordicsemi.com/thread/505031?ContentTypeID=1</link><pubDate>Fri, 04 Oct 2024 14:22:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8be45b24-4559-488f-bb31-aaea975cbf46</guid><dc:creator>Maarten &amp;amp;quot;merethan&amp;amp;quot;</dc:creator><description>&lt;p&gt;de-gpios would be drive enable-gpios,&lt;/p&gt;
&lt;p&gt;re-gpios would be read/receive enable-gpios.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;RS485 using two wires is half-duplex. Meaning you need a pin to switch between receiving (reading) and sending (driving) the bus. As such, there&amp;#39;s the de-gpios node in the devicetree to specify what GPIO pin is wired to the DE-pin of the RS485 chip.&lt;/p&gt;
&lt;p&gt;Most RS485 chips however have two pins rather than a single one: One for enabling read, one for enabling write, because chips consume power when they&amp;#39;re active. By being able to turn off both direction one can conserve some extra (battery) power.&lt;/p&gt;
&lt;p&gt;Hence it makes sense to also have a re-gpios, which enables receiving in hardware, when software is actually taking in data.&lt;/p&gt;
&lt;p&gt;One can do without&amp;nbsp;re-gpios though: All the chips I have seen with two pins (separate drive enable &amp;amp; read enable) have the read enable inverted. So to activate drive, one needs drive the drive enable-pin high. But to activate reading, because it is inverted, one needs pull the read enable-pin low. This means you can connect them together on the PCB to the same GPIO.&lt;/p&gt;
&lt;p&gt;Having drive enable-pin and inverted read enable-pin tied together on the PCB however means the RS485 chip rests in receive mode, which eats more power than being off.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf9160 (MODBUS)</title><link>https://devzone.nordicsemi.com/thread/426457?ContentTypeID=1</link><pubDate>Mon, 22 May 2023 08:02:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47759361-e19d-4fd2-8ed4-b81eb82e48a2</guid><dc:creator>Raoul</dc:creator><description>&lt;p&gt;Good day Hassan,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry for the delay, I was sick for the start of last week and then we had two national holidays following each other.&lt;/p&gt;
&lt;p&gt;I still have you ask you a follow-up question, sorry: What do you mean by re-gpios? I can&amp;#39;t find any reference to this concept.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is your issue by any chance related to this: &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/91146/modbus-rs485-communication-using-uart1-on-nrf9160/384145"&gt;RE: Modbus(RS485) communication using UART1 on Nrf9160&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Here is another case on a customer trying to set up modbus (note my colleague&amp;#39;s suggestions as well): &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/57199/using-the-nrf9160-to-send-and-receive-data-over-rs485-using-uart"&gt;Using the nRF9160 to send and receive data over RS485 (using uart?)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And, if it is of any help, I see that another customer has had success using this modbus library:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/53843/nrf9160-rs485-modbus/292429"&gt;RE: nRF9160 RS485 MODBUS&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Raoul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>