<?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>BL653 firmware not fully rebooting on power reset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100944/bl653-firmware-not-fully-rebooting-on-power-reset</link><description>Hello, 
 
 I&amp;#39;m working with BL653 (nRF52833), running on Zephyr RTOS, using nRF Connect SDK NCS 1.9.1 (communicating with BL654 board on nRF52840 dongle). 
 Upon ordinary running of the main firmware, when resetting the power supply to the board the firmware</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Aug 2023 11:50:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100944/bl653-firmware-not-fully-rebooting-on-power-reset" /><item><title>RE: BL653 firmware not fully rebooting on power reset</title><link>https://devzone.nordicsemi.com/thread/439482?ContentTypeID=1</link><pubDate>Wed, 02 Aug 2023 11:50:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7a96aba8-2358-459f-bbd6-7178db7b5264</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry, I missed this case in between the large inflow of cases during the summer vacation time.&lt;/p&gt;
&lt;p&gt;Is there any update on this issue?&lt;/p&gt;
[quote user="Dagan Raviv"]This type of image loading seems to always prevent the issue, so ideally I would like to modify my DFU bootloader configuration so that each POR during runtime will be followed by this image swap type if possible, and not only after choosing &amp;quot;Confirm&amp;quot; from the Device Manager app.[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The swap type you are seeing here is one of the Boot swap types you select during a DFU. By giving &amp;quot;Confirm,&amp;quot; the new firmware is now permanently in the primary slot.&lt;/p&gt;
&lt;p&gt;You could try giving test and confirm from the firmware itself by giving &lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/zephyr/services/device_mgmt/dfu.html#c.boot_write_img_confirmed:~:text=bool%20boot_is_img_confirmed(void)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/dfu.html#c.boot_write_img_confirmed:~:text=bool%20boot_is_img_confirmed(void)" rel="noopener noreferrer" target="_blank"&gt;boot_is_image_confimed&lt;/a&gt;&amp;nbsp;and confirm it by giving &lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/zephyr/services/device_mgmt/dfu.html#c.boot_write_img_confirmed:~:text=int%20boot_write_img_confirmed(void)" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/dfu.html#c.boot_write_img_confirmed:~:text=int%20boot_write_img_confirmed(void)" rel="noopener noreferrer" target="_blank"&gt;boot_write_image&amp;nbsp;_confirmed()&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL653 firmware not fully rebooting on power reset</title><link>https://devzone.nordicsemi.com/thread/435743?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2023 13:01:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f14194ce-e369-4b44-be5f-c0201f652658</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry for the long response time I am taking here. We are thinly staffed due to the summer vacation here in Norway.&lt;/p&gt;
&lt;p&gt;Letting you know that I am still on this case and will get back to you soon.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL653 firmware not fully rebooting on power reset</title><link>https://devzone.nordicsemi.com/thread/433906?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2023 10:49:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b397a933-86e6-4692-b26a-490e0afc27e3</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry, I was bit occupied last days and didn&amp;#39;t get enough time to check this. I will get back to you on Monday next week.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL653 firmware not fully rebooting on power reset</title><link>https://devzone.nordicsemi.com/thread/432896?ContentTypeID=1</link><pubDate>Mon, 26 Jun 2023 09:31:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b77b591a-9c7e-477d-a0d0-fbf325581eac</guid><dc:creator>Dagan Raviv</dc:creator><description>&lt;p&gt;I also add a full booting sequence log output received following an image switch to the DFU bootloader and back to my firmware image (using the Nordic&amp;#39;s Device Manager mobile app) for comparison. Note that in the logs from the Zephyr OS (all logs before &amp;quot;STARTING DEVICE&amp;quot;) the Secondary image values are different, and also the Swap Type. This type of image loading seems to always prevent the issue, so ideally I would like to modify my DFU bootloader configuration so that each POR during runtime will be followed by this image swap type if possible, and not only after choosing &amp;quot;Confirm&amp;quot; from the Device Manager app.&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.7.99-ncs1-1  ***
I: Starting bootloader
I: Primary image: magic=good, swap_type=0x3, copy_done=0x1, image_ok=0x1
I: Secondary image: magic=good, swap_type=0x3, copy_done=0x3, image_ok=0x1
I: Boot source: none
I: Swap type: perm
I: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot
*** Booting Zephyr OS build v2.7.99-ncs1-1  ***
STARTING DEVICE
= Versions Information
  ####################
FPGA date: 23052023
FPGA Version: 1
HSID Version: 15
Powerup data from flash: SN: 42, role: 0, channel: 11
206237 - discovery state reached
Device connected to RF Channel 11
Device connected to RF Channel 11
Device connected to RF Channel 11
Device connected to RF Channel 11&lt;/pre&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Dagan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL653 firmware not fully rebooting on power reset</title><link>https://devzone.nordicsemi.com/thread/432818?ContentTypeID=1</link><pubDate>Sun, 25 Jun 2023 15:28:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecc0556e-e7e3-4fa4-86af-5616658ffa87</guid><dc:creator>Dagan Raviv</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote userid="115767" url="~/f/nordic-q-a/100944/bl653-firmware-not-fully-rebooting-on-power-reset/432687"]Are you coming to this assumption just because of the missing logs or is there another reason for this?[/quote]
&lt;p&gt;Beside the partial initialization log output (which I could live with BTW, had it been the only issue) I also encounter some undefined behavior from SPI read/write commands (specifically from/to a FPGA component) - in &lt;em&gt;some boards&amp;nbsp;&lt;/em&gt;the POR result in garbage output from these functions in one or more following attempts. My guess is some unflushed buffer remaining from an asynchronous power cycle and improper booting sequence which would have cleaned the buffer if done correctly, but I&amp;#39;m not sure.&lt;br /&gt;Attached an example of a &amp;quot;proper&amp;quot; booting sequence logs output, followed by a partial one:&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.7.99-ncs1-1  ***
I: Starting bootloader
I: Primary image: magic=good, swap_type=0x3, copy_done=0x1, image_ok=0x1
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Swap type: none
I: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot
*** Booting Zephyr OS build v2.7.99-ncs1-1  ***
STARTING DEVICE
= Versions Information
  ####################
FPGA date: 23052023
FPGA Version: 1
HSID Version: 15
Powerup data from flash: SN: 42, role: 0, channel: 11
206237 - discovery state reached
Device connected to RF Channel 11
Device connected to RF Channel 11
Device connected to RF Channel 11
Device connected to RF Channel 11&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Powerup data from flash: SN: -1, role: 0, channel: 1
206237 - discovery state reached
Device connected to RF Channel 1
Device connected to RF Channel 1
Device connected to RF Channel 1
Device connected to RF Channel 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Due to invalid SPI output, the data received from flash is parsed to wrong values, resulting in undefined behavior...&lt;/p&gt;
&lt;p&gt;Thanks again for your help,&lt;br /&gt;Dagan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL653 firmware not fully rebooting on power reset</title><link>https://devzone.nordicsemi.com/thread/432687?ContentTypeID=1</link><pubDate>Fri, 23 Jun 2023 12:13:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:191b88d2-56f6-4fd9-a6bd-6232e91ed291</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]I assume this feature is enabled by storing the internal state of the firmware in the non-volatile memory and using it to resume after power reset. This configuration skips some necessary initiation sequence, resulting in unwanted firmware behavior following power reset.[/quote]
&lt;p&gt;AFAIK, the entry point after a reset in handled by the reset_handler.&lt;/p&gt;
&lt;p&gt;I am not sure why this is happening. Are you coming to this assumption just because of the missing logs or is there another reason for this?&lt;/p&gt;
&lt;p&gt;So apart from the log messages is your application working properly after a power on reset? Will be nice if you share both (working and failing ) the logs. Could you also try increasing the log_buffer?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL653 firmware not fully rebooting on power reset</title><link>https://devzone.nordicsemi.com/thread/432084?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 14:52:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5faa054e-3585-4320-ad3f-dd5c7991f5f0</guid><dc:creator>Dagan Raviv</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sure, my main method for debug and tests for the booting sequence is currently logs to console through a UART port, in which I do not see the correct initiation logs I expect to get after reset, but logs from advanced points in the flow. This happens only following a power cycle, after commanding an image switch to the DFU and back (either if I uploaded a different image or simply switched back to the exiting one) the flow I see is the correct initiation sequence through all the necessary steps for my firmware to operate properly.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dagan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BL653 firmware not fully rebooting on power reset</title><link>https://devzone.nordicsemi.com/thread/432034?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 13:21:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cc1b6a0-ba53-4013-ba0c-f8b4303bbeb6</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]when resetting the power supply to the board the firmware resumes running from some advanced point in the application and not performing a full software and hardware reboot from the beginning. I [/quote]
&lt;p&gt;Would be nice if you could brief a little more on this, like how do you test that the Application is booting incorrectly? Also, are you seeing this behavior when you are doing a DFU, or does this happen only when you power cycle the board?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>