<?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>Sometimes only first char sent over UART using app_uart_fifo, then dead silent</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15707/sometimes-only-first-char-sent-over-uart-using-app_uart_fifo-then-dead-silent</link><description>I control a module over UART using app_uart_fifo. This module is controlled from nRF host by commands to perform things. This generally works fine but however, sometimes when trying to send command it only writes out first character and then everything</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Aug 2016 06:40:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15707/sometimes-only-first-char-sent-over-uart-using-app_uart_fifo-then-dead-silent" /><item><title>RE: Sometimes only first char sent over UART using app_uart_fifo, then dead silent</title><link>https://devzone.nordicsemi.com/thread/59966?ContentTypeID=1</link><pubDate>Fri, 19 Aug 2016 06:40:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f37e6cfe-013b-4513-b3bd-4c0a014c4ffc</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I do not think this should be the problem unless the timer interrupt callback time is like a millisecond or so. Try to change the priority of the FIFO to higher priority, see if it helps. if your app can compromise timer callback lantency little bit, then I see no problem in increasing uart priority.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometimes only first char sent over UART using app_uart_fifo, then dead silent</title><link>https://devzone.nordicsemi.com/thread/59964?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2016 01:04:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bfda29a-60f4-49b0-b427-a3d2a9e57373</guid><dc:creator>Pierre Landau</dc:creator><description>&lt;p&gt;We see this happening rather consistently in something we are trying to develop. Current theory is that the app_uart_init call specifies APP_IRQ_PRIORITY_LOW, and we are adding things to the send FIFO from a timer callback that is also at that priority level.  Perhaps the priority levels need to be different for the system to be able to process the UART interrupt before returning from the caller.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometimes only first char sent over UART using app_uart_fifo, then dead silent</title><link>https://devzone.nordicsemi.com/thread/59965?ContentTypeID=1</link><pubDate>Mon, 15 Aug 2016 06:54:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:375b8715-8ff1-4715-8908-1fa6520af003</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Sorry for late response, you might have already found the reason by now, in case you did not, then the only way to find out where the software gets stuck is to run your programmer in debugger. If you are writing your program in Keil then you can also compile it in keil (just for debugging purpose). Errors like this most probably will not differ with compilers&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometimes only first char sent over UART using app_uart_fifo, then dead silent</title><link>https://devzone.nordicsemi.com/thread/59963?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2016 08:38:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fddd81dc-deff-4e9b-97e7-14a01be89a12</guid><dc:creator>pontusarfwedson</dc:creator><description>&lt;p&gt;Yes, I realize that. But what is currently happening is that it tries to send message over UART, gets stuck after first character, then does NOT reboot. So then it appears that the error for some reason is not being handled. How is this a possibility?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometimes only first char sent over UART using app_uart_fifo, then dead silent</title><link>https://devzone.nordicsemi.com/thread/59962?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2016 08:28:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69f73a86-a826-4445-8412-d0b9953af759</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;APP_ERROR_CHECK will reset for any other err code apart from NRF_SUCCESS. If you are getting NRF_ERROR_NO_MEM then you are writing faster in fifo than reading it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometimes only first char sent over UART using app_uart_fifo, then dead silent</title><link>https://devzone.nordicsemi.com/thread/59961?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2016 07:20:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9519c048-b4d2-43d0-a6e9-78029cbf2fbd</guid><dc:creator>pontusarfwedson</dc:creator><description>&lt;p&gt;Thanks for reply. I assume that the reboot is due to APP_ERROR_CHECK. I develop in Kiel but do however compile with own gcc compiler. Therefor, presumable cannot debug with breakpoints. But are there any scenario where APP_ERROR_CHECK will behave the way I explained? The only logical error code is NRF_ERROR_NO_MEM.&lt;/p&gt;
&lt;p&gt;Sorry for not doing more research. I have not investigated the APP_ERROR_CHECK that much but I can see now that it makes it stop advertising and NVIC_SystemReset(), no matter what the ERROR_CODE is. So the chip should therefor reboot every time i get NRF_ERROR_NO_MEM from uart. However, does not seem to do so.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sometimes only first char sent over UART using app_uart_fifo, then dead silent</title><link>https://devzone.nordicsemi.com/thread/59960?ContentTypeID=1</link><pubDate>Fri, 12 Aug 2016 06:41:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0b335d8-634f-42c1-a1b2-9c289577b968</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;if the reboot is because of the APP_ERROR_CHECK then i suggest you to compile it with no optimizations, and set a breakpoint at this check and see what error_code is returned.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>