<?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>Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114182/use-of-the-usb-cdc-acm-interface-together-with-the-bt-mesh-stack-on-the-nrf52840-dongle</link><description>Dear Nordic developer community, 
 I am in the process of developing a communication with the PC via the USB CDC ACM interface of the nRF52840 chip. The information received from the PC will first be evaluated via this serial interface and then distributed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Sep 2024 11:41:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114182/use-of-the-usb-cdc-acm-interface-together-with-the-bt-mesh-stack-on-the-nrf52840-dongle" /><item><title>RE: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/501529?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2024 11:41:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e797aec3-bb23-4e60-8b39-620fb1609499</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok, I understand. I mixed them up.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please upload the application that replicates this precisely without any modifications? As mentioned, the previous application was waiting for some event that didn&amp;#39;t occur, and when I bypassed it, it seemed to work in my case.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So fi you can upload an application that will fail when programmed using the bootloader, then I can try to replicate it again.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/501247?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2024 23:15:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de1bff86-c2fe-4301-8c48-edc97dad2312</guid><dc:creator>uli_hn</dc:creator><description>&lt;p&gt;Hello dear Edvin,&lt;/p&gt;
&lt;p&gt;I would like to thank you once again!!! for your explanations on the use of RTT and the correct creation of conf files. I am now in perfect hands :-)&lt;/p&gt;
&lt;p&gt;Only with my last statement you misunderstood me:&lt;/p&gt;
[quote userid="135837" url="~/f/nordic-q-a/114182/use-of-the-usb-cdc-acm-interface-together-with-the-bt-mesh-stack-on-the-nrf52840-dongle/500654"]The error I have found is that flashing the dongle via the &lt;em&gt;nRF52 DK&lt;/em&gt; works, but not via the bootloader. And this has nothing to do with my project. My project works with the dongle as long as it is flashed via the &lt;em&gt;nRF52 DK&lt;/em&gt;.&lt;br /&gt;And that shouldn&amp;#39;t really be the case, should it?[/quote]
&lt;p&gt;I repeat again:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First build (my workaround):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I build my project ( &lt;em&gt;without nRF5 bootloader configuration&lt;/em&gt; )&lt;/li&gt;
&lt;li&gt;I flash this error-free built project with the nRF52 DK (and the correctly set voltage) via SWD to the dongle&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Result&lt;/strong&gt;: everything works !!!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Second build (as specified/intended by nordic)&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I build my project ( &lt;em&gt;this time with nRF5 bootloader configuration - the default setting&lt;/em&gt; )&lt;/li&gt;
&lt;li&gt;I take a &lt;strong&gt;brand new dongle&lt;/strong&gt; out of the packaging, plug it in and put it into bootloader mode&lt;/li&gt;
&lt;li&gt;I flash this error-free built project via the generated hex file with the programmer onto the dongle&lt;/li&gt;
&lt;li&gt;&lt;strong&gt; Result&lt;/strong&gt;: the project does &lt;strong&gt;not&lt;/strong&gt; work !!! The dongle keeps restarting itself.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When I read your explanation, you think that my workaround didn&amp;#39;t work. But that is not correct. It&amp;#39;s the opposite. The way nordic intended is the one that doesn&amp;#39;t work!&lt;/p&gt;
&lt;p&gt;I wanted to draw your attention to this error.&lt;br /&gt;best wishes &lt;br /&gt;Uli&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/500912?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2024 09:23:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec7a0411-b2e7-4390-aa3f-7a90cb336243</guid><dc:creator>Edvin</dc:creator><description>[quote user="uli_hn"]... Do I have to switch anything off for this or are there dependencies that could then no longer work? Or do I just put this in and connect the RTT to the terminal under the &amp;quot;connected devices&amp;quot; in VS Code and it works?[/quote]
&lt;p&gt;It should be plug and play. I prefer to use a standalone RTT terminal, such as J-Link RTT Viewer, which is usually part of the JLink bundle. You probably have it installed already.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The RTT log has no dependencies, other than that it takes a small amount of processing power, and some memory (RAM) for the log. Then it is the debugger that is being used to read the log from the internal memory, so no GPIOs or peripherals are needed for this. Please note, however, that you need to reconnect the RTT viewer every time you program the device, because building the application again can cause the location of this buffer to move, so you need to tell the RTT terminal that this has happened.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="uli_hn"]One more thing: I have applied your explanations. Renaming the &lt;em&gt;.overlay&lt;/em&gt; files leads to the desired success. They are automatically found and analysed as &lt;em&gt;&amp;quot;Found devicetree overlay&amp;quot;&lt;/em&gt; during compilation. However, this does not work for the &lt;em&gt;.conf&lt;/em&gt; files. I have to enter them manually in the &lt;em&gt;&amp;quot;KConfig fragments&amp;quot;&lt;/em&gt;, otherwise the compilation process is cancelled due to missing dependencies.[/quote]
&lt;p&gt;Sorry. What I said wasn&amp;#39;t entirely correct. You can put the nrf52840dongle_nrf52840.conf in a folder named &amp;quot;boards&amp;quot;, then it should be picked up, as long as you use the default prj.conf file. You can look at how this is done in the ncs\nrf\samples\peripheral_uart\ sample, where it has the boards folder containing the thingy prj.conf files. The folder structure needs to be correct in order for this to work, so if you just do it like it is done in this sample, it should be picked up.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To make things worse, there are also several ways to acheive the same, so there is no &amp;quot;one rule to rule them all&amp;quot;, unfortunately. You can read a bit about it &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.4.3/page/zephyr/develop/application/index.html#application_cmakeliststxt"&gt;here&lt;/a&gt;&amp;nbsp;and &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.4.3/page/nrf/getting_started/modifying.html#configuring_build_types"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;But the rule of thumb is that you should check your build log when you want to add new .conf or .overlay files. Then you will see what files that are included in your build.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="uli_hn"]The error I have found is that flashing the dongle via the &lt;em&gt;nRF52 DK&lt;/em&gt; works, but not via the bootloader. And this has nothing to do with my project. My project works with the dongle as long as it is flashed via the &lt;em&gt;nRF52 DK&lt;/em&gt;.[/quote]
&lt;p&gt;So you pointed to the nRF52840 dongle programming guide earlier. From there you can read that if you erase the bootloader, there are some things that you need to make sure in order for it to work properly. When building for the nRF52840 dongle in NCS then it will assume that the bootloader is still present, because this is the intended way to use the dongle. If the bootloader is not present, then there are a couple of things that you need to make sure, and it is probably best to do this by using a custom board, and copy a lot of it from the board files for the dongle.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The main thing is that there is no longer a bootloader, so you would need to move the start address of the application from 0x1000 to 0x0000 (because there is no longer an MBR programmed).&lt;/p&gt;
&lt;p&gt;Then you would need to read the section: &amp;quot;Using an external debugger&amp;quot; in the &lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial"&gt;nRF52840 Dongle programming tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The thing is that the bootloader used to set the correct VREGOUT for the dongle. If this is erased, I am not sure whether or not you will be able to re-program it at all using a DK, or if you need a proper external programmer. You can of course give it a go, but the DKs are not properly tested for programming devices running at a different voltage than itself. So if you re-program the bootloader (you will find it in the linked guide), and then use the bootloader to load your application, and the debugger to debug, you should be fine.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you want to properly skip the bootloader, make sure that you have all your start addresses set correctly, and that you do the REGOUT thing from the guide at the very start of your application. I am not completely sure, but it may work if you do it at the top of main. If not, you would need something like this in your main.c file. This will be called earlier in the bootup process, before the main() function is reached.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static int set_regulator(void)
{
  if ((NRF_UICR-&amp;gt;REGOUT0 &amp;amp; UICR_REGOUT0_VOUT_Msk) ==
    (UICR_REGOUT0_VOUT_DEFAULT &amp;lt;&amp;lt; UICR_REGOUT0_VOUT_Pos))
{
    NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Wen;
    while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}

    NRF_UICR-&amp;gt;REGOUT0 = (NRF_UICR-&amp;gt;REGOUT0 &amp;amp; ~((uint32_t)UICR_REGOUT0_VOUT_Msk)) |
                        (UICR_REGOUT0_VOUT_3V0 &amp;lt;&amp;lt; UICR_REGOUT0_VOUT_Pos);

    NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Ren;
    while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}

    // System reset is needed to update UICR registers.
    NVIC_SystemReset();
}
  return 0;
}

