<?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>nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83858/nrf52-dk-uart-rx-over-usb-loses-first-byte-after-hard-reset-but-not-after-power-cycle</link><description>we have an app where we use a nRF52-DK board (with the 52832 chip) as a serial to BLE interface. We connect to the board using the USB UART channel. The interface IC on the board is flashed with binary j-link-ob-sam3u128-v2-nordicsemi-170724.bin 
 We</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Feb 2022 15:38:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83858/nrf52-dk-uart-rx-over-usb-loses-first-byte-after-hard-reset-but-not-after-power-cycle" /><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/352142?ContentTypeID=1</link><pubDate>Wed, 09 Feb 2022 15:38:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c4115db-79fe-4645-adad-f548a2f7c886</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;thanks. We&amp;#39;ve standardised on V6.88a which seems most stable for us. Also a 32 bit version, not sure is things started to get a bit more tricky when they went to 64 bit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/351771?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 11:52:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2da80984-b5c4-4819-a86f-0c239faa424c</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Thank you for your feedback. I can&amp;#39;t say I&amp;#39;ve seen the same instability myself to be honest, and this sounds like more of an issue on the SEGGER side, so it&amp;#39;s rather limited what I can do here. I guess you can contact their support here if you&amp;#39;d like to report this to them:&amp;nbsp;&lt;a href="https://www.segger.com/support/technical-support/"&gt;https://www.segger.com/support/technical-support/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/351687?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 07:53:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67e115cd-b93f-4d9d-adef-5f08103fcaf5</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;hmmm, now it seems to be working - OK, never mind.&lt;/p&gt;
