<?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>Problem in switching to DFU mode without button pressed (custom board)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7501/problem-in-switching-to-dfu-mode-without-button-pressed-custom-board</link><description>Hi, 
 I have a custom board with nrf51822QFAA(256K flash) and I&amp;#39;m trying to test DFU-OTA (BLE transport) for an application. With only Softdevice and bootloader installed, I was able to successfully flash the application(application.hex) using DFU profile</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Jun 2015 14:31:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7501/problem-in-switching-to-dfu-mode-without-button-pressed-custom-board" /><item><title>RE: Problem in switching to DFU mode without button pressed (custom board)</title><link>https://devzone.nordicsemi.com/thread/26675?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2015 14:31:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a32534c8-9dd8-4b65-a325-c50d2e2ec3a5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@sidekick: you can write to it using nrfjprog, the same way as how you did it with 0x0003FC00.&lt;/p&gt;
&lt;p&gt;I would suggest you to look at how we organize the bootloader setting structure, how we store and read it so that you understand why you need to write to those address.&lt;/p&gt;
&lt;p&gt;Please have a look at bootloader_setting_arm.c, bootloader_types.h and bootloader_app_is_valid() function in bootloader.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in switching to DFU mode without button pressed (custom board)</title><link>https://devzone.nordicsemi.com/thread/26674?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2015 13:07:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:017e3e39-b7b0-4960-bf59-28b065162459</guid><dc:creator>sidekick</dc:creator><description>&lt;p&gt;@Hung Bui: Thank you for clearing my doubts. I just noticed that in KEIL uVision, under &lt;em&gt;Project option -&amp;gt; C/C++ tab, the &amp;quot;Enum Container always int&amp;quot;&lt;/em&gt; box was unchecked. So I&amp;#39;ve checked that box now. You&amp;#39;ve also mentioned that nothing should be written at &lt;strong&gt;0x00003FC04U&lt;/strong&gt;, I see (in debugger) that It&amp;#39;s set to 0x000000FE. how should I make sure that it&amp;#39;s set to 0x00. Will a simple&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; *((unsigned int *)0x00003FC04U) = 0x00;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;in application code would work ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in switching to DFU mode without button pressed (custom board)</title><link>https://devzone.nordicsemi.com/thread/26677?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2015 12:22:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b044a4eb-16cd-4a8d-ac6c-ba437783f8cc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Sidekick: Using nrfjprog.exe --memwr to write to 0x03fc00 is just a hack. It&amp;#39;s not how the bootloader inteded to work. What is designed, is that after you flash the bootloader using nrfjprog, you use DFU master (such as nRFToolbox ) to flash the application, instead of using KEIL or nrfjprog.
The bootloader will take care of writing to that 0x03fc000 address.&lt;/p&gt;
&lt;p&gt;However, this may cause some hassle when you are developing application or when you do programming for production. That&amp;#39;s why directly writing to nrfjprog.exe --memwr 0x03fc00 --val 0x1 is suggested.&lt;/p&gt;
&lt;p&gt;When in development and you want to quickly update the firmware by KEIL without using DFU, you should make sure no CRC is written at address 0x00003FC04, which is the CRC value. In your case it&amp;#39;s 0x000000FF (I assume you are using SDK v6.1 with Enum container always int option selected ). YOu shoudl set it to 0x00 to avoid CRC check.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in switching to DFU mode without button pressed (custom board)</title><link>https://devzone.nordicsemi.com/thread/26673?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2015 11:27:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07cd338d-ecee-439f-8b6b-a2e63f5d4148</guid><dc:creator>sidekick</dc:creator><description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;
After flashing the new application f/w using, the usual method of KEIL and J-link (as mentioned in my previous comment), I once again wrote 0x1 at the address 0x03FC00 using nrfjprog.exe and did a soft reset, i.e.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;$ nrfjprog.exe --memwr 0x03fc00 --val 0x1&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;$ nrfjprog.exe --reset&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This time, the bootloader seemed to have found the new application f/w and my custom now started advertising as test_02(as expected). This method is okay, but Is there an alternative way to achieve this, i.e. by doing some changes in bootloader and/or application code ? Basically, I would like to be able to upgrade application f/w using both usual and DFU-OTA methods.&lt;/p&gt;
&lt;p&gt;(&lt;strong&gt;Note&lt;/strong&gt; that, application f/w upgrade with Nordic MCU or nRF Toolbox for Android does not require me to write anything at the address (0x03FC00) for a successful boot from new application firmware after upgrade)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in switching to DFU mode without button pressed (custom board)</title><link>https://devzone.nordicsemi.com/thread/26672?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2015 14:20:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67581dcf-f897-494e-90ca-30dfe259a55c</guid><dc:creator>sidekick</dc:creator><description>&lt;p&gt;I&amp;#39;ve now another issue. I&amp;#39;m now not able to boot from the application f/w which is flashed using normal method (J-link and KEIL). Please see the steps below for complete information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Erase all using nrfjprog.exe&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Flash SD v7.1.0 using nRFStudio Go.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Flash Bootloader using Keil, J-link
and nrfjprog.exe&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Observe that the Device now starts
advertising as &amp;quot;Dfu Targ&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Flash application using nRF Toolbox&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Observe that the device now starts
advertising as &amp;quot;test_01&amp;quot;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Read memory location 0x03fc00 using
nrfjprog.exe&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;0x0003FC00:&lt;/strong&gt; 772B00&lt;strong&gt;01&lt;/strong&gt; 000000FF                     |..+w....|&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Flash application f/w using Keil,
J-link and without any external
utility (nrfjprog.exe)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Expection:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;New application f/w (say test_02) should show up&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Actual result:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Device stays in bootloader mode, i.e. starts advertising as &amp;quot;Dfu Targ&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in switching to DFU mode without button pressed (custom board)</title><link>https://devzone.nordicsemi.com/thread/26676?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2015 13:58:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b7fc4cb-8a3d-4b4d-ac4d-34118e863a83</guid><dc:creator>sidekick</dc:creator><description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt;
I was able to switch from normal operation mode to bootloader mode for application firmware upgrade. The issue was that DFU service initialization was returning &lt;code&gt;NRF_ERROR_NO_MEM&lt;/code&gt;. I removed some of the stale and unnecessary code such as
&lt;code&gt;dm_ble_evt_handler(p_ble_evt);&lt;/code&gt; from ble_stack_init() routine in the application, etc. for my setup(SDK v6.1.0, SD v7.1.0) and it worked.
&lt;strong&gt;Summary:&lt;/strong&gt;
Now I&amp;#39;m able to put NRF51822QFAA into DFU mode, with an existing application and do application firmware upgrade using Nordic MCP for Android.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem in switching to DFU mode without button pressed (custom board)</title><link>https://devzone.nordicsemi.com/thread/26671?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2015 07:10:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:afb963e4-7661-485c-a62a-3dcf04a628b6</guid><dc:creator>sidekick</dc:creator><description>&lt;p&gt;According to &lt;a href="https://devzone.nordicsemi.com/question/29590/error0x85gatt-error/"&gt;this&lt;/a&gt; thread, GATT Error (0x83) could be due to bonding and/or Android version problem. I tried to connect to my custom board with NRF51822QFAA without any bonding and with a Samsung phone with Android version 5.0, but still not able to complete service discovery.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>