<?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>HCI Driver open failed - NRF5340</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108454/hci-driver-open-failed---nrf5340</link><description>Hello, 
 We have been successfully developing and debugging an NRF5340 application for many months now. We have been logging data over BLE as well, so we know that was working. However, we recently started getting an error when trying to start the Bluetooth</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Feb 2024 07:33:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108454/hci-driver-open-failed---nrf5340" /><item><title>RE: HCI Driver open failed - NRF5340</title><link>https://devzone.nordicsemi.com/thread/470156?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2024 07:33:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ac3d3fc-5531-4ca0-ad18-241880641702</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Great to know that changing the speed of debug clock worked. Now back to you initial problem.&lt;/p&gt;
[quote user=""]&lt;div&gt;&lt;span&gt;One (potentially) important point - we recently tried implementing a shutdown feature that calls:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;pm_state_set(PM_STATE_SOFT_OFF, 0);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;After this was called is when the problem started.&lt;/span&gt;&lt;/div&gt;[/quote]
&lt;p&gt;Did you configure a&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fchapters%2Fpmu%2Fdoc%2Fpmu.html&amp;amp;cp=4_0_0_3_1&amp;amp;anchor=unique_1970804536"&gt;wakeup source&lt;/a&gt;? Without a wakeup source and making the chip go to system off will cutoff the debugger access well. System off is the deepest sleep state where most of the regulators are turned off including the one for the debugger clocks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HCI Driver open failed - NRF5340</title><link>https://devzone.nordicsemi.com/thread/470127?ContentTypeID=1</link><pubDate>Thu, 22 Feb 2024 00:16:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d3e4ee41-11a5-4e73-a9f9-de3920f5b4bf</guid><dc:creator>jmilliken</dc:creator><description>&lt;p&gt;Update - I managed to change the debug speed based on &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/102043/modifiying-debug-target-speed"&gt;this answer&lt;/a&gt; and that was worked. I&amp;#39;m all set there, thank you for the help. I would like to go back to the other problem of not being able to use the most up to date SDK and toolchain to see if we can fix that as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HCI Driver open failed - NRF5340</title><link>https://devzone.nordicsemi.com/thread/470067?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2024 15:08:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fe1c493-8124-443f-bafe-f78fb11b8a0f</guid><dc:creator>jmilliken</dc:creator><description>&lt;p&gt;Thanks. Regarding the debug link, it does sound like this could be the problem. The J-Link speed is set to 12MHz. I will try Ozone, but for VS Code debugging, how to do I specify the J-Link speed in the launch json?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HCI Driver open failed - NRF5340</title><link>https://devzone.nordicsemi.com/thread/469940?ContentTypeID=1</link><pubDate>Wed, 21 Feb 2024 06:35:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:421a5aec-b0ac-4525-bf47-da32a5c706f4</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="jmilliken"]Okay - sorry for all the updates, but this one is probably the biggest clue yet. We had updated the toolchains for this latest build and that seems to be the actual root of the problem. I downgraded to toolchain and SDK v2.0.2 (which was our standard for all previous development), now the BLE is working again. However, I am still not able to get into debug mode.[/quote]
&lt;p&gt;First of all you should not be using such an old SDK for development. It looks like you have some porting issues in your code that compiles OK but seems like not compatible with the changes required for the newer SDK.&amp;nbsp;&lt;/p&gt;
[quote user="jmilliken"]&lt;p&gt;However, I am still not able to get into debug mode. Still getting the SIGTRAP before I get to main. So not completely solved yet. Any ideas?&lt;/p&gt;
&lt;p&gt;This is my debug configuration:&lt;/p&gt;[/quote]
&lt;p&gt;Can you check the speed of the debugger, it looks a bit similar to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/102052/j-link-debugger-hang-issue/440577"&gt;this thread&lt;/a&gt;, Can you try debugging with Ozone and see if it works and if nrf-connect is trying to clock the debugger with really high speed. If so, we can change the debugger speed with which nrf-connect ide start to something lower in the configuration file.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HCI Driver open failed - NRF5340</title><link>https://devzone.nordicsemi.com/thread/469861?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 15:34:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:004b9824-7e6a-4828-9d12-0b8da0d7d726</guid><dc:creator>jmilliken</dc:creator><description>&lt;p&gt;Okay - sorry for all the updates, but this one is probably the biggest clue yet. We had updated the toolchains for this latest build and that seems to be the actual root of the problem. I downgraded to toolchain and SDK v2.0.2 (which was our standard for all previous development), now the BLE is working again. However, I am still not able to get into debug mode. Still getting the SIGTRAP before I get to main. So not completely solved yet. Any ideas?&lt;/p&gt;
&lt;p&gt;This is my debug configuration:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;{
	&amp;quot;version&amp;quot;: &amp;quot;0.2.0&amp;quot;,
	&amp;quot;configurations&amp;quot;: [
		{
			&amp;quot;type&amp;quot;: &amp;quot;nrf-connect&amp;quot;,
			&amp;quot;request&amp;quot;: &amp;quot;launch&amp;quot;,
			&amp;quot;name&amp;quot;: &amp;quot;Launch build&amp;quot;,
			&amp;quot;config&amp;quot;: &amp;quot;${workspaceFolder}/build&amp;quot;,
			&amp;quot;runToEntryPoint&amp;quot;: &amp;quot;main&amp;quot;
		}
	]
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HCI Driver open failed - NRF5340</title><link>https://devzone.nordicsemi.com/thread/469846?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 15:03:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60b4b43a-9fa3-43d2-a437-73aaa8822429</guid><dc:creator>jmilliken</dc:creator><description>&lt;p&gt;In general, I am getting a SIGTRAP error now when I try to debug:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1708441340395v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;This is happening even after reverting to an older branch of code that does not use the power down function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HCI Driver open failed - NRF5340</title><link>https://devzone.nordicsemi.com/thread/469825?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 14:24:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed296b82-5d05-4b3a-9119-a6f036e178f1</guid><dc:creator>jmilliken</dc:creator><description>&lt;p&gt;I did not have that enabled. However, when I enabled it, the application code would not start at all. Without this option, the main app is still running, just no BLE. Another interesting thing happened - when I had this enabled, I was unable to debug. The J-Link connected but the main thread never got to the main() function entry point.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HCI Driver open failed - NRF5340</title><link>https://devzone.nordicsemi.com/thread/469733?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 09:47:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dce001f-bc7a-481c-9e3d-6e3921ebb30e</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The issue seems to be similar to what was described &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/89475/nrf5340-dk-ble-examples-fail-to-initialize/442328"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you see if you have enabled&amp;nbsp;&lt;span&gt;CONFIG_BT_RPC_STACK=y in prj.conf, prestine build and see if that could be the source of the issue.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>