SYS_INIT(set_regulator, POST_KERNEL, 80);&lt;/pre&gt;&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;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: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/500670?ContentTypeID=1</link><pubDate>Sun, 01 Sep 2024 17:36:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2d5fcad-e9a0-44ac-9e44-21ac5635445d</guid><dc:creator>uli_hn</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/114182/use-of-the-usb-cdc-acm-interface-together-with-the-bt-mesh-stack-on-the-nrf52840-dongle/500571"]&lt;p&gt;This means e.g. that it will not automatically pick up&amp;nbsp;the board files (if you had any).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So the &amp;quot;correct&amp;quot; way to do this is to use a common prj.conf file that will be used for all your different builds. Then you can add your prj_dongle.conf as an&amp;nbsp;&lt;strong&gt;extra&lt;/strong&gt; KConfig file by using the &amp;quot;Extra KConfig fragments&amp;quot; option. Alternatively, if you would have named the other conf file &amp;lt;board_name&amp;gt;.conf, like this:&lt;/p&gt;
&lt;p&gt;nrf52840dongle_nrf52840.conf,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;then it will automatically be picked up as an extra KConfig fragment. The same goes for the .overlay files. If it was called nrf52840dongle_nrf52840.overlay, then the compiler will pick it up automatically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Anyway, it is possible to add any files as extra KConfig fragments.&lt;/p&gt;[/quote]
&lt;p&gt;Hey Edvin,&lt;/p&gt;
&lt;p&gt;One more thing: I have applied your explanations. Renaming the &lt;em&gt;.overlay&lt;/em&gt; files leads to the desired success. They are automatically found and analysed as &lt;em&gt;&amp;quot;Found devicetree overlay&amp;quot;&lt;/em&gt; during compilation. However, this does not work for the &lt;em&gt;.conf&lt;/em&gt; files. I have to enter them manually in the &lt;em&gt;&amp;quot;KConfig fragments&amp;quot;&lt;/em&gt;, otherwise the compilation process is cancelled due to missing dependencies.&lt;br /&gt;&lt;br /&gt;best uli&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/500655?ContentTypeID=1</link><pubDate>Sat, 31 Aug 2024 17:05:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10f9960d-16b2-43cb-9c7f-ede690af34cc</guid><dc:creator>uli_hn</dc:creator><description>[quote userid="26071" url="~/f/nordic-q-a/114182/use-of-the-usb-cdc-acm-interface-together-with-the-bt-mesh-stack-on-the-nrf52840-dongle/500572"]&lt;div&gt;&lt;span&gt;CONFIG_USE_SEGGER_RTT&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_LOG_BACKEND_RTT&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;This way you can monitor the log without UART.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;[/quote]
&lt;p&gt;... Do I have to switch anything off for this or are there dependencies that could then no longer work? Or do I just put this in and connect the RTT to the terminal under the &amp;quot;connected devices&amp;quot; in VS Code and it works?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/500654?ContentTypeID=1</link><pubDate>Sat, 31 Aug 2024 16:57:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edc0ba32-06eb-486a-ab12-665a9735476a</guid><dc:creator>uli_hn</dc:creator><description>&lt;p&gt;Dear Edvin,&lt;/p&gt;
&lt;p&gt;Firstly, thank you for your comments regarding &lt;code&gt;conf&amp;#39;s&lt;/code&gt; and&lt;code&gt; overlays&lt;/code&gt;. I actually knew that, but somehow, due to laziness and rapid prototyping, these features crept in, although it is much more convenient to do it the way you described. I have now rebuilt it &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f60a.svg" title="Blush"&gt;&amp;#x1f60a;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regarding your issues: I had exactly the same problem (as described above). And the solution was not to change anything (in the code or in the settings), but simply not to interrupt the initialisation routines with debug breakpoints within the debug process. This applies to both: &lt;code&gt;init serial interface&lt;/code&gt; and &lt;code&gt;init BT Mesh&lt;/code&gt;!&lt;/p&gt;
&lt;p&gt;Then everything runs smoothly. And the system works as it should. It receives data via the serial interface, analyses it and tries to send the analysis to the Mesh. In fact, I have now provisioned the dongle and the &lt;em&gt;BT Mesh&lt;/em&gt; also receives all the data.&lt;/p&gt;
&lt;p&gt;The error I have found is that flashing the dongle via the &lt;em&gt;nRF52 DK&lt;/em&gt; works, but not via the bootloader. And this has nothing to do with my project. My project works with the dongle as long as it is flashed via the &lt;em&gt;nRF52 DK&lt;/em&gt;.&lt;br /&gt;And that shouldn&amp;#39;t really be the case, should it?&lt;/p&gt;
&lt;p&gt;Sunny regards Uli&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/500572?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2024 11:57:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa448e42-b9e8-40fa-945d-3b3942e86688</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Oh, and I enabled the RTT logging by adding these two to your prj.conf:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_USE_SEGGER_RTT&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_LOG_BACKEND_RTT&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;This way you can monitor the log without UART.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/500571?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2024 11:56:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db5c0997-febf-4c46-a5d8-e8aa49de8d37</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Uli,&lt;/p&gt;
&lt;p&gt;Thank you for clarifying&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&amp;nbsp;This was the kind of information I was fishing for, what you did with the bootloader, but it seems like you are on top of things.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Some general hints:&lt;/p&gt;
&lt;p&gt;The way you set up the different builds is not really how it is intended to be done. Although it may seem harmless to use prj_dongle.conf as the base configuration file, that will actually cause the rest of the project to fail. You see, if you set the base configuration file to prj_dongle.conf, it will also look for all the other files, such as board files, child image files ending in _dongle.*&lt;/p&gt;
&lt;p&gt;This means e.g. that it will not automatically pick up&amp;nbsp;the board files (if you had any).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So the &amp;quot;correct&amp;quot; way to do this is to use a common prj.conf file that will be used for all your different builds. Then you can add your prj_dongle.conf as an&amp;nbsp;&lt;strong&gt;extra&lt;/strong&gt; KConfig file by using the &amp;quot;Extra KConfig fragments&amp;quot; option. Alternatively, if you would have named the other conf file &amp;lt;board_name&amp;gt;.conf, like this:&lt;/p&gt;
&lt;p&gt;nrf52840dongle_nrf52840.conf,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;then it will automatically be picked up as an extra KConfig fragment. The same goes for the .overlay files. If it was called nrf52840dongle_nrf52840.overlay, then the compiler will pick it up automatically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Anyway, it is possible to add any files as extra KConfig fragments.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sorry that this took so long, but I needed to add a debug header to one of my nRF52840 dongles.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When I ran your application (both on DK and dongle) it stopped at&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	LOG_INF(&amp;quot;Wait for DTR&amp;quot;);

	while (true) {
		uint32_t dtr = 0U;
		if ( (int_ret = uart_line_ctrl_get(uart_dev, UART_LINE_CTRL_DTR, &amp;amp;dtr)) ) {
		    LOG_ERR(&amp;quot;Failed to retrieve line control for UART, ret code %d&amp;quot;, int_ret);  // ENOTSUP = 134 -&amp;gt; Unsupported value | if API is not enabled // ENOSYS = 88 -&amp;gt; Function not implemented                                                                                      
	    }
        
		if (dtr) {
			break; // jump out of the while
		} 

        /* [else] Give CPU resources to low priority threads. */
		k_sleep(K_MSEC(100));
	}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am not sure what is actually supposed to happen here. Perhaps I am using the wrong terminal or something. I read your last reply, and I understand that you did some changes, but I am not sure which ones.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I break out of this while loop, then I get a Bus Fault:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; Sensovo Dongle (Zephyr OS Build v3.3.99-ncs1-2) is initializing...
