<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[No UART hardware flow control - how to do RS485 with the Omega?]]></title><description><![CDATA[<p dir="auto">Hey there - I've only recently realised that the Omega2 has no hardware flow control for its two UARTs. I'm looking to perform RS485 communications and need to set RTS to high on sending via Linux RS485 support; specifically <code>ioctl</code>. How does one convey a pin to be used for RTS; is this even possible and, if not, then any ideas on how to get called back when a send has been completed? Thanks.</p>
]]></description><link>http://community.onion.io/topic/4877/no-uart-hardware-flow-control-how-to-do-rs485-with-the-omega</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 05:26:52 GMT</lastBuildDate><atom:link href="http://community.onion.io/topic/4877.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 05 Oct 2022 04:44:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Wed, 05 Oct 2022 04:44:02 GMT]]></title><description><![CDATA[<p dir="auto">Hey there - I've only recently realised that the Omega2 has no hardware flow control for its two UARTs. I'm looking to perform RS485 communications and need to set RTS to high on sending via Linux RS485 support; specifically <code>ioctl</code>. How does one convey a pin to be used for RTS; is this even possible and, if not, then any ideas on how to get called back when a send has been completed? Thanks.</p>
]]></description><link>http://community.onion.io/post/24818</link><guid isPermaLink="true">http://community.onion.io/post/24818</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Wed, 05 Oct 2022 04:44:02 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Wed, 05 Oct 2022 05:14:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/8658">@huntc</a> I think you can use an RS485 converter module and this will implement the hardware handshaking. Take a look at pyserial package for details.</p>
]]></description><link>http://community.onion.io/post/24819</link><guid isPermaLink="true">http://community.onion.io/post/24819</guid><dc:creator><![CDATA[crispyoz]]></dc:creator><pubDate>Wed, 05 Oct 2022 05:14:13 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Wed, 05 Oct 2022 05:50:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/6184">@crispyoz</a> Thanks for that. I guess I was looking for a way to do this without additional hardware, at least initially. I'm thinking that I can use <code>termios::tcdrain</code> to block until the UART data is sent and manage setting/clearing a GPIO for the transmit signal. I'll report back on my success (or not!).</p>
<p dir="auto">Separately, do you know why there's no provision for hardware flow control? Being able to assign any GPIO for RTS/CTS would have been cool, as is possible on many microcontrollers.</p>
]]></description><link>http://community.onion.io/post/24820</link><guid isPermaLink="true">http://community.onion.io/post/24820</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Wed, 05 Oct 2022 05:50:02 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Wed, 05 Oct 2022 06:06:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/8658">@huntc</a> The MediaTek MT7688 used by the Omega2(+) does support hardware flow control, but these are not exposed Omega. You may be able to read the registers directly but I'm not sure this is possible in user mode. Maybe one of the hardware engineers on here may have some tips.</p>
]]></description><link>http://community.onion.io/post/24821</link><guid isPermaLink="true">http://community.onion.io/post/24821</guid><dc:creator><![CDATA[crispyoz]]></dc:creator><pubDate>Wed, 05 Oct 2022 06:06:56 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Wed, 05 Oct 2022 06:35:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/8658">@huntc</a> RS485 has different electrical characteristics to RS232 so I don't think you could use 485 on an Omega2 without an adapter/add on board.</p>
]]></description><link>http://community.onion.io/post/24822</link><guid isPermaLink="true">http://community.onion.io/post/24822</guid><dc:creator><![CDATA[crispyoz]]></dc:creator><pubDate>Wed, 05 Oct 2022 06:35:29 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Wed, 05 Oct 2022 19:00:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/8658">@huntc</a> <a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/6184">@crispyoz</a> The MT7688 silicon contains a "UART lite" peripheral, which internally does have hardware handshake. The datasheet describes all the related bits (see UART <em>modem control</em> and <em>interrupt</em> registers), and the linux kernel driver most likely serves those bits correctly when using <code>ioctl()</code>.</p>
<p dir="auto">Only, on the same MT7688 silicon, Mediatek did not bother to wire those handshake signals to any pin multiplexer at all. <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f622.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--cry" title=":cry:" alt="😢" /> <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f644.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--face_with_rolling_eyes" title=":face_with_rolling_eyes:" alt="🙄" /></p>
<p dir="auto">So it's not that the Omega does not <em>expose</em> the needed pins, it's that these signals are <em>buried</em> deep in the chip itself, with no possibility to ever connect them with the outside world. This is the same sort of oversight like forgetting to connect the PWM unit to DMA - the MT7688 is a router chip that was "IoTzed" apparently in a hurry. For a pure router, PWM or serial handshake is not important.</p>
<p dir="auto">Still, Omega2's UARTs can be used for RS485. Instead of using <code>ioctl()</code> to switch RTS, just use a regular GPIO. What RS485 actually needs is not handshake in the true sense anyway (there are no handshake signals in RS485), but just a way to enable/disable the output driver.</p>
<p dir="auto">I've done a few RS485 projects with the Omega2 this way.</p>
<p dir="auto">One of them needed modbus (which is a RS485 based protocol) and I found that <code>libmodbus</code> even has API for this case: <code>modbus_rtu_set_custom_rts()</code>, which allows to pass a pointer to a function which is called when the output drivers should be turned on or off. So I could just set/reset a GPIO in this function, and everything worked.</p>
]]></description><link>http://community.onion.io/post/24824</link><guid isPermaLink="true">http://community.onion.io/post/24824</guid><dc:creator><![CDATA[luz]]></dc:creator><pubDate>Wed, 05 Oct 2022 19:00:00 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Thu, 06 Oct 2022 04:11:51 GMT]]></title><description><![CDATA[<p dir="auto">So, I'm not having much luck. I'm writing things in Rust, so I'm probably making these questions a little harder to answer. However, if I attempt to use <code>ioctl</code> on the file descriptor returned from having opened <code>/dev/ttyS0</code>, I receive "Not a tty (os error 25)". Any thoughts?</p>
<p dir="auto">I'm specifically enabling <code>SER_RS485_ENABLED</code>, which to be honest, I'm unsure is needed anyhow, as I'm not setting anything else. Here's the complete Rust code around this for fun:</p>
<pre><code class="language-rust">const SER_RS485_ENABLED: u32 = 1 &lt;&lt; 0;

