<?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>Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27191/replacing-bootloader-through-nrfjprog---error-single-invalid-bank</link><description>I am trying to upload a bootloader to an nRF52832 chip. (This chip is on the ruuvitag and is programmed through their developer board). 
 I got the bootloader working on the DK but when I tried to upload it to the Ruuvitag I get the log output:
Error</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Dec 2017 01:07:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27191/replacing-bootloader-through-nrfjprog---error-single-invalid-bank" /><item><title>RE: Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/thread/107154?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2017 01:07:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2359a9fb-e6da-4ee3-a94e-058778965259</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Could you clarify, earlier you mentioned: &amp;quot; I can get the example working such that I can see the DFU, connect to it, but when I attempt to upload the firmware to it, it fails. &amp;quot; Meaning you actually saw DFUTarg advertising by the Ruvitag ?&lt;/p&gt;
&lt;p&gt;One thing you should check if a phone/central device may automatically connect to the Ruvitag or not. If you were bonded with the central before, the central may automatically connect to the device. You can try to change the BLE address before advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/thread/107153?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2017 00:42:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2c1a33c-fbf8-48f5-8610-d54f431c0f74</guid><dc:creator>ishgum</dc:creator><description>&lt;p&gt;Hey Hung,
I will try to explain the full situation clearer.&lt;/p&gt;
&lt;p&gt;I have been developing with both the Nordic DK and a Ruuvitag, which uses the nRF52832 chip and has a breakout board to program that directly. I have been developing on a mac using GCC and programming the board using nrfjprog. I recently moved to using SDK 14.1 and SD 5.&lt;/p&gt;
&lt;p&gt;I have been able to program the both the DK and the Ruuvitag with many of the nordic examples and have  my own program which works on both, which uses BLE with softdevices. I now would likely the ability to upload my firmware OTA.&lt;/p&gt;
&lt;p&gt;I have simply used the Nordic DFU example (secure_dfu_ble) as my bootloader. I erase the chip using nrfjprog, upload softdevices then upload the bootloader. On the DK this works perfectly, and I am able to upload my program and get the expected output.&lt;/p&gt;
&lt;p&gt;The Ruuvitag has a custom board.h file which does some pin mapping, and with this included instead of the pca10040 board the program uploads with no problem. The only issue is that the program doesn&amp;#39;t seem to work, I don&amp;#39;t see DfuTarg as an option in nrf Toolbox like I see with the DK (note that this is slightly different to earlier re: SDK update). And so have no opportunity to even try and upload the firmware.&lt;/p&gt;
&lt;p&gt;I then altered the program to output over UART so I could see what was happening, I made the changes to the softdevices RAM as the program suggested and get the following output:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;info&amp;gt; nrf_sdh_soc: Inside main
&amp;lt;info&amp;gt; nrf_sdh_soc: LED&amp;#39;s initisialised
&amp;lt;info&amp;gt; nrf_sdh_soc: Buttons initialised
&amp;lt;debug&amp;gt; nrf_sdh_soc: In nrf_bootloader_init
&amp;lt;debug&amp;gt; nrf_sdh_soc: in weak nrf_dfu_init_user
&amp;lt;debug&amp;gt; nrf_sdh_soc: In real nrf_dfu_init
&amp;lt;debug&amp;gt; nrf_dfu_settings_svci: Running nrf_dfu_settings_init(sd_irq_initialized=false).
&amp;lt;debug&amp;gt; nrf_sdh_ble: Calling nrf_dfu_flash_init(sd_irq_initialized=false)...
&amp;lt;debug&amp;gt; nrf_sdh_ble: Initializing nrf_fstorage_nvmc backend.
&amp;lt;debug&amp;gt; nrf_sdh_soc: Initializing the clock.
&amp;lt;debug&amp;gt; nrf_sdh_soc: Enter nrf_dfu_continue
&amp;lt;error&amp;gt; nrf_sdh_soc: Single: Invalid bank
&amp;lt;debug&amp;gt; nrf_sdh_soc: Enter nrf_dfu_app_is_valid
&amp;lt;debug&amp;gt; nrf_sdh_soc: Return false in valid app check
&amp;lt;debug&amp;gt; nrf_sdh_soc: In nrf_dfu_transports_init
&amp;lt;debug&amp;gt; nrf_sdh_soc: num transports: 1
&amp;lt;debug&amp;gt; nrf_sdh_soc: Initializing BLE DFU transport
&amp;lt;debug&amp;gt; nrf_sdh_soc: vector table: 0x00073000
&amp;lt;debug&amp;gt; nrf_sdh_soc: vector table: 0x00073000
&amp;lt;debug&amp;gt; nrf_sdh_soc: Error code - sd_softdevice_vector_table_base_set: 0x00000000
&amp;lt;debug&amp;gt; nrf_sdh_soc: Enabling SoftDevice.
&amp;lt;debug&amp;gt; nrf_sdh_soc: SoftDevice enabled.
&amp;lt;debug&amp;gt; nrf_sdh_soc: nrf_dfu_settings_adv_name_is_valid FALSE
&amp;lt;debug&amp;gt; nrf_sdh_soc: Regular adv name
&amp;lt;debug&amp;gt; nrf_sdh_soc: #### Advertising NO BONDING ####
&amp;lt;debug&amp;gt; nrf_sdh_soc: Finished initializing BLE DFU transport
&amp;lt;debug&amp;gt; nrf_sdh_soc: After nrf_dfu_transports_init
&amp;lt;debug&amp;gt; nrf_sdh_ble: Calling nrf_dfu_flash_init(sd_irq_initialized=true)...
&amp;lt;debug&amp;gt; nrf_sdh_ble: Initializing nrf_fstorage_sd backend.
&amp;lt;debug&amp;gt; nrf_sdh_soc: Waiting for events
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note that this output is the same for both the DK and the Ruuvitag but, again, the Ruuvitag doesn&amp;#39;t advertise anything when the DK works perfectly.&lt;/p&gt;
&lt;p&gt;Thanks for your time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/thread/107148?ContentTypeID=1</link><pubDate>Thu, 02 Nov 2017 11:57:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49760129-a382-46a1-b90e-392a7506acc4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Still, can you simply list all the steps you did to update the firmware ? It&amp;#39;s really hard to help you if you just reveal information partly like this. Please erase the chip and follow the steps I described &lt;a href="https://devzone.nordicsemi.com/blogs/1085/getting-started-with-nordics-secure-dfu-bootloader/"&gt;here&lt;/a&gt; and let me know it fails at which step, make sure you update a simple application at the beginning ble_app_hrs for example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/thread/107147?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2017 20:26:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b836278c-d056-45b5-b379-873367d4927e</guid><dc:creator>ishgum</dc:creator><description>&lt;p&gt;Sorry Hung, I should&amp;#39;ve exaplained clearer. I have the Bluetooth working, and the softdevices definitely runs with no issue. The board definitely has the crystal on it too. I can get the example working such that I can see the DFU, connect to it, but when I attempt to upload the firmware to it, it fails. I&amp;#39;ll work on getting that log output for you ASAP.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/thread/107150?ContentTypeID=1</link><pubDate>Wed, 01 Nov 2017 08:55:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ffec7d2-6381-4718-a596-05d0473c7c9c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;After you do eraseall, the old bootloader is erased and there shouldn&amp;#39;t be any problem with the MBR. Everything is erased with that command.&lt;/p&gt;
&lt;p&gt;I want you to post the full log when you get &amp;quot;Error: Single: Invalid Bank Info: Error code - sd_ble_cfg_set: 0x00000000&amp;quot;&lt;/p&gt;
&lt;p&gt;You would need to check if the RuuviTag has the 32kHz crystal on it. On the DK we have the crystal so the softdevice is initialize with the crystal enabled. You need to use 32kHz RC if you don&amp;#39;t have the crystal. I suggest you to test with normal examples first, start with blinky, then ble_app_hrs, then you can start with the bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/thread/107152?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 19:40:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05fa2320-86fa-4b91-9545-2f3a595cc00c</guid><dc:creator>ishgum</dc:creator><description>&lt;p&gt;Hey Hung,
The command I used was: nrfjprog --eraseall -f nrf52
The output I get is:
Erasing user available code and UICR flash areas.
Applying system reset.&lt;/p&gt;
&lt;p&gt;I built the bootloader using gcc and a makefile.
I was using soft devices v4 (I think that answers your question)&lt;/p&gt;
&lt;p&gt;The reason I thought that perhaps the previous bootloader was an issue was that there is the master boot record which keeps track of bootloaders loaded onto the board and I wasn&amp;#39;t sure if this was erased with all the other flash memory.
In addition to this, when I programmed the chip on the DK the bootloader worked, but when I tried to load it onto the chip on the Ruuvi it didn&amp;#39;t. One difference I could think of between them was that the Ruuvi already had a bootloader on it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/thread/107151?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 08:35:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47544cee-108d-46b4-9da0-b6c77d1e3538</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ishgum,&lt;/p&gt;
&lt;p&gt;You mentioned you erased the board. How would the previous bootloader has anything to do here ?&lt;/p&gt;
&lt;p&gt;Could you list exactly the command you used and all the log you get ?
How do you build the bootloader, which S132 version you use. Please list your steps as detailed as possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/thread/107149?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 02:42:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e05d1a47-fe93-412b-a5b6-664e2404f8ae</guid><dc:creator>ishgum</dc:creator><description>&lt;p&gt;Hey Hung,
I am using the nRF52 DK, and programming the board through nrfjprog (over USB).
I erase the board and then upload the bootloader and the relevant softdevices.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Replacing bootloader through nrfjprog - Error: Single: Invalid Bank</title><link>https://devzone.nordicsemi.com/thread/107155?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 11:57:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aa2dc10-0ac9-48fc-a186-8776e039dc47</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ishgum,&lt;/p&gt;
&lt;p&gt;Could you explain a little bit more how you test ? What do you mean by &amp;quot;upload it to Ruuvitag&amp;quot; ?
How did you do that ? With which tool ?&lt;/p&gt;
&lt;p&gt;How do you plan to switch from SD3 to SD4 ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>