<?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>Send UART break</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51615/send-uart-break</link><description>Our nRF52840 is connected via UARTE @ UART_1 to a modem which does not have a WAKE pin - the only method of waking it from sleep is to send a UART break. Is there any way to accomplish this on the nRF52840?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Nov 2019 17:06:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51615/send-uart-break" /><item><title>RE: Send UART break</title><link>https://devzone.nordicsemi.com/thread/219534?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2019 17:06:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f414b5b-5654-432d-a6de-9d9753feeaff</guid><dc:creator>ScruffR</dc:creator><description>&lt;p&gt;Thanks for the reply!&lt;/p&gt;
&lt;p&gt;The 100&amp;micro;s + 12&amp;micro;s were meant to reflect the minimum lengths (plus some extra) and a &amp;quot;normal&amp;quot; reconfiguration did cause some unexpected noise on the lines, but since asking this question I&amp;#39;ve done some more digging and came up with an alternative &amp;quot;workaround&amp;quot; shown in my other question about 2 stop bit configuration here&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/54215/howto-use-uarte-250000-8n2-plus-txbreak-for-dmx512-protocol"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/54215/howto-use-uarte-250000-8n2-plus-txbreak-for-dmx512-protocol&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In a nutshell I just disable the interface via `&lt;span&gt;NRF_UARTE0-&amp;gt;ENABLE = 0`, set the TX pin LOW, wait for a variable time and then reenable via `NRF_UARTE0-&amp;gt;ENABLE = 8`. The reenabling takes about 14&amp;micro;s which works well with the min. 12&amp;micro;s MAB.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send UART break</title><link>https://devzone.nordicsemi.com/thread/219506?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2019 14:23:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93edf6b8-4614-4473-899a-0c7e6029c5a3</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;The MAB (Mark-after-break) is usually specified &lt;em&gt;variable&lt;/em&gt; length (with a minimum) for DMX512.The devices on the bus simply wait for the next start bit.&lt;/p&gt;
&lt;p&gt;If you really needed that tight timing consider using the PWM peripherial in order to create the waveform.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send UART break</title><link>https://devzone.nordicsemi.com/thread/219366?ContentTypeID=1</link><pubDate>Sun, 10 Nov 2019 15:22:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e71e8ab8-7934-41f3-89e9-c9f044e64f7c</guid><dc:creator>ScruffR</dc:creator><description>&lt;p&gt;Sorry for resurrecting this thread.&lt;/p&gt;
&lt;p&gt;I have a similar problem but the proposed solution won&amp;#39;t work with that as it would break the timing requirements.&lt;/p&gt;
&lt;p&gt;In order to facilitate UARTE0 (at 250000 baud with 8bit no parity 2 stop bits) as a DMX512 controller I&amp;#39;d need a 100&amp;micro;s LOW 12&amp;micro;s HIGH level on the TX pin immediately followed by an up to 513 byte data train.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So reconfiguring the interface won&amp;#39;t be an option.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are there any alternative solutions?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BTW, I&amp;#39;m also faced with the problem that `&lt;span class="pl-c1"&gt;nrf_uarte_configure&lt;/span&gt;&lt;span&gt;()` doesn&amp;#39;t seem to provide an option for setting 2 stop bits.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send UART break</title><link>https://devzone.nordicsemi.com/thread/207203?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 16:44:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f511d19-16dc-4f34-b632-e6310a148ff4</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Sending 0x00&lt;em&gt; at the correct baud rate&lt;/em&gt; should not be interpreted as a Break - because of the Start &amp;amp; Stop bits.&lt;/p&gt;
&lt;p&gt;But &lt;a href="https://devzone.nordicsemi.com/members/turboj"&gt;Turbo J&lt;/a&gt;&amp;#39;s suggestion to use a way-too-low baud rate is a good one - unless this mystery &amp;quot;modem&amp;quot; is already running at a very slow speed ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send UART break</title><link>https://devzone.nordicsemi.com/thread/207191?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 14:41:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51a57f4b-5b83-46ed-b8ae-2f5dac6f7d11</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Dead simple: Program the lowest baud rate that the UART(E) peripherial supports, and then send a 0x00 byte.&lt;/p&gt;
&lt;p&gt;If you cannot go low enough, re-program the IO pin to be normal GPIO output and pull it down manually - you will need a way to keep track of time, too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send UART break</title><link>https://devzone.nordicsemi.com/thread/207164?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 13:16:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c58e358c-d6e1-4ffa-8c4b-5426dee41640</guid><dc:creator>endian-benjamin</dc:creator><description>&lt;p&gt;So it&amp;#39;s not the case that a break is sent if you for example suspend the UART and then resume it?f&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send UART break</title><link>https://devzone.nordicsemi.com/thread/207149?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 12:48:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01270bac-d0ba-4429-923e-97febd2acb33</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I don&amp;#39;t know how your device interprets it, but according to the page that I linked, it may be sufficient to just send a 0x00. If not you have to do something else. It may be just as easy to disable the UART, set it to low, wait for a while (a bit more than one byte with the baudrate that you use, and turn the UART back on. I don&amp;#39;t have the modem that you speak of, so I can&amp;#39;t test it, but you can try to analyze the GPIO with a logic analyzer to see that it behaves like you want to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send UART break</title><link>https://devzone.nordicsemi.com/thread/207136?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 12:05:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a85a871-6203-4ef2-8aa7-f5157c876b8b</guid><dc:creator>endian-benjamin</dc:creator><description>&lt;p&gt;Yeah the plan B is to reconfigure the baudrate to something very low and send&amp;nbsp;0x00. It feels pretty hacky tho :P&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send UART break</title><link>https://devzone.nordicsemi.com/thread/207133?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 12:00:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2deb2738-a758-4e69-86f1-e8da26e61fba</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am not sure exactly what sort of device that is, but it looks like from &lt;a href="https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter#Break_condition" rel="noopener noreferrer" target="_blank"&gt;here&lt;/a&gt;, that a break is the line being held low.&lt;/p&gt;
&lt;p&gt;You can try to send a UART string containing 0x00&amp;#39;s, and see if that triggers the modem to wake up.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If not, a UART break condition is just the line held low, so you can try to disable the UART, set the pin as an output, put it in logic low (set it to 0. You can use nrf_gpio_pin_clear(pin_number)).&lt;/p&gt;
&lt;p&gt;But first, try to send a string containing some 0x00&amp;#39;s.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>