<?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>Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92774/hang-with-nrf5-sdk-17-1-0-bootloader-and-nrf-connect-sdk-2-1-0-application</link><description>I have an existing product that is using the nRF5 SDK 17.1.0 Bootloader. I have updated the application to use nRF Connect SDK 2.1.0. The new application also has an implementation of the buttonless DFU service, so that the nRF Connect app on iOS can</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Oct 2022 12:19:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92774/hang-with-nrf5-sdk-17-1-0-bootloader-and-nrf-connect-sdk-2-1-0-application" /><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391419?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2022 12:19:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de6f89af-3103-42fb-a17e-a76b10a877b3</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;Ah, so the switch to LDO when attaching the debugger explains why the firmware works after the attach.&lt;/p&gt;
&lt;p&gt;BTW: The peripheral_lbs build does fail with my custom dts. &amp;nbsp;I built it for the nRF52840-DK and ran that on my custom board as it is somewhat compatible, at least for that simple example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391364?ContentTypeID=1</link><pubDate>Wed, 19 Oct 2022 09:02:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:027b6910-a0bc-478f-a9f0-bf2fe5eb7c9c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thank you for the summary. I&amp;#39;m glad to hear that you found the problem! &lt;/p&gt;
[quote userid="66147" url="~/f/nordic-q-a/92774/hang-with-nrf5-sdk-17-1-0-bootloader-and-nrf-connect-sdk-2-1-0-application/391296"]Thank you for all the help! &amp;nbsp;Obviously I should have seen this when setting up the custom dts. &amp;nbsp;What I still don&amp;#39;t understand is how that manifested in all these other odd things happening, working from the debugger, etc...[/quote]
&lt;p&gt;It must be because of the noise generated by the DCDC. Although, I&amp;#39;m not able to explain exactly how this would interfere with the clock startup. This does however explain why you didn&amp;#39;t experience the problem when the chip was in &lt;span class="item"&gt;&lt;a title="Debug Interface mode" href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/dif.html?cp=4_0_0_3_7_3#debuginterfacemode"&gt;Debug Interface mode&lt;/a&gt;&lt;/span&gt; as this mode forces the chip to switch to the LDO regulator.&lt;/p&gt;
[quote userid="66147" url="~/f/nordic-q-a/92774/hang-with-nrf5-sdk-17-1-0-bootloader-and-nrf-connect-sdk-2-1-0-application/391296"]I don&amp;#39;t have a storage partition defined in my custom board dts that my app uses.[/quote]
&lt;p&gt;The build should fail at compile time if there is no storage partition defined. This is also what I observe here if I remove the storage_partition node before building the LBS sample.&lt;/p&gt;
&lt;p&gt;I would suggest that you check the generated zephyr.dts file in &amp;lt;build directory&amp;gt;/zephyr/ before adding the overlay to see if the storage partition is indeed missing. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391296?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 20:00:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15a3172d-5068-4593-9eb4-f45477bf36bd</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;Sorry, I missed that. &amp;nbsp;I see, the change is in the&amp;nbsp;peripheral_lbs/nrf52840dk_nrf52840.overlay. &amp;nbsp;Using the nRF52840-DK board I can now&amp;nbsp;DFU with that change and the app starts up. &amp;nbsp;And if I remove the config changes to not use the DC/DC and to use the RC the app also starts up.&lt;/p&gt;
&lt;p&gt;I then tried the same boot loader and &lt;span&gt;peripheral_lbs&lt;/span&gt; dfu&amp;nbsp;on my custom board without the RC changes. &amp;nbsp;And it does hang. &amp;nbsp;Until I attach debugger and hit continue.&lt;/p&gt;
&lt;p&gt;So the behavior on the&amp;nbsp;&lt;span&gt;nRF52840-DK and our custom board is different.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I then checked the schematics and sure enough the inductors are not in this design for the DC/DC converter. &amp;nbsp;Adding&amp;nbsp;&lt;span&gt;CONFIG_BOARD_ENABLE_DCDC=n to my app fixed the issue. &amp;nbsp;The app starts up properly now.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for all the help! &amp;nbsp;Obviously I should have seen this when setting up the custom dts. &amp;nbsp;What I still don&amp;#39;t understand is how that manifested in all these other odd things happening, working from the debugger, etc...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;BTW:&amp;nbsp;I don&amp;#39;t have a storage partition defined in my custom board dts that my app uses.&lt;/p&gt;
&lt;p&gt;CONFIG_BT_SETTINGS=y&lt;br /&gt;CONFIG_SETTINGS_RUNTIME=y&lt;br /&gt;CONFIG_SETTINGS=y&lt;br /&gt;CONFIG_SETTINGS_NONE=y&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391294?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 19:46:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f24dd64e-616f-4c77-9f2e-435d3c6ce94c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, the DK starts advertiding when using my version. But&amp;nbsp;it enters a reset loop if I DFU your app.&amp;nbsp;Writing the settings page is a quicker&amp;nbsp;way to test this. And it&amp;rsquo;s the only way for me if I&amp;rsquo;m going to run my app with your bootloader.&lt;/p&gt;
&lt;p&gt;Did you move the settings partition in your lbs project. If not, it will go in a boot loop like I mentioned in my first reply&amp;nbsp;here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391293?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 19:26:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aab84116-f703-40b9-bdbb-e2e4feed038a</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;By &amp;quot;works on the DK&amp;quot; do you mean that peripheral_lbs starts up without hanging and you can connect to it?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not programming in any settings.hex (or ncs_app.hex). &amp;nbsp;Just programming in the boot loader, then the soft device, then the boot loader hex. &amp;nbsp;Then using nrf connect app to run the DFU process. &amp;nbsp;At the end of that is says &amp;quot;Your DFU update was completed successfully&amp;quot;. &amp;nbsp;At that point I do not see peripheral_lbs advertisements.&lt;/p&gt;
&lt;p&gt;When I attach the vscode debugger, the call stack is the boot loader&amp;nbsp;crc32_compute. &amp;nbsp;When I continue from there I still don&amp;#39;t see advertisements. &amp;nbsp;Break in the debugger again and it is in the application in&amp;nbsp;CC_PalWaitInterruptRND. &amp;nbsp;Then tried break and continue a few more times and it is usually in one of those, but sometimes in other parts of the startup code. &amp;nbsp;Sounds like a reset loop...&lt;/p&gt;
&lt;p&gt;So seeing three different things:&lt;/p&gt;
&lt;p&gt;1) My app. &amp;nbsp;Doesn&amp;#39;t startup properly. &amp;nbsp;Connect debugger and continue and it then starts up fine.&lt;/p&gt;
&lt;p&gt;2) The hello_world app. &amp;nbsp;With the clock crystal in the startup it hangs waiting for the crystal startup. &amp;nbsp;With the synthetic option, it starts fine.&lt;/p&gt;
&lt;p&gt;3) The peripheral_lbs app. &amp;nbsp;Connect debugger and continue and it appears to be stuck in a reset loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391287?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 18:19:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41983d09-658c-46a1-9a3f-62a6e478cc8d</guid><dc:creator>Vidar Berg</dc:creator><description>[quote userid="66147" url="~/f/nordic-q-a/92774/hang-with-nrf5-sdk-17-1-0-bootloader-and-nrf-connect-sdk-2-1-0-application/391251"]I built peripheral_lbs with these additions to the prj.conf and reproduced the hang:[/quote]
&lt;p&gt;Can you confirm that it hangs at the same location inside the cryptocell runtime library, and not in the fault handler because the settings partition overlap with the bootloader?&lt;/p&gt;
[quote userid="66147" url="~/f/nordic-q-a/92774/hang-with-nrf5-sdk-17-1-0-bootloader-and-nrf-connect-sdk-2-1-0-application/391254"]&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/lbs_2D00_1.0.0.zip"&gt;lbs-1.0.0.zip&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bootloader_2D00_neo.hex"&gt;bootloader-neo.hex&lt;/a&gt;[/quote]
&lt;p&gt;&lt;span style="text-decoration:line-through;"&gt;I can&amp;#39;t get this bootloader to exit DFU mode. I guess it may be because of your NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN setting in sdk_config, or were you able to run the same hex on your DK?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Turns out I programmed the wrong settings page. Programming your bootloader with my ncs_app.hex works on the DK:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="bat"&gt;nrfutil settings generate --family NRF52840 --application ncs_app.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex

