<?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>nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128866/nrf5340-sample-application-hangs-in-bootloader-in-thingy91x</link><description>I am using the Thingy91X kit, and I am trying to make a sample &amp;#39;hello_main&amp;quot; to work on the nrf5340. My project configuration is as follows: 
 Sample: zephyr/samples/hello_world 
 SDK: 3.4.0 
 Toolchain: nRF Connect SDK Toolchain v3.4.0 
 Board Target</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Aug 2026 11:14:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128866/nrf5340-sample-application-hangs-in-bootloader-in-thingy91x" /><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569918?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2026 11:14:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de140eb5-738f-4ab5-a4b7-a0e60ae91e81</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I understand. If it helps, when you build for your custom HW, you probably will not be building with the Thingy91 board files, but create your own board files. So you don&amp;#39;t need to mess around with disabling the bootloader on your custom board.&lt;/p&gt;
&lt;p&gt;To enable UART logging, if your application uses LOG_INF() to log stuff, then it is simply a matter of adding/changing some Kconfigs (prj.conf contents).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you look at the sample: NCS\nrf\samples\bluetooth\&lt;a href="https://nrfconnectdocs.nordicsemi.com/ncs/latest/nrf/samples/bluetooth/peripheral_uart/README.html"&gt;peripheral_uart&lt;/a&gt;, this is an example on how to log via UART.&lt;/p&gt;
&lt;p&gt;You need this set of Kconfigs:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Config logger
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_PRINTK=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note: If you are currently logging using printk() or printf(), then you need to change it to LOG_INF() to be able to see it via RTT. In this case, you also need to add this close to the top of your main.c:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr/logging/log.h&amp;gt;