#[repr(C)]
#[derive(Default)]
pub struct SerialRs485 {
    flags: u32,
    delay_rts_before_send: u32,
    delay_rts_after_send: u32,
    _padding: [u32; 5],
}

nix::ioctl_write_ptr!(config_rs485, b'T', 0x2F, SerialRs485); // TIOCSRS485

async fn open_rs485(uart_path: impl AsRef&lt;Path&gt;) -&gt; io::Result&lt;File&gt; {
    let fd = OpenOptions::new()
        .read(true)
        .write(true)
        .open(uart_path)
        .await?;

    let mut config = SerialRs485::default();
    config.flags |= SER_RS485_ENABLED;

    unsafe {
        config_rs485(fd.as_raw_fd(), &amp;config)?;
    }

    Ok(fd)
}
</code></pre>
]]></description><link>http://community.onion.io/post/24826</link><guid isPermaLink="true">http://community.onion.io/post/24826</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Thu, 06 Oct 2022 04:11:51 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Thu, 06 Oct 2022 04:52:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/6184">@crispyoz</a> Sorry for not being entirely clear here. We're using an RS485 Transceiver, but we were preferring to hook up the UART's RTS to the "enable tx" pin (output driver).</p>
]]></description><link>http://community.onion.io/post/24827</link><guid isPermaLink="true">http://community.onion.io/post/24827</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Thu, 06 Oct 2022 04:52:00 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Thu, 06 Oct 2022 04:38:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/1033">@luz</a> Thanks for the comprehensive reply. That's crazy re hardware flow control not being exposed outside the MT7688 itself...</p>
<p dir="auto">We're indeed using a regular GPIO on our microcontroller and the nRF kit being used has a nice little event/task system whereby I can get the hardware to clear the enable tx GPIO once the bits have been transmitted. I was looking to see if there was something equivalent for the Onion/MT7688 given that Linux itself does support this, but as per your comments, not possible. What I'm now doing is calling <code>tcdrain</code> on the file descriptor to block and wait for the bytes to be written having set the GPIO. On returning from that, I clear the GPIO. I suspect that <code>modbus_rtu_set_custom_rts</code> must do something similar, so I'll investigate.I shall report back.</p>
]]></description><link>http://community.onion.io/post/24828</link><guid isPermaLink="true">http://community.onion.io/post/24828</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Thu, 06 Oct 2022 04:38:36 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Thu, 06 Oct 2022 04:51:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/1033">@luz</a> - seems as though modbus-rtu <a href="https://github.com/stephane/libmodbus/blob/f0db03dd4816b26cd55432aac820c61eeeccd96b/src/modbus-rtu.c#L296" rel="nofollow">relies on a sleep</a> before clearing the GPIO... I guess you can reliably work out the timing there and they default to the time it takes to send one byte, but it does "feel" a bit of a hack. Hopefully,<code>tcdrain</code> does the job.</p>
]]></description><link>http://community.onion.io/post/24829</link><guid isPermaLink="true">http://community.onion.io/post/24829</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Thu, 06 Oct 2022 04:51:34 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Thu, 06 Oct 2022 09:09:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/8658">@huntc</a> said:</p>
<blockquote>
<p dir="auto">So, I'm not having much luck. I'm writing things in Rust, so I'm probably making these questions a little harder to answer.</p>
</blockquote>
<p dir="auto">Yes <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--wink" title=";-)" alt="😉" /> But this opens a very interesting sideline: what rust toolset are you using for openwrt? rust-lang isn't available in openwrt itself at this time, is it?</p>
<blockquote>
<p dir="auto">However, if I attempt to use ioctl on the file descriptor returned from having opened /dev/ttyS0, I receive "Not a tty (os error 25)". Any thoughts?</p>
</blockquote>
<p dir="auto">This seems strange, because <code>/dev/ttyS0</code> is definitely a tty. I could imagine specific <code>ioctl()</code> flags returning <code>EINVAL</code> for features unsupported in the UART lite, but not <code>ENOTTY</code>.</p>
<blockquote>
<p dir="auto">I'm specifically enabling SER_RS485_ENABLED, which to be honest, I'm unsure is needed anyhow, as I'm not setting anything else.</p>
</blockquote>
<p dir="auto">OpenWrt uses the really super standard <code>ns16550a</code> driver for the "UART lite", so I doubt the driver even knows about buried RTS/CTS on the MT7688 SoC. So I'd expect <code>TIOCSRS485</code> to work software-wise (with no effect on the real world, of course). I might miss some detail, but getting ENOTTY feels like a different, unrelated problem.</p>
<p dir="auto">[<strong>Update:</strong> "ns16550a" is the <em>compatibility</em> string in the device tree - the actual driver is called '8250' which has dozens of variants for specific hardware in <code>drivers/tty/serial/8250</code> - but <code>ns16550a</code> in the omega2 device tree selects the standard variant]</p>
<blockquote>
<p dir="auto">Here's the complete Rust code around this for fun:</p>
</blockquote>
<p dir="auto">Fun indeed - I read the book and some blogs describing elaborate fights with the borrow checker. And still, this snippet has the inevitable <code>unsafe</code> in it. I see the benefits, but haven't managed to wrap my head around all this yet, steaming along in C++ <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--wink" title=";-)" alt="😉" /></p>
<blockquote>
<p dir="auto">We're indeed using a regular GPIO on our microcontroller and the nRF kit being used has a nice little event/task system whereby I can get the hardware to clear the enable tx GPIO once the bits have been transmitted. I was looking to see if there was something equivalent for the Onion/MT7688 given that Linux itself does support this, but as per your comments, not possible.</p>
</blockquote>
<p dir="auto">I was considering to patch GPIO support into <code>ns16550a</code> before I found libmodbus had a workaround for that already built-in. As you say, the tricky thing is to withdraw the driver enable signal not before the tx buffer is actually drained.</p>
<blockquote>
<p dir="auto">seems as though modbus-rtu relies on a sleep before clearing the GPIO... I guess you can reliably work out the timing there and they default to the time it takes to send one byte,</p>
</blockquote>
<p dir="auto">yes, it just calculates the expected tx time from the number of bytes sent and the baud rate.</p>
<blockquote>
<p dir="auto">but it does "feel" a bit of a hack.</p>
</blockquote>
<p dir="auto">It does to me, too. But it works <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--wink" title=";-)" alt="😉" /></p>
<blockquote>
<p dir="auto">Hopefully, tcdrain does the job.</p>
</blockquote>
<p dir="auto">Let us know when you find out, please <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":-)" alt="🙂" /></p>
<p dir="auto">If it <em>does</em> work, then the ns16550a driver must already have a non-blocking way to determine the point of time when the tx fifo gets empty, and if it has, patching some extra GPIO code right there should be possible...</p>
]]></description><link>http://community.onion.io/post/24830</link><guid isPermaLink="true">http://community.onion.io/post/24830</guid><dc:creator><![CDATA[luz]]></dc:creator><pubDate>Thu, 06 Oct 2022 09:09:43 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Thu, 06 Oct 2022 10:43:46 GMT]]></title><description><![CDATA[<p dir="auto">I couln't resist digging into the kernel to see how it actually works...</p>
<p dir="auto">Turns out there is no really clean way to get that point in time when tx is drained with a 8250/16550: There's usleep and looping in the 8250_core's <a href="https://elixir.bootlin.com/linux/v5.18.19/source/drivers/tty/serial/8250/8250_port.c#L2064" rel="nofollow">wait_for_xmitr()</a>.</p>
<p dir="auto">What's more, looking into how the RS485 mode is implemented, they don't even rely on <code>wait_for_xmitr()</code> alone but use an additional <a href="https://elixir.bootlin.com/linux/v5.18.19/source/include/uapi/linux/serial.h#L130" rel="nofollow">delay_rts_after_send</a> timer.</p>
<p dir="auto">The entire thing is insanely complex, I'm far from really understanding it, but one interesting tidbit is that some serial drivers already have "rts-gpios" etc. properties in the device tree to use regular GPIOs for HW handshake lines. Apparently there's the intention for this to become generic, as it is documented in top level <a href="https://elixir.bootlin.com/linux/v5.18.19/source/Documentation/devicetree/bindings/serial/serial.yaml" rel="nofollow">serial.yaml</a>.</p>
<p dir="auto">But only the Freescale IMX driver, and a non-mainline <code>sirfsoc_uart</code> (contained in OpenWrt) actually implement it.</p>
<p dir="auto">The 8250 drivers do not. However, there is one GPIO based feature for RS485 implemented for all serial drivers: <a href="https://elixir.bootlin.com/linux/v5.18.19/source/include/linux/serial_core.h#L256" rel="nofollow">"rs485-term" for bus termination</a>, implemented along with the other generic rs485 features in <a href="https://elixir.bootlin.com/linux/v5.18.19/source/drivers/tty/serial/serial_core.c#L3223" rel="nofollow">serial_core.c</a>.</p>
]]></description><link>http://community.onion.io/post/24831</link><guid isPermaLink="true">http://community.onion.io/post/24831</guid><dc:creator><![CDATA[luz]]></dc:creator><pubDate>Thu, 06 Oct 2022 10:43:46 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Fri, 07 Oct 2022 11:30:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/1033">@luz</a> Thanks again.</p>
<blockquote>
<p dir="auto">Yes <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--wink" title=":wink:" alt="😉" /> But this opens a very interesting sideline: what rust toolset are you using for openwrt? rust-lang isn't available in openwrt itself at this time, is it?</p>
</blockquote>
<p dir="auto">I'm using the <code>mipsel-unknown-linux-musl</code> target, which seems fine. I also built the OpenWrt SDK on macOS, which also seems to work.</p>
<blockquote>
<p dir="auto">Fun indeed - I read the book and some blogs describing elaborate fights with the borrow checker.</p>
</blockquote>
<p dir="auto">TBH I've never found the borrow checker to be an issue. Understanding the notion of lifetimes takes a bit longer though.</p>
<blockquote>
<p dir="auto">And still, this snippet has the inevitable unsafe in it. I see the benefits, but haven't managed to wrap my head around all this yet, steaming along in C++ <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--wink" title=":wink:" alt="😉" /></p>
</blockquote>
<p dir="auto"><code>unsafe</code> rarely creeps up - mostly when calling out to C. <img src="http://community.onion.io/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=ic093v0mjao" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" title=":-)" alt="🙂" /></p>
<blockquote>
<p dir="auto">Turns out there is no really clean way to get that point in time when tx is drained with a 8250/16550: There's usleep and looping in the 8250_core's wait_for_xmitr().</p>
</blockquote>
<p dir="auto">Looks as though it'll be usleep for me then too.</p>
]]></description><link>http://community.onion.io/post/24832</link><guid isPermaLink="true">http://community.onion.io/post/24832</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Fri, 07 Oct 2022 11:30:29 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Wed, 12 Oct 2022 05:21:33 GMT]]></title><description><![CDATA[<p dir="auto">An update here - I'm able to send data out on ttyS0 and my microcontroller receives it ok and then replies... however, the replies are a bit hit-and-miss when receiving on the Omega2S+. I'm wondering now how to go about diagnosing the issue further.</p>
<p dir="auto">My symptoms are scarily similar to <a href="https://community.onion.io/topic/3654/request-for-improvement-on-driver-for-ttys_-or-help-to-do-it-myself" rel="nofollow">a prior post</a>.</p>
]]></description><link>http://community.onion.io/post/24836</link><guid isPermaLink="true">http://community.onion.io/post/24836</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Wed, 12 Oct 2022 05:21:33 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Wed, 12 Oct 2022 05:42:09 GMT]]></title><description><![CDATA[<p dir="auto">Okay... all appears well with /dev/ttyS1 - I was using /dev/ttyS0 before... what could be the difference there? That other post mentioned extra capacitance on ttyS0, but I also tried with lower baud rates etc. Pretty weirdo, but at least things appear to be working for me now.</p>
]]></description><link>http://community.onion.io/post/24837</link><guid isPermaLink="true">http://community.onion.io/post/24837</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Wed, 12 Oct 2022 05:42:09 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Wed, 12 Oct 2022 17:42:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/8658">@huntc</a> I'm interested to know what baud rate you are using on ttyS0 when you experience this issue. Have you examined the coms on a scope? I'm interested to know if this is a hardware or software issue.</p>
]]></description><link>http://community.onion.io/post/24838</link><guid isPermaLink="true">http://community.onion.io/post/24838</guid><dc:creator><![CDATA[crispyoz]]></dc:creator><pubDate>Wed, 12 Oct 2022 17:42:06 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Fri, 14 Oct 2022 00:43:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/6184">@crispyoz</a> Sorry for the slow reply. I tried both 9600 and 115200 baud with the same results. I'm assuming that we have the same voltages for both S0 and S1 (this is the Omega dev board). I don't have a scope, but my colleague and I will get together next week and scope it with his. It is strange that others haven't had the same experience.</p>
]]></description><link>http://community.onion.io/post/24845</link><guid isPermaLink="true">http://community.onion.io/post/24845</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Fri, 14 Oct 2022 00:43:00 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Fri, 14 Oct 2022 01:10:25 GMT]]></title><description><![CDATA[<p dir="auto">Questions from my colleague on the h/w side: why do we need these pull-up resistors on the dev board? (contrary to the hardware guide, which requires floating or pull-down for S0 to avoid affecting boot):</p>
<p dir="auto"><img src="/assets/uploads/files/1665709122582-c35020cd-bb00-4f4f-9aa7-929f518b2543-image.png" alt="c35020cd-bb00-4f4f-9aa7-929f518b2543-image.png" class="img-responsive img-markdown" /></p>
<p dir="auto">BTW the TX and RX labels are on the wrong lines too.</p>
]]></description><link>http://community.onion.io/post/24846</link><guid isPermaLink="true">http://community.onion.io/post/24846</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Fri, 14 Oct 2022 01:10:25 GMT</pubDate></item><item><title><![CDATA[Reply to No UART hardware flow control - how to do RS485 with the Omega? on Thu, 22 Dec 2022 01:22:26 GMT]]></title><description><![CDATA[<p dir="auto">We finally managed to perform our RS485 testing yesterday, which involved an Omega2S+. It turns out that waiting on <code>flush</code> blocks for around 30ms. This was way too long for us, so we ended up calculating our time-on-wire and rounding up to the nearest ms. Given 115200 baud, start/stop bits, and a 41-byte fixed payload size, waiting 4ms worked out about right (it took about 3.7ms for the send to complete when observed by the scope). Given also that it takes about 1.5ms for our microcontroller to process the data and reply, things are working out quite well. Our Omega does RS485, although it'd be so much nicer if we didn't have to fudge the timing.</p>
<p dir="auto">Also, ttyS0 is used for the console, hence being conflicted when trying to use it for our purposes.</p>
<p dir="auto">All good.</p>
]]></description><link>http://community.onion.io/post/25086</link><guid isPermaLink="true">http://community.onion.io/post/25086</guid><dc:creator><![CDATA[huntc]]></dc:creator><pubDate>Thu, 22 Dec 2022 01:22:26 GMT</pubDate></item></channel></rss>