nrfjprog -e
nrfjprog --program bootloader-neo.hex --verify
nrfjprog --program s140_nrf52_7.2.0_softdevice.hex --verify
nrfjprog --program ncs_app.hex --verify
nrfjprog --program settings.hex --verify
nrfjprog -r
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391262?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 15:10:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4bc286d-70ae-415c-8fef-2f6c6343ad2c</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;I ran the above binaries on an nRF52840-DK and am seeing the hang here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391259?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 15:00:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f019eedd-a08b-4ffd-9225-0c75fcd79bfc</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/35464.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../35464.sdk_5F00_config.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is the config for the SDK boot loader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391258?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:59:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cc09bd7-1807-48bf-a0d6-0b1c92cc2829</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks, I will try and see if I can reproduce it with your bootloader (hoping it will run on a DK). &lt;/p&gt;
&lt;p&gt;nrfutil pkg display lbs-1.0.0.zip gives this:&lt;/p&gt;
&lt;p&gt;DFU Package: &amp;lt;lbs-1.0.0.zip&amp;gt;:&lt;br /&gt;|&lt;br /&gt;|- Image count: 1&lt;br /&gt;|&lt;br /&gt;|- Image #0:&lt;br /&gt;&amp;nbsp;&amp;nbsp; |- Type: application&lt;br /&gt;&amp;nbsp;&amp;nbsp; |- Image file: zephyr.bin&lt;br /&gt;&amp;nbsp;&amp;nbsp; |- Init packet file: zephyr.dat&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- op_code: INIT&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- signature_type: ECDSA_P256_SHA256&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- signature (little-endian): b&amp;#39;f10f7aca6dc0353607a1fce8bbc46d53ee7d7092c07b86eeb87f0f7aa37c72a9c6514b3b3c6c58c33d968d8e0e1435530c64c83e7496fb51a5efc5c380ebc4a0&amp;#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- fw_version: 0x00000003 (3)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- hw_version 0x00000034 (52)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- sd_req: 0x100&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- type: APPLICATION&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- sd_size: 0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- bl_size: 0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- app_size: 358152&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- hash_type: SHA256&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- hash (little-endian): b&amp;#39;83d92fe619627e257d91ad857c124c5b671df6f6d450890795176f82a244daaf&amp;#39;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- boot_validation_type: ['VALIDATE_GENERATED_CRC']&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- boot_validation_signature (little-endian): [b'']&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |- is_debug: False&lt;/p&gt;
&lt;p&gt;So, the bootloader is not using the cc310 for boot validation, at least.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391257?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:58:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:504c6218-e64c-49f1-9111-66b6054b89a1</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;Program boot loader:&lt;/p&gt;
&lt;p&gt;nrfjprog -f NRF52 --recover&lt;/p&gt;
&lt;p&gt;nrfjprog -f NRF52 --program&lt;/p&gt;
&lt;p&gt;sdk_nordic/components/softdevice/s140/hex/s140_nrf52_7.2.0_softdevice.hex &amp;ndash;-chiperase&lt;/p&gt;
&lt;p&gt;nrfjprog -f NRF52 --program bin/bootloader-neo/bootloader-neo.hex&lt;/p&gt;
&lt;p&gt;nrfjprog -f NRF52 --reset&lt;/p&gt;
&lt;p&gt;Then use nrf connect on iOS to DFU the zip.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391254?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:56:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24f98244-7301-4ccc-b487-86c9efc58225</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/lbs_2D00_1.0.0.zip"&gt;devzone.nordicsemi.com/.../lbs_2D00_1.0.0.zip&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bootloader_2D00_neo.hex"&gt;devzone.nordicsemi.com/.../bootloader_2D00_neo.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;sdk_nordic/components/softdevice/s140/hex/s140_nrf52_7.2.0_softdevice.hex&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391253?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:55:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1c8c7d0-f250-43a6-a10a-5b3a259aff11</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;In the &lt;span&gt;CC_PalWaitInterruptRND&lt;/span&gt; loop? Can you check what the boot validation type is set to in your bootloader? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391251?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:53:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8290e64c-c074-4c43-af5a-d78406a6f81d</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;I built peripheral_lbs with these additions to the prj.conf and reproduced the hang:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_NO_OPTIMIZATIONS&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_FLASH_LOAD_OFFSET&lt;/span&gt;&lt;span&gt;=0x27000&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391247?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:41:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c52edbe-cae2-4510-9fae-92bd7bb48547</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I wish I could reproduce this here. Could you try the peripheral_lbs app I included in my first reply here to see if it results in the same problem? I included a pre-built hex for it (&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ncs_5F00_app.hex"&gt;ncs_app.hex). &lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391246?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:37:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a641bb2d-396c-48b0-9480-e8d302882061</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;It is in the application address range.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391243?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:35:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f741d57-c891-4241-92bb-14efaae9911f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Could you check the program counter value to see if it is in the application&amp;#39;s or bootloader&amp;#39;s address range? The bt stack in NCS will initialize the cc310 RNG on startup, but I don&amp;#39;t remember if it does it before main() or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391241?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:32:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a95e75b-fcb1-4108-a5ff-15c87bd9a92b</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;This is happening before app main is called.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391233?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:24:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b73bbce3-8753-48d7-a16e-155bb7ff0fe5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I can&amp;#39;t think of any obvious reasons for this. The peripherals used by the bootloader should be reset before the bootloader starts the application. Do you use the cc310 for boot validation or just do a CRC check (&lt;span class="item"&gt;&lt;a title="Boot validation modes" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_secure_boot.html?cp=8_1_3_5_0_8_1_1#secure_boot_validation_modes"&gt;Boot validation modes&lt;/a&gt;&lt;/span&gt;)?&lt;/p&gt;
[quote userid="66147" url="~/f/nordic-q-a/92774/hang-with-nrf5-sdk-17-1-0-bootloader-and-nrf-connect-sdk-2-1-0-application/391229"]&lt;div&gt;&lt;span&gt;So I put that config into my application and it gets past that point, but now hangs on:&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span&gt;CC_PalWaitInterruptRND&lt;/span&gt;&lt;/p&gt;[/quote]
&lt;p&gt;Is this in the application code? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/391229?ContentTypeID=1</link><pubDate>Tue, 18 Oct 2022 14:16:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46aefb1d-4375-4340-990d-effb9e99325c</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;&lt;span&gt;I added this to the hello_world config and now it starts up without the hang above:&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;So I put that config into my application and it gets past that point, but now hangs on:&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span&gt;CC_PalWaitInterruptRND&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It looks like in both cases there is a wait for interrupt and the CPU is never woken up. &amp;nbsp;I wonder if maybe these things are already on in the boot loader. &amp;nbsp;Then when the boot loader starts the app, the app startup sequence assumes they are not on and waits for an interrupt that will never happen. &amp;nbsp;Then attaching the debugger wakes the MCU and the code continues.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/390792?ContentTypeID=1</link><pubDate>Fri, 14 Oct 2022 11:05:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:012cecbe-863f-4320-b7a8-cf83b1955b1c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It is starting to look like a problem with the 32KHz clock now (the OS scheduler needs this clock to run). I didn&amp;#39;t think this could be the issue earlier considering how your application ran fine when programmed without the bootloader.&lt;/p&gt;
&lt;p&gt;Do you have the 32K crystal mounted on your board and have you tried to use these configurations from the &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7144.peripheral_5F00_lbs.zip"&gt;peripheral_lbs.zip&lt;/a&gt; example I uploaded:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;# Config settings to allow the FW to run on boards without the &lt;br /&gt;# optional 32KHz crystal or DCDC indctors mounted &lt;br /&gt;CONFIG_BOARD_ENABLE_DCDC=n&lt;br /&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y&lt;br /&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y&lt;/p&gt;
&lt;p&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/390698?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2022 16:19:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a1abee7-705f-42b5-9af2-41290610cff3</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;I am trying to use a simpler app to see if it will start properly, so I am now using the sample hello_world. &amp;nbsp;It is showing the same issue. &amp;nbsp;However, this time when I attach in the debugger I end up in the same place each time - inside&amp;nbsp;lfclk_spinwait loop:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;while&lt;/span&gt;&lt;span&gt; (!(&lt;/span&gt;&lt;span&gt;nrfx_clock_is_running&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;d&lt;/span&gt;&lt;span&gt;, (&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt; *)&amp;amp;&lt;/span&gt;&lt;span&gt;type&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;... &lt;span&gt;k_cpu_atomic_idle&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;key&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;If I hit continue in the debugger then hello_world starts up. &amp;nbsp;So maybe some issue starting up the low frequency clock or getting the interrupt that it has started?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;This issue does not happen when an SDK 17 app is DFU&amp;#39;ed. &amp;nbsp;So maybe something different in the Zephyr startup sequence with respect to the low frequency clock startup?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/390695?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2022 15:35:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a63afd7f-b055-466d-b017-bf306f833869</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;I change some other config options and have RTT logging enabled. &amp;nbsp;I added a print to the top of my main. &amp;nbsp;When I start the app from the debugger (no boot loader) I see a boot message from zephyr and the message from my main:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;*** Booting Zephyr OS build v3.1.99-ncs1 ***&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;starting vulcan&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;However, if I have RTT logging connected then the code works fine (no hang or reset loop). &amp;nbsp;Same as when debugger is attached.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So I created a&amp;nbsp;logging backend that just store the log text in RAM. &amp;nbsp;Ran from debugger and the log messages are showing up in RAM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now, when I run the boot loader and then DFU my app and have hit the point where things look locked up or in a reset loop and then attach the debugger, I don&amp;#39;t see any&amp;nbsp;logging messages. &amp;nbsp;So seems the issue happens before zephyr prints the boot message.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/390524?ContentTypeID=1</link><pubDate>Wed, 12 Oct 2022 21:49:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:055bde7e-d5bc-47f9-a9cf-274d01949062</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;I added that config to the app, erased the part, programmed the boot loader, attached RTT, then did a DFU. &amp;nbsp;I don&amp;#39;t see any log output. &amp;nbsp;And the app started normally (did not hang). &amp;nbsp;I assume because the debug probe is connected for RTT.&lt;/p&gt;
&lt;p&gt;How do you turn of ACL protection? &amp;nbsp;Is that a config option in the SDK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/390515?ContentTypeID=1</link><pubDate>Wed, 12 Oct 2022 18:11:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:875558ed-0420-40c7-a2ea-cfa544705f25</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, it&amp;#39;s probably reaching the error handler which will reset the device (soft reset). I suggest you add the following kconfig settings to your prj.conf file:&lt;/p&gt;
&lt;p&gt;CONFIG_LOG=y&lt;br /&gt;CONFIG_LOG_BACKEND_UART=n&lt;br /&gt;CONFIG_USE_SEGGER_RTT=y&lt;br /&gt;CONFIG_RESET_ON_FATAL_ERROR=n&lt;br /&gt;CONFIG_THREAD_NAME=y&lt;/p&gt;
&lt;p&gt;Then when the app hangs, open Segger RTTViewer and see if you can get a crashlog from the error handler.&lt;/p&gt;
&lt;p&gt;The reason I recommend disabling the ACL protection earlier is that it is one of the few configurations that will carry over from the bootloader to the application. But only as a test to help narrow down the problem. I don&amp;#39;t recommend leaving ACL off in production.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hang with nRF5 SDK 17.1.0 Bootloader and nRF Connect SDK 2.1.0 application</title><link>https://devzone.nordicsemi.com/thread/390506?ContentTypeID=1</link><pubDate>Wed, 12 Oct 2022 15:45:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d236d0c9-d401-4db6-b7b6-d05b53560881</guid><dc:creator>denis</dc:creator><description>&lt;p&gt;Yes, this is the nRF52840 chip.&lt;/p&gt;
&lt;p&gt;It does look like some kind of reset loop. &amp;nbsp;And I&amp;#39;m not seeing the lockup bit set now. &amp;nbsp;Just the soft reset bit.&lt;/p&gt;
&lt;p&gt;Problem is still that if I attach the debugger then things work normally, so unsure how to catch the problem.&lt;/p&gt;
&lt;p&gt;Possibly something in the ncs sequence is doing a soft reset (except when running from the debugger).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>