#define LOG_MODULE_NAME peripheral_uart
LOG_MODULE_REGISTER(LOG_MODULE_NAME);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And make sure that you regularly sleep in your main() loop, like it is done in the peripheral_uart sample (most samples, really)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main(void)
{
    ...
    
	for (;;) {
		dk_set_led(RUN_STATUS_LED, (++blink_status) % 2);
		k_sleep(K_MSEC(RUN_LED_BLINK_INTERVAL));
	}
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then, you can use something like J-Link RTT Viewer to monitor the RTT logs. Make sure that you connect to the target after the application has started. And if you reset/reflash the device, you need to reattach the RTT viewer (by e.g. clicking F2).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569914?ContentTypeID=1</link><pubDate>Wed, 05 Aug 2026 09:38:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79bf5c90-8c28-4e8d-bd6b-6ce9e1599741</guid><dc:creator>Nicholas Papachristos</dc:creator><description>&lt;p&gt;Our product has both the 5340 and 9151 on board, and both have similar roles. The 5340 will do all the BLE stuff, and the UART0 is the comms channel between the 9151 and 5340 - just like in the Thingy. We can not use the application on the Thingy91X 5340 as is, so I am writing our own. I need some kind of UART comms for debugging the application, which finally be used to connect to the 9151, near completion of the development. I do not know what I am doing wrong, but I have not succeeded to set up the RTT link working, on VS-Code, or on the nRF-Connect for Desktop Serial Terminal. Can you give me detailed instructions how to set up the RTT? Is it a question of just the prg.conf contents?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569875?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2026 13:23:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:958610b1-0a24-4d48-997a-d71cc9c7bd77</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;This is where things start to get tricky. The Thingy91x doesn&amp;#39;t have a debugger (which is the component on the DK that usually translates from UART to USB serial communication). So directly it is not possible to do this.&lt;/p&gt;
&lt;p&gt;If you just need logging, I suggest that you try RTT logging instead. This only needs a debugger connected to the nRF5340. You see, on the DK, the on board debugger is connected via SWD in addition to some extra UART lines that it will interpret. This is why UART works out of the box on the DKs. This is not the case for the Thingys (this applies to all of them, Thingy52, Thingy53, Thingy91x).&lt;/p&gt;
&lt;p&gt;There is an app called&amp;nbsp;Connectivity bridge application that you can run on the nRF5340, which will read the UART pins from the nRF91, and translate it using the nRF5340&amp;#39;s peripheral USB, to simulate what the debugger usually does. But this means that your nRF5340 will need to be running this application, and not the one that you are currently working on.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternatively, you can look into it. It is found in&amp;nbsp;v3.4.0\nrf\applications\&lt;a href="https://nrfconnectdocs.nordicsemi.com/ncs/latest/nrf/applications/connectivity_bridge/README.html"&gt;connectivity_bridge&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have not disected this application, but perhaps you can use parts of it to write directly to the USB. But please note that whenever you halt the application (a breakpoint, for example), then the USB will stop replying and it will be disconnected. It also means that if your application crashes, you will not get an error log (like you would with UART).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is one of the pain points when working with the Thingy. Perhaps you can tell me whether you actually need UART output, or if you just want logging. In that case, I wouldn&amp;#39;t really recommend the USB based logging, but rather RTT logging, as I mentioned earlier in this reply. This works a lot better e.g. if your application faults.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569868?ContentTypeID=1</link><pubDate>Tue, 04 Aug 2026 12:48:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:359865dd-b146-4f4e-8c00-4b9e39b1ae5e</guid><dc:creator>Nicholas Papachristos</dc:creator><description>&lt;p&gt;I created a basic application, that reaches main(). Now I need to to make it output uart data through to nRF Connect Serial Terminal. What configuration/code do I need to add to the project?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569814?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2026 13:49:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b092235b-049c-4159-bb40-31d940981682</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;The bootloader on the thingy is indeed very sticky. It is not because of the HW itself, but because the board files for the Thingy91x is quite persistent that it needs a bootloader.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try adding these to the sysbuild.conf of your project:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;SB_CONFIG_BOOTLOADER_NONE=y
SB_CONFIG_SECURE_BOOT_APPCORE=n
SB_CONFIG_SECURE_BOOT_NETCORE=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you later decide to try to build an application for the nRF9151 on the Thingy91x, you should add this to your sysbuild.conf:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;SB_CONFIG_THINGY91X_NO_PREDEFINED_LAYOUT=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t test it now, but I did find these when I tried to use the Thingy91x for some BLE stuff a while ago.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569795?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2026 11:45:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7cf7862-b156-4368-9d72-fad7ad93b33f</guid><dc:creator>Nicholas Papachristos</dc:creator><description>&lt;p&gt;&lt;span&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;Could&amp;nbsp;you provide the recommended method for building a thingy91x/nrf5340/cpuapp debug image without MCUboot/TF-M involvement?&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569792?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2026 11:23:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f942e2d-da54-4862-863d-fd8e4d71c613</guid><dc:creator>Nicholas Papachristos</dc:creator><description>&lt;p&gt;By the way, I have a SEGGER J-link, and I can see the nrf5340 on NRF Connect for Desktop V5.3.2, Programmer v4.8.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569791?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2026 11:16:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85ff19a2-4f33-4fc7-916e-ad0039e5ac11</guid><dc:creator>Nicholas Papachristos</dc:creator><description>&lt;p&gt;I am using the Thingy91 as a development kit. In a few weeks, we shall have our own board with a 9151 and 5340 on it. The demo kit has a nice application on it, and we want to create an application that uses most of the features in Thingy91X. At this moment, I have no choice. I do not understand why developing on the demo kit should be impossible. It seem to be stuck on a trivial issue - mainly due to lack of precise information how to overcome this particular issue. If the the only way would be to sign the image so that the bootloader could run it, so be it - this problem should be solvable too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569790?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2026 10:53:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7f5bf19-9075-46b9-826b-2b252f587602</guid><dc:creator>Nicholas Papachristos</dc:creator><description>&lt;p&gt;For the second option, I tried&amp;nbsp;CONFIG_BOOTLOADER_MCUBOOT=n in zephyr/.config, but it did not make a difference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340 Sample Application hangs in Bootloader in Thingy91X</title><link>https://devzone.nordicsemi.com/thread/569789?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2026 10:52:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b40b77af-1d19-4ad1-8cc9-f6bdd93b35c9</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Working directly on the nRF5340 on the Thingy91x is not trivial. If you intend to write an application for the nRF5340 (or any other nordic BLE chip) I strongly suggest that you get hold of an nRF5340DK, or even better, the nRF54L15 DK. Is there any particular reason why you are using the nRF5340 specifically? And is there any particular reason why you are using the Thingy91X for developing BLE applications?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And if you have a good reason, can you let me know what exact HW you have access to? Do you have an external debugger? What device are we seeing the log from now? Is it the nRF5340 on the Thingy, or the nRF91 on the thingy?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]&lt;strong&gt;Let the bootloader run&lt;/strong&gt;&amp;nbsp;and then attach the debugger after the app has started (attach mode instead of reset-and-halt), or[/quote]
&lt;p&gt;If you do have a debugger, you can do this. Click the 3 dots on the right hand side of &amp;quot;debug&amp;quot; in VS code, and select &amp;quot;Attach Debugger to Target&amp;quot;. Although, I am not convinced this will help.&lt;/p&gt;
[quote user=""]&lt;strong&gt;Disable MCUboot&lt;/strong&gt;&amp;nbsp;for debug builds if your board configuration allows it.[/quote]
&lt;p&gt;probably the easiest, but it is not straight forward on the Thingy either. Again, it depends on what kind of setup you have. External debugger?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>