&lt;p&gt;So I updated to the Segger Command Line tools V7.60 - the UART issue seems indeed to be fixed. However I have the impression it is less stable than previous versions. I usually have several boards connected to my system, and I program them by serial number. A few times I was no longer able to do that for the target - it seemed as if the JLink tools could no longer find it. I had to unplug all other boards and do &amp;quot;nrfjprog --eraseall&amp;quot; to get it back.&lt;/p&gt;
&lt;p&gt;To me it seems like the 7.68a 32 bit toolset has been the most stable and had least problems.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/351673?ContentTypeID=1</link><pubDate>Tue, 08 Feb 2022 07:02:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ccfaecb-fbbf-4db7-bc50-452849797d7f</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Glad to hear you were able to resolve this Daniel!&lt;/p&gt;
&lt;p&gt;Can you show me a screenshot of how your &amp;quot;delete&amp;quot; button looks? Does it not look like this? I at least have an option to &amp;quot;Delete this reply&amp;quot;, but that might be my settings as a mod making it look like this.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1644303485499v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/351467?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 08:28:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e07d8fc8-e929-442f-b35b-0fc926e2067d</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;OK seems good now. I got into a state where I could not erase the target for a bit, our scripts all use the serial number of the target but it wasn&amp;#39;t found. Eventually I could erase by connecting only one board and running erase without the serial number.&lt;/p&gt;
&lt;p&gt;Now the interface seems OK.&lt;/p&gt;
&lt;p&gt;(By the way I tried to delete the post below, when I do so I get a side popup saying &amp;quot;do you want to delete&amp;quot;but nowhere to say &amp;quot;yes&amp;quot;&amp;nbsp; .... :-) )&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for fixing!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/351462?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 08:13:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b1e11b6-15ad-4ea8-ad8a-84705ec39458</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;I just checked. I believe there is still an issue.&lt;/p&gt;
&lt;p&gt;We now have a flag in our build to bypass the Segger USB UART channel and use a TTL USB UART connected directly to the target. WHen I use this our tests run fine. When I go via the Segger channel, they fail. I didn&amp;#39;t have time yet to look in detail what is happening, but it looks like there is still an issue.&lt;/p&gt;
&lt;p&gt;When I have time to investigate further, I will let you know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/351454?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 07:18:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2333b39f-bf9b-45d7-974e-01a48bb99974</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;thank you Simon - I will check it out this morning. &lt;/p&gt;
&lt;p&gt;best&lt;/p&gt;
&lt;p&gt;Daniel&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/351449?ContentTypeID=1</link><pubDate>Mon, 07 Feb 2022 06:49:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0940eb17-de0f-4cdf-bfba-5e5b8eee8f32</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I just wanted to update you. I got word from the devs that the latest J-Link version &lt;strong&gt;v7.60g&amp;nbsp;&lt;/strong&gt;should resolve this issue, and has been marked as &amp;quot;resolved&amp;quot; by SEGGER.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/349225?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 11:59:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba6b2101-c995-4ce6-a379-be8a9d9787d4</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Indeed. I don&amp;#39;t have more information to share at the moment other than that we&amp;#39;re looking into it, and that we&amp;#39;ve reported it to SEGGER. Glad you have a workaround for now. If you&amp;#39;d like, I can keep you updated, but I can&amp;#39;t guarantee when I have more information for you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/349132?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 07:51:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:557a39bd-4a91-4b23-854f-448af93f9cd9</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;thanks Simon.&lt;/p&gt;
&lt;p&gt;A very curious and confusing behaviour we noticed early on in this investigation was that I could take a DK board programmed by a colleague and it ran fine on my setup. However, after I re-programmed the board &lt;strong&gt;with the same binary, everything would break! &lt;/strong&gt;(This was before we knew the serial stuff was not good.) Also we have seen some inconsistent but still wrong behaviour (like the &amp;quot;missing first byte&amp;quot; stuff on my initial post here). So it is not just about the serial handling I think. This was not a one off, it happened quite consistently. There is something really odd and broken about this version of JLink I think.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/349130?ContentTypeID=1</link><pubDate>Mon, 24 Jan 2022 07:43:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcdd571b-7050-43eb-83ae-ef14fdb4bb17</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Daniel&lt;/p&gt;
&lt;p&gt;I was indeed able to reproduce the same behavior on my end with J-Link v7.60e, but only on the very first UART message I write to the central device. After that it works as expected until I reset the DK. So this is not only you. I&amp;#39;ll report the reproduced behavior internally and we&amp;#39;ll see what we can do to remedy this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348955?ContentTypeID=1</link><pubDate>Fri, 21 Jan 2022 14:07:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9c6b206-8dab-4fa4-953d-1cd76e138818</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;No problem, I appreciate your responsiveness. It took us a few days to isolate this issue.&lt;/p&gt;
&lt;p&gt;I guess it does look as if RTT Viewer (or the suite it is a part of) is the issue, but as we cannot really see the traffic between that app and your interface uC, it&amp;#39;s hard to be sure, and frankly we don&amp;#39;t really want to spend much more time on it. We can workaround for now. If you reproduce and work on the issue, taking it up with Segger if that seems appropriate, that would be OK for us. Obviously we&amp;#39;d like to see a fix going forward.&lt;/p&gt;
&lt;p&gt;Please keep us posted with your findings though - I&amp;#39;d personally like least to see the issue confirmed, as I thought I was going crazy for a bit :-)&lt;/p&gt;
&lt;p&gt;All the best.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348950?ContentTypeID=1</link><pubDate>Fri, 21 Jan 2022 13:52:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b24cc13-c441-450b-b71c-54d8ea10551e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I agree that it didn&amp;#39;t sound like a firmware issue from your description, I just wanted to put it down in writing just in case.&lt;/p&gt;
&lt;p&gt;I have reported this internally now, and we&amp;#39;re looking into it. Have you contacted SEGGER, as it seems like JLink/the RTT viewer needs an update to fix this.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348894?ContentTypeID=1</link><pubDate>Fri, 21 Jan 2022 11:23:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a340bbc3-7b3c-47f9-a347-8b639bcd43a6</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;hi Simon - I checked this this morning with a colleague. Initially he could not reproduce, it turned out that he was using RTT Viewer V6.88a, I have V7.60. He was able to reproduce and then clear the issue by switching between the versions. So looks like an issue with V7.60.&lt;/p&gt;
&lt;p&gt;Please read my post above carefully. I was able to show (by connecting a TTL UART to the interface MCU TxD pin) that the problem is NOT related to our firmware. By viewing this signal line using RealTerm it was clear that the interface MCU is the problem.&lt;/p&gt;
&lt;p&gt;You can probably reproduce this yourself without even programming the board, by doing the same. Connect a TTL UART RxD pin to the signal IMCU_TxD (which is P0.08 on the DK, it is available on connector P6). Type some characters to the JLINK UART channel and see what that UART picks up. I think you will then see the issue.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348887?ContentTypeID=1</link><pubDate>Fri, 21 Jan 2022 10:54:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5776c44-6cfa-4058-bd8a-6434b75f87f1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Daniel&lt;/p&gt;
&lt;p&gt;Could you share what SDK version the project is built in, and what revision of the nRF52832 DK you&amp;#39;re using? A picture of the sticker on the interface MCU would be helpful. I can&amp;#39;t recall running into this issue before on our end with the SDK examples, but I&amp;#39;ll investigate.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One thought that came to mind regarding your test procedure is that in the&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/uart_example.html"&gt; default UART example&lt;/a&gt;. Q and q has its own functionality that causes the program to transmit &amp;quot;EXIT!&amp;quot; and go into an infinite loop. So does this happen when you write other characters/strings than QWERTY as well? Just to rule out that the Q&amp;#39;s &amp;quot;exit functionality&amp;quot; isn&amp;#39;t still there in your app. I don&amp;#39;t think it is since it works as intended with the standard TTL UART, but I thought it was worth mentioning.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348795?ContentTypeID=1</link><pubDate>Thu, 20 Jan 2022 18:05:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e3214e3-35b6-47c0-abfb-3043ecc3a23a</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;Simon, when I cut solder bridges and use a standard TTL UART connected directly to the target (bypassing the interface uC) all the issues I had with serial comms are resolved.&lt;/p&gt;
&lt;p&gt;This must surely be an issue with the interface uC firmware.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348782?ContentTypeID=1</link><pubDate>Thu, 20 Jan 2022 16:09:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55a23a0e-d8ce-41a3-9461-7c0a679cea42</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;Simon, I believe that this is an issue with the interface uC. I could show incorrect behaviour, independent of the code on the nRF52832. Here is how:&lt;/p&gt;
&lt;p&gt;1. connect the Rx pin of a TTL UART to port 8 on the SDK board (TxD of the interface uC, RxD of the 52832. Connect to RealTerm or similar, 115200, 8N1&lt;/p&gt;
&lt;p&gt;2. connect a second RealTerm instance to the JLINK UART port.&lt;/p&gt;
&lt;p&gt;3. type &amp;quot;QWERTY&amp;quot; into the sending terminal.&lt;/p&gt;
&lt;p&gt;4. Observe &amp;quot;QQWERTY&amp;quot; in the receiver (the one on port 8).&lt;/p&gt;
&lt;p&gt;Also you will see each char is delayed by one send, assuming you can reproduce.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348759?ContentTypeID=1</link><pubDate>Thu, 20 Jan 2022 14:49:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78421aec-f837-4684-8adb-82b2c1d8c6f4</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;Simon, when I look at the source of your current examples - I think ours was originally based on Central UART, but this is before I inherited this code - they do not use app_uart_get() as our code does,&lt;/p&gt;
&lt;p&gt;However app_uart_get() *should* work OK on a byte by byte basis, no?&lt;/p&gt;
&lt;p&gt;Looking further I discovered that if I connect to the USB UART with a terminal program and then use RTT to see chars as they come in - and I type QWERTY right after power cycling the nRF52-DK board - I see &amp;quot;QQWERTY&amp;quot; in the debugger. And each character arrives &amp;quot;delayed by one&amp;quot; (i.e. when I type the &amp;quot;R&amp;quot; the &amp;quot;E&amp;quot; hits the debugger output).&lt;/p&gt;
&lt;p&gt;This has to be something very silly to do with flushing the FIFO or something, but at the moment it is giving me a headache.&lt;/p&gt;
&lt;p&gt;I could indeed build on of your SDK examples and maybe rewrite part of our app to do it your way - but it would help me a great deal if I could simply figure out why this odd behaviour is happening. &lt;/p&gt;
&lt;p&gt;I could later try to make a minimal version that can build and reproduce the issue, maybe. I could also connect a TTL UART to the physical pin between the nRF and the interface MCU perhaps. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348736?ContentTypeID=1</link><pubDate>Thu, 20 Jan 2022 13:58:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6bcc9e0-b80c-4a2e-b5c1-b90f76006a37</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;hi Simon - very weird indeed. I believe that our app was based on that example, but not sure. Where can I get the source? then I can try to build and reproduce ...? (EDIT) - ok, I found it, thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348733?ContentTypeID=1</link><pubDate>Thu, 20 Jan 2022 13:51:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9e2d6dd-0ebf-4aeb-b603-76eca243a776</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This sounds very strange, and is not a known issue as far as I know. Can you provide some information on what SDK version and if you have based your project on any of our example applications. This shouldn&amp;#39;t occur with the basic&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/uart_example.html"&gt; UART peripheral example&lt;/a&gt; project for example.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52-DK : UART Rx over USB loses first byte after hard reset but not after power cycle</title><link>https://devzone.nordicsemi.com/thread/348661?ContentTypeID=1</link><pubDate>Thu, 20 Jan 2022 10:11:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38422b3d-5159-4c48-a28d-d8cb674f7f13</guid><dc:creator>danmcb</dc:creator><description>&lt;p&gt;our code to read the uart starts like this:&lt;/p&gt;
&lt;div style="background-color:#1e1e1e;color:#d4d4d4;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#569cd6;"&gt;void&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#dcdcaa;"&gt;uart_event_handle&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;(&lt;/span&gt;&lt;span style="color:#4ec9b0;"&gt;app_uart_evt_t&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; * &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;p_event&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#4ec9b0;"&gt;uint32_t&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;ret_val&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#4ec9b0;"&gt;uint8_t&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;b_in&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;switch&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; (&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;p_event&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;evt_type&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#6a9955;"&gt;/**@snippet [Handling data from UART] */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#c586c0;"&gt;case&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; &lt;/span&gt;&lt;span style="color:#4fc1ff;"&gt;APP_UART_DATA_READY&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:#d4d4d4;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;ret_val&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt; = &lt;/span&gt;&lt;span style="color:#dcdcaa;"&gt;app_uart_get&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;(&amp;amp;&lt;/span&gt;&lt;span style="color:#9cdcfe;"&gt;b_in&lt;/span&gt;&lt;span style="color:#d4d4d4;"&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>