<?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>How to add uart debug support to BLE DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11269/how-to-add-uart-debug-support-to-ble-dfu</link><description>Hello, 
 I want to add uart debug support to the BLE DFU bootloader (nRF51822, S120, custom board).
Therefor I increased the possible size of the bootloader (start 0x39800, size 0x6400). That works without any problems.
Then I added the app_uart.c</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Jan 2016 07:46:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11269/how-to-add-uart-debug-support-to-ble-dfu" /><item><title>RE: How to add uart debug support to BLE DFU</title><link>https://devzone.nordicsemi.com/thread/42367?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 07:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e0dea24-43d3-468d-8c28-25dbab6efd3e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;No problem :) Could you mark my answer as correct so that other DevZone users can see that problem has been solved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add uart debug support to BLE DFU</title><link>https://devzone.nordicsemi.com/thread/42366?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 06:42:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c0a06b2-f7a7-480c-a67f-c8b2722d4a07</guid><dc:creator>Andreas</dc:creator><description>&lt;p&gt;Thank you Bjørn, now it is much more clear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add uart debug support to BLE DFU</title><link>https://devzone.nordicsemi.com/thread/42365?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2016 16:39:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4222f4b-898f-48dd-a0b3-9465e70dac68</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;See answer to the post I linked to in my answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add uart debug support to BLE DFU</title><link>https://devzone.nordicsemi.com/thread/42368?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2016 16:10:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5640c448-8a46-4a5b-80b2-851d0b20fb6c</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You have to  either change your code to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;for (uint8_t i = 0; i &amp;lt; len; i++)
{
    while (app_uart_put(s[i]) != NRF_SUCCESS);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or  use &lt;code&gt;app_uart_fifo.c&lt;/code&gt; instead of &lt;code&gt;app_uart.c&lt;/code&gt;. Please see &lt;a href="https://devzone.nordicsemi.com/question/48988/stuck-application-when-implementing-uart/"&gt;this&lt;/a&gt; post&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add uart debug support to BLE DFU</title><link>https://devzone.nordicsemi.com/thread/42364?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2016 16:07:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7dd724a-8601-477a-a30a-34fb7b01382e</guid><dc:creator>Andreas</dc:creator><description>&lt;p&gt;OK, I think I solved the problem. I switched from app_uart.c to app_uart_fifo.c.
Can anyone explain me, why app_uart_fifo.c does work and app_uart.c does not?
Now the complete string is transmitted.&lt;/p&gt;
&lt;p&gt;Regards,
BTProgrammer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add uart debug support to BLE DFU</title><link>https://devzone.nordicsemi.com/thread/42363?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2016 15:21:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bb1ee0d-a90a-4184-a242-71ac59298916</guid><dc:creator>Andreas</dc:creator><description>&lt;p&gt;Ok, I have done a little step forward. If I send only one byte via the interface, it is working. So after uartOpen() I do&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;c=&amp;#39;t&amp;#39;;app_uart_put(c);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And I get the &amp;quot;t&amp;quot; on my serial terminal. Why does the&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void putstring(char * s){
uint32_t err_code;

uint8_t len = strlen((char *) s);
for (uint8_t i = 0; i &amp;lt; len; i++)
{
    err_code = app_uart_put(s[i]);
    APP_ERROR_CHECK(err_code);
}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;not work? Is there a problem with the scheduler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>