00&amp;gt; 
00&amp;gt; [00:00:00.701,019] &amp;lt;inf&amp;gt; serial: Wait for DTR
00&amp;gt; [00:00:00.701,019] &amp;lt;inf&amp;gt; serial: DTR set
00&amp;gt; [00:00:00.842,285] &amp;lt;err&amp;gt; usb_nrfx: Endpoint 0x81 is not enabled
00&amp;gt; [00:00:01.094,573] &amp;lt;inf&amp;gt; serial: Baudrate detected: 115200
00&amp;gt; [00:00:01.701,965] &amp;lt;err&amp;gt; os: ***** BUS FAULT *****
00&amp;gt; [00:00:01.701,995] &amp;lt;err&amp;gt; os:   Imprecise data bus error[0m
00&amp;gt; [00:00:01.701,995] &amp;lt;err&amp;gt; os: r0/a1:  0x00000000  r1/a2:  0x2000bc2c  r2/a3:  0x20004f04
00&amp;gt; [00:00:01.702,026] &amp;lt;err&amp;gt; os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x0003ef5d
00&amp;gt; [00:00:01.702,026] &amp;lt;err&amp;gt; os:  xpsr:  0x61000000
00&amp;gt; [00:00:01.702,056] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0002396c
00&amp;gt; [00:00:01.702,087] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 26: Unknown error on CPU 0
00&amp;gt; [00:00:01.702,117] &amp;lt;err&amp;gt; os: Current thread: 0x20004cd0 (unknown)
00&amp;gt; [00:00:01.930,023] &amp;lt;err&amp;gt; fatal_error: Resetting system[0m&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Is this what you are seeing as well?&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: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/500278?ContentTypeID=1</link><pubDate>Wed, 28 Aug 2024 18:11:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab48dfbb-95d8-49c7-aa4d-73ca5cfa7d34</guid><dc:creator>uli_hn</dc:creator><description>&lt;p&gt;Dear Edvin,&lt;/p&gt;
&lt;p&gt;I played around a bit with the reproducibility of the problem. Because I also wanted to be able to check the process on the &lt;em&gt;nRF52840 DK&lt;/em&gt;. On that I was already able to use our system (serial interface incl. BT Mesh) to analyse a transferred protocol:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;But every time I started the debugger, the &lt;em&gt;nRF52840 DK&lt;/em&gt; system ran into a &amp;lsquo;fatal error&amp;rsquo; at the breakpoints during the initialisation of the serial interface.&lt;/li&gt;
&lt;li&gt;On reflection, it occurred to me that the hardware of time-based systems such as UART requires certain response times during initialisation, which must not be undercut.&lt;/li&gt;
&lt;li&gt;So I removed all breakpoints during the initialisation of the serial interface and came to exactly the initialisation point of BT Mesh that leads to the error as mentioned in the post above.&lt;/li&gt;
&lt;li&gt;This allowed me to reproduce the same error on the &lt;em&gt;nRF52840 DK&lt;/em&gt; as on the &lt;em&gt;nRF52 DK with the nRF52840 dongle&lt;/em&gt; &lt;em&gt;connected&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;But I thought to myself that BT Mesh/BLE is also a time-based system and that certain response times or, in this case, a switch to another &lt;code&gt;&amp;lsquo;worker&amp;rsquo;&lt;/code&gt; is necessary at certain times.&lt;/li&gt;
&lt;li&gt;So I started the debugger again on the &lt;em&gt;nRF52 DK&lt;/em&gt; and found out that this system also runs through without errors, as long as the serial initialisation or the initialisation of BT Mesh is not interrupted.&lt;/li&gt;
&lt;li&gt;On both systems (&lt;em&gt;nRF52 DK with connected nRF52840 dongle&lt;/em&gt; &lt;strong&gt;&amp;amp;&lt;/strong&gt; &lt;em&gt;nRF52840 DK&lt;/em&gt;) the project can be compiled, debugged and executed without any problems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sometimes it makes sense to take a look at the datasheet of the microcontroller and the exact specifications of the hardware, in particular the required/requested time intervals of the used systems (UART/BLE) &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f609.svg" title="Wink"&gt;&amp;#x1f609;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Now, however, I wanted to find out why the dongle cannot be started without debugging options or why it keeps resetting all the time after he is flashed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To do this, I created a build on the nRF52 DK with the nRF52840 dongle connected, which does not contain any debugging options. This build was flashed to the dongle via the nRF52 DK.&lt;/li&gt;
&lt;li&gt;(And even as a standalone dongle - also tested on other PC systems...) &lt;br /&gt;this build works as it should on the nRF52840 dongle !!!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Maybe I had changed some tweak in the meantime (which I had meticulously made sure not to do) that made the dongle work. Okay, programming the dongle with the bootloader:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;nrf52840dongle_nrf52840.dts&lt;/em&gt; set back to &lt;code&gt;#include &amp;lsquo;fstab-stock.dts&amp;rsquo;&lt;/code&gt; and in the KConfig set &lt;code&gt;BOARD_HAS_NRF5_BOOTLOADER&lt;/code&gt; setting back to &lt;code&gt;default y&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Then generated a presitina build and flashed the created zephyr.hex via the programmer to the dongle with the bootloader ( &lt;em&gt;graviton_bootloader_mbr_v1.0.1-[nRF5_SDK_15.0.1-1.alpha_f76d012].hex&lt;/em&gt; ).&lt;/li&gt;
&lt;li&gt;Error: the dongle is plugged into the USB port and keeps restarting - it probably keeps starting a reset&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Could it have something to do with our project? We have modelled our BT Mesh project on your examples: &lt;em&gt;Bluetooth Mesh Light, BT Mesh Light Switch, BT Mesh Chat&lt;/em&gt;. So I took your &lt;em&gt;Bluetooth Mesh Light&lt;/em&gt; example project and simply added our serial interface (also derived from your &lt;em&gt;CDC ACM&lt;/em&gt; example) to it. Same procedure as above:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;prestina build via nRF52 DK flashed to connected nRF52840 dongle (&lt;em&gt;nrf52840dongle_nrf52840.dts&lt;/em&gt; with &lt;code&gt;#include &amp;lsquo;fstab-debugger.dts&amp;rsquo;&lt;/code&gt; / &lt;code&gt;BOARD_HAS_NRF5_BOOTLOADER default n&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;=&amp;gt; works!&lt;/li&gt;
&lt;li&gt;prestina build, zephyr.hex flashed to the dongle via the programmer (&lt;em&gt;nrf52840dongle_nrf52840.dts&lt;/em&gt; with&lt;code&gt; #include &amp;lsquo;fstab-stock.dts&amp;rsquo;&lt;/code&gt; / &lt;code&gt;BOARD_HAS_NRF5_BOOTLOADER default y&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;=&amp;gt; does not work! Constant resets.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The only difference in both conf&amp;#39;s is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bootloader =&amp;gt; &lt;code&gt;CONFIG_FLASH_LOAD_OFFSET=0x1000 &amp;amp; CONFIG_BOARD_HAS_NRF5_BOOTLOADER=y&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;nRF52 DK =&amp;gt; &lt;code&gt;CONFIG_FLASH_LOAD_OFFSET=0 &amp;amp; #CONFIG_BOARD_HAS_NRF5_BOOTLOADER is not set&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The differences in the DTS are in the four partitions (&lt;code&gt;boot, slot0, slot1, storage&lt;/code&gt;):&lt;br /&gt;Bootloader /&amp;nbsp;nRF52 DK&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;flash_controller: flash-controller@4001e000 {
	compatible = &amp;quot;nordic,nrf52-flash-controller&amp;quot;;
	reg = &amp;lt; 0x4001e000 0x1000 &amp;gt;;
	partial-erase;
	#address-cells = &amp;lt; 0x1 &amp;gt;;
	#size-cells = &amp;lt; 0x1 &amp;gt;;
	flash0: flash@0 {
		compatible = &amp;quot;soc-nv-flash&amp;quot;;
		erase-block-size = &amp;lt; 0x1000 &amp;gt;;
		write-block-size = &amp;lt; 0x4 &amp;gt;;
		reg = &amp;lt; 0x0 0x100000 &amp;gt;;
		partitions {
			compatible = &amp;quot;fixed-partitions&amp;quot;;
			#address-cells = &amp;lt; 0x1 &amp;gt;;
			#size-cells = &amp;lt; 0x1 &amp;gt;;
			boot_partition: partition@1000 {
				label = &amp;quot;mcuboot&amp;quot;;
				reg = &amp;lt; 0x1000 0xf000 &amp;gt;;
			};
			slot0_partition: partition@10000 {
				label = &amp;quot;image-0&amp;quot;;
				reg = &amp;lt; 0x10000 0x66000 &amp;gt;;
			};
			slot1_partition: partition@76000 {
				label = &amp;quot;image-1&amp;quot;;
				reg = &amp;lt; 0x76000 0x66000 &amp;gt;;
			};
			storage_partition: partition@dc000 {
				label = &amp;quot;storage&amp;quot;;
				reg = &amp;lt; 0xdc000 0x4000 &amp;gt;;
			};
		};
	};
};&lt;/pre&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;flash_controller: flash-controller@4001e000 {
	compatible = &amp;quot;nordic,nrf52-flash-controller&amp;quot;;
	reg = &amp;lt; 0x4001e000 0x1000 &amp;gt;;
	partial-erase;
	#address-cells = &amp;lt; 0x1 &amp;gt;;
	#size-cells = &amp;lt; 0x1 &amp;gt;;
	flash0: flash@0 {
		compatible = &amp;quot;soc-nv-flash&amp;quot;;
		erase-block-size = &amp;lt; 0x1000 &amp;gt;;
		write-block-size = &amp;lt; 0x4 &amp;gt;;
		reg = &amp;lt; 0x0 0x100000 &amp;gt;;
		partitions {
			compatible = &amp;quot;fixed-partitions&amp;quot;;
			#address-cells = &amp;lt; 0x1 &amp;gt;;
			#size-cells = &amp;lt; 0x1 &amp;gt;;
			boot_partition: partition@0 {
				label = &amp;quot;mcuboot&amp;quot;;
				reg = &amp;lt; 0x0 0x12000 &amp;gt;;
			};
			slot0_partition: partition@12000 {
				label = &amp;quot;image-0&amp;quot;;
				reg = &amp;lt; 0x12000 0x75000 &amp;gt;;
			};
			slot1_partition: partition@87000 {
				label = &amp;quot;image-1&amp;quot;;
				reg = &amp;lt; 0x87000 0x75000 &amp;gt;;
			};
			storage_partition: partition@fc000 {
				label = &amp;quot;storage&amp;quot;;
				reg = &amp;lt; 0xfc000 0x4000 &amp;gt;;
			};
		};
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;At this point, I&amp;#39;m at a bit of a loss. Could it have something to do with the&amp;nbsp;&lt;code&gt;CONFIG_HEAP_MEM_POOL_SIZE=4096&lt;/code&gt; attribute that we have set?&lt;br /&gt;Could it be that the access points have changed and the bootloader is not processing them correctly?&lt;/p&gt;
&lt;p&gt;Perhaps you have already been able to take a look at it and get an overview.&lt;/p&gt;
&lt;p&gt;I am curious about it&lt;br /&gt;best regards&amp;nbsp;&lt;br /&gt;uli&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/500040?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 15:39:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:325d2f03-1c91-4054-a903-5fe734ea73a3</guid><dc:creator>uli_hn</dc:creator><description>&lt;p&gt;Hey Edvin,&lt;/p&gt;
&lt;p&gt;don&amp;#39;t worry, I wrote this post right before the weekend, so I don&amp;#39;t expect to get an answer soon.&lt;br /&gt;&lt;br /&gt;My debug environment is: VS Code &amp;amp; nRF Connect and a nRF52 DK. (I have also tried to use only the nRF52840 DK, but it crashes during serial initialisation or the debugger hangs.)&lt;br /&gt;&lt;br /&gt;At the place of system crash i mentioned above leads to a &amp;quot;fatal errer: Kernel oops&amp;quot;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The output from DEBUG CONSOLE is the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;JLinkGDBServerCL: SEGGER J-Link GDB Server V7.94e Command Line Version
JLinkGDBServerCL: 
JLinkGDBServerCL: JLinkARM.dll V7.94e (DLL compiled Jan 15 2024 15:18:46)
JLinkGDBServerCL: 
JLinkGDBServerCL: -----GDB Server start settings-----
JLinkGDBServerCL: GDBInit file:                  none
JLinkGDBServerCL: GDB Server Listening port:     58968
JLinkGDBServerCL: SWO raw output listening port: 2332
JLinkGDBServerCL: Terminal I/O port:             2333
JLinkGDBServerCL: Accept remote connection:      localhost only
JLinkGDBServerCL: Generate logfile:              off
JLinkGDBServerCL: Verify download:               off
JLinkGDBServerCL: Init regs on start:            off
JLinkGDBServerCL: Silent mode:                   on
JLinkGDBServerCL: Single run mode:               on
JLinkGDBServerCL: Target connection timeout:     0 ms
JLinkGDBServerCL: ------J-Link related settings------
JLinkGDBServerCL: J-Link Host interface:         USB
JLinkGDBServerCL: J-Link script:                 none
JLinkGDBServerCL: J-Link settings file:          none
JLinkGDBServerCL: ------Target related settings------
JLinkGDBServerCL: Target device:                 nRF52840_xxAA
JLinkGDBServerCL: Target device parameters:      none
JLinkGDBServerCL: Target interface:              SWD
JLinkGDBServerCL: Target interface speed:        12000kHz
JLinkGDBServerCL: Target endian:                 little
JLinkGDBServerCL: 
=thread-group-added,id=&amp;quot;i1&amp;quot;
=cmd-param-changed,param=&amp;quot;pagination&amp;quot;,value=&amp;quot;off&amp;quot;
z_arm_reset () at C:/ncs/v2.4.3/zephyr/arch/arm/core/aarch32/cortex_m\reset.S:73
73	    movs.n r0, #0
[New Remote target]
[New Thread 536891328]
[New Thread 536891144]
[New Thread 536880744]
[New Thread 536882016]
[New Thread 536882232]
[New Thread 536890928]
[New Thread 536891512]
[New Thread 536885248]
[New Thread 536880560]
[Switching to Thread 536891328]

Thread 3 hit Breakpoint 1, main () at ../src/main.c:46
46	int main(void) {
Execute debugger commands using &amp;quot;-exec &amp;lt;command&amp;gt;&amp;quot; or &amp;quot;`&amp;lt;command&amp;gt;&amp;quot;, for example &amp;quot;-exec info registers&amp;quot; or &amp;quot;`info registers&amp;quot; will list registers in use (when GDB is the debugger)
[New Thread 536880560]

Thread 3 hit Breakpoint 4, main () at ../src/main.c:76
76		init_serial();	// enable USB, initialize UART, printing LOG messages as well as &amp;#39;printk&amp;#39;-outputs
[New Thread 536882448]
[New Thread 536882632]
[New Thread 536890696]
[New Thread 536884792]
[Switching to Thread 536891512]

Thread 9 hit Breakpoint 2, bt_ready (err=0) at ../src/main.c:42
42		bt_mesh_prov_enable(BT_MESH_PROV_ADV | BT_MESH_PROV_GATT); // with the bit wise &amp;#39;OR&amp;#39; ()&amp;quot;1&amp;quot;|&amp;quot;2&amp;quot; =) &amp;quot;3&amp;quot; =&amp;gt; (01 | 10 =) 11 (bit-style) is send

Thread 9 hit Breakpoint 6, bt_mesh_prov_bearer_cb_get () at C:/ncs/v2.4.3/zephyr/subsys/bluetooth/mesh/prov.c:417
417		return &amp;amp;prov_bearer_cb;

Thread 9 hit Breakpoint 5, bt_mesh_prov_enable (bearers=bearers@entry=(BT_MESH_PROV_ADV | BT_MESH_PROV_GATT)) at C:/ncs/v2.4.3/zephyr/subsys/bluetooth/mesh/prov_device.c:685
685		if (IS_ENABLED(CONFIG_BT_MESH_PB_GATT) &amp;amp;&amp;amp;

Thread 9 hit Breakpoint 6, bt_mesh_prov_bearer_cb_get () at C:/ncs/v2.4.3/zephyr/subsys/bluetooth/mesh/prov.c:417
417		return &amp;amp;prov_bearer_cb;
[New Remote target]
[Switching to Remote target]

Thread 17 hit Breakpoint 7, k_sys_fatal_error_handler (reason=3, esf=0x2000b85c &amp;lt;z_interrupt_stacks+1948&amp;gt;) at C:/ncs/v2.4.3/nrf/lib/fatal_error/fatal_error.c:18
18	{&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Regarding your question about flashing: &lt;br /&gt;(Firstly, I have several dongles ;-), one that is connected to the nRF52 DK and several with pre-programmed bootloader on it). I do the (standalone) app flashing via the nRF Connect Tool using the generated hex file and the pre-programmed bootloader. However, with the compiled NRF5_BOOTLOADER=y and the included fstab-stock.dts settings. This is changed for debugging. With the changed conf and dts settings, I flash the dongle connected to the nRF52 DK from VS Code.&amp;nbsp;Everything according to your&amp;nbsp;&lt;a title="nrf52840-dongle-programming-tutorial" href="https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial" rel="noopener noreferrer" target="_blank"&gt;https://devzone.nordicsemi.com/guides/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here is the complete project:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mesh_5F00_node_5F00_uart.zip"&gt;devzone.nordicsemi.com/.../mesh_5F00_node_5F00_uart.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;To compile your own build version, you would have to select the &lt;strong&gt;&lt;em&gt;nrf52840dongle.overlay&lt;/em&gt;&lt;/strong&gt; and the &lt;strong&gt;&lt;em&gt;prj_dongle.conf&lt;/em&gt;&lt;/strong&gt;. And for debugging, you should also go to the board settings of the 2.4.3 SDK (here is the path: &lt;em&gt;\ncs\v2.4.3\zephyr\boards\arm\nrf52840dongle_nrf52840&lt;/em&gt; ) in the &lt;em&gt;Kconfig&lt;/em&gt; the entry &lt;code&gt;BOARD_HAS_NRF5_BOOTLOADER=n&lt;/code&gt; and in the &lt;em&gt;nrf52840dongle_nrf52840.dts&lt;/em&gt; instead of the line &lt;code&gt;#include &amp;quot;fstab-stock.dts&amp;quot;&lt;/code&gt;&amp;nbsp;use the line &lt;code&gt;#include &amp;quot;fstab-debugger.dts&amp;quot;&lt;/code&gt;. I probably didn&amp;#39;t need to write that to you, because of course you know that.&lt;/p&gt;
&lt;p&gt;Many thanks in advance for your help.&lt;/p&gt;
&lt;p&gt;Best regards Uli&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/500026?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 14:24:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:692ca902-06b2-44f3-9f2a-19bc23d661b6</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Uli,&lt;/p&gt;
&lt;p&gt;Sorry for the late reply.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you debug, and find the place where it crashes. What does that mean? Does it stop/hang? Does the (RTT) log say anything at this point in time? If you have a debugger connected you can monitor the RTT log.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And if it is inconclusive, feel free to upload the DK and dongle application files so that I can have a look. It is easier to test and try to replicate than reading through thousands of lines of config not knowing what to look for.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And how did you flash the application to the dongle? Via the pre-programmed bootloader, or using a debugger? If you used a debugger, does that mean that you have erased the pre-programmed bootloader?&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: Use of the USB CDC ACM interface together with the BT Mesh Stack on the nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/499829?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 17:38:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a61debf4-375b-476a-8899-3b29213dcccb</guid><dc:creator>uli_hn</dc:creator><description>&lt;p&gt;I have some more info after debugging the dongle via the nRF52 DK until the system crashed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Inside &amp;lt;&lt;code&gt;int bt_enable(bt_ready_cb_t cb)&amp;gt;&lt;/code&gt; [from the hci_core.c file] the implemented and sent callback function is initialised.&lt;/li&gt;
&lt;li&gt;At the end of this function, &amp;lt;&lt;code&gt;bt_mesh_prov(BT_MESH_PROV_ADV | BT_MESH_PROV_GATT);&lt;/code&gt;&amp;gt; is called.&lt;/li&gt;
&lt;li&gt;At the end of this function, there are two queries (one ADV and one GATT) in which the callback is to be linked to the provsioning bearer:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&lt;span&gt;bt_mesh_pb_adv&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;link_accept&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;bt_mesh_prov_bearer_cb_get&lt;/span&gt;&lt;span&gt;(), &lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&lt;code&gt;);&lt;/code&gt;. ( prov_device.c ).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;When returning to &amp;quot;bt_mesh_pb_adv&amp;quot;, the pointer to the prov_bearer is still returned.&lt;/li&gt;
&lt;li&gt;On the second return to &amp;quot;bt_mesh_pb_gatt&amp;quot; there is a system crash in the &amp;quot;prov.c&amp;quot; file.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main(void) {

	[...]
	init_serial();	// enable USB, initialize UART, printing LOG messages as well as &amp;#39;printk&amp;#39;-outputs
    [...]
	err = bt_enable(bt_ready); // calls the BT enable function in hci_core.c and passes our callback function to our BT Mesh clients 
    
    ------------------
    int bt_enable(bt_ready_cb_t cb) { [...] k_work_submit(&amp;amp;bt_dev.init); return 0; }
    ------------------
    static void bt_ready(int err) { [...] bt_mesh_prov_enable(BT_MESH_PROV_ADV | BT_MESH_PROV_GATT); }
    ------------------
    int bt_mesh_prov_enable(bt_mesh_prov_bearer_t bearers) { 
        [...]
    	if (IS_ENABLED(CONFIG_BT_MESH_PB_ADV) &amp;amp;&amp;amp;
    	    (bearers &amp;amp; BT_MESH_PROV_ADV)) {
    		bt_mesh_pb_adv.link_accept(bt_mesh_prov_bearer_cb_get(), NULL);
    	    ------------------
        	    const struct prov_bearer_cb *bt_mesh_prov_bearer_cb_get(void) { 
        	        return &amp;amp;prov_bearer_cb;  // HERE IT STILL WORKS
        	    }
    	    ------------------
        }
    	if (IS_ENABLED(CONFIG_BT_MESH_PB_GATT) &amp;amp;&amp;amp;
    	    (bearers &amp;amp; BT_MESH_PROV_GATT)) {
    		bt_mesh_pb_gatt.link_accept(bt_mesh_prov_bearer_cb_get(), NULL);
    		------------------
        	    const struct prov_bearer_cb *bt_mesh_prov_bearer_cb_get(void) { 
        	        return &amp;amp;prov_bearer_cb;  // HERE CRASHES
        	    }
    	    ------------------
    	}
    [...]
    &lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;Thanks for looking at it,&amp;nbsp;&lt;br /&gt;sunny regards&lt;br /&gt;uli&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>