<?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>nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116172/nrf52832-ble-works-once-then-fails-stuck-in-hfclk-initialization</link><description>Hi everyone! 
 I&amp;#39;m having trouble getting a custom PCB with the nRF52832 chip to work, specifically with enabling BLE functionality. 
 It seems there are issues related to the HFCLK (High-Frequency Clock). I tried running a sample test code I found in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Nov 2024 08:56:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116172/nrf52832-ble-works-once-then-fails-stuck-in-hfclk-initialization" /><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/511603?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2024 08:56:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:377141a3-a835-4ede-9870-8ff7cccef228</guid><dc:creator>Red J.</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;br /&gt;Yes, I activated the HFCLK detection only after this hardfault showed up. In fact, when the detection is activation it gets stuck there.&lt;br /&gt;&lt;br /&gt;I&amp;#39;m doing that test as soon as possible. in the meantime, I have ordered a new PCB with some clock layout upgrades.&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll keep you updated.&lt;br /&gt;&lt;br /&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/511238?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2024 08:50:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a664797a-23bd-4955-b7dc-64b1be6da73e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;But do you still run into this hardfault with the HFCLK detection disabled, or do you then only run into the immediate disconnect issue?&lt;/p&gt;
&lt;p&gt;Figuring out what the hardfault is caused by would be the first step. Then possibly getting a sniffer trace of what&amp;#39;s going on over the air when you see these immediate disconnects. You can use a spare DK and the &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE"&gt;nRF Sniffer firmware&lt;/a&gt; + Wireshark to get a sniffer trace of what&amp;#39;s going on over the air and upload it here so we can review it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/511130?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2024 14:34:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f580dcb2-663c-4329-a408-d8ffc7136f07</guid><dc:creator>Red J.</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sure, I only applied this code for debugging after I couldn&amp;#39;t get it to work with a sample default configuration.&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/511125?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2024 14:23:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19b8a8dc-d6d3-4228-879f-3ea5076f5f01</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think that this HFCLK detection might be causing this as it is likely halting or causing the HF clock to drift. Have you tried running any of the samples without this piece of code to see if you can recreate it then?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/511009?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2024 07:54:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a69ca54-0843-4b37-a2c2-171cf34e941a</guid><dc:creator>Red J.</dc:creator><description>&lt;h4 id="mcetoc_1id1mdeko0"&gt;&lt;span style="font-family:inherit;"&gt;Hi Simonr,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Hardware Revision: (Case ID: 336239)&lt;/h4&gt;
&lt;p&gt;I have tested with new Ccap values and soldered a new board, but the issue seems to persist. Some issues have arisen during the revision, but they are related to the RF line of the antenna. However, under very specific conditions, the device has been connectable.&lt;/p&gt;
&lt;p&gt;I am testing two board configurations:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A custom board built from scratch, which doesn&amp;rsquo;t work very well.&lt;/li&gt;
&lt;li&gt;The nRF52DK_nRF52832 board, with LEDs and button options disabled, as well as some other configurations like disabling the DCDC.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="mcetoc_1id1mdekp1"&gt;Recap:&lt;/h3&gt;
&lt;p&gt;The standard examples to run Bluetooth don&amp;rsquo;t work. I used the following code to check the HFCLK startup time, but it gets stuck in the loop:&lt;/p&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_TIMER1-&amp;gt;BITMODE = TIMER_BITMODE_BITMODE_32Bit &amp;lt;&amp;lt; TIMER_BITMODE_BITMODE_Pos;
NRF_TIMER1-&amp;gt;TASKS_CLEAR = 1;
NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
NRF_TIMER1-&amp;gt;TASKS_START = 1;
NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART = 1;
while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);
NRF_TIMER1-&amp;gt;TASKS_CAPTURE[0] = 1;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;When running the default SoftDevice Bluetooth stack, the following error occurs after starting advertising:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; [00:00:01.618,621] &amp;lt;err&amp;gt; os: ***** HARD FAULT *****
00&amp;gt; [00:00:01.618,621] &amp;lt;err&amp;gt; os:   Debug event
00&amp;gt; [00:00:01.618,652] &amp;lt;err&amp;gt; os: r0/a1:  0xfffffff5  r1/a2:  0xe000ed00  r2/a3:  0x20003844
00&amp;gt; [00:00:01.618,652] &amp;lt;err&amp;gt; os: r3/a4:  0x00000001 r12/ip:  0x00000004 r14/lr:  0x00027ae1
00&amp;gt; [00:00:01.618,682] &amp;lt;err&amp;gt; os:  xpsr:  0x61000000
00&amp;gt; [00:00:01.618,682] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x00011000
00&amp;gt; [00:00:01.618,743] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
00&amp;gt; [00:00:01.618,774] &amp;lt;err&amp;gt; os: Current thread: 0x20002be0 (unknown)
00&amp;gt; [00:00:02.485,076] &amp;lt;err&amp;gt; os: Halting system
&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;I disabled the &lt;code&gt;log&lt;/code&gt; and &lt;code&gt;printk&lt;/code&gt; modules in case they were interfering with Bluetooth functionality, but it made no difference.&lt;/p&gt;
&lt;p&gt;I enabled the option &lt;strong&gt;&lt;code&gt;CONFIG_BT_LL_SW_SPLIT=y&lt;/code&gt; &lt;/strong&gt;to use the Zephyr stack.&lt;/p&gt;
&lt;p&gt;If I run the HFCLK detection code, it still gets stuck in the loop.&lt;/p&gt;
&lt;p&gt;If I run the program without that check, the device starts advertising and becomes connectable. The functionality is a bit unstable&amp;mdash;sometimes it only works while debugging, other times only when not debugging. Occasionally, it disconnects quickly. However, I have managed to establish a connection in some instances.&lt;br /&gt;&lt;br /&gt;Thank you for all your help!&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/510851?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2024 09:01:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93d73be6-5398-4956-b329-8e056179cdc4</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;This all sounds incredibly strange. The Zephyr stack is not experimental btw, and both should work fine Both with and without bonding. Let me know how the HW review case goes, as I&amp;#39;m hesitant to dive any deeper before confirming whether this is a HW issue or not.&lt;/p&gt;
&lt;p&gt;You could upload the board file you&amp;#39;re using in NCS for your custom board, so we could have a look at that as well.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/510615?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2024 08:06:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa01ac7d-c53a-406a-8a83-44f49ff0fcff</guid><dc:creator>Red J.</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;nRF Connect SDK v2.7.0&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Toolchain v2.7.0&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;As far as I know, executing BLE samples didn&amp;rsquo;t work, and the process seemed to get stuck during HFCLK initialization.&lt;/p&gt;
&lt;p&gt;When I added &lt;strong&gt;CONFIG_BT_LL_SW_SPLIT=y&lt;/strong&gt; (experimental option, as far as I know, it uses the Zephyr stack for BLE), the devices started advertising, and I could connect. However, I still haven&amp;rsquo;t been able to bond.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/510610?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2024 07:56:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7068fba-8eb2-4510-9605-517bce8c4b66</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Just to make sure we&amp;#39;re on the same page, does the application work as expected with the Zephyr controller, but not with the SoftDevice controller? What SDK version are you using for development exactly here?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/510410?ContentTypeID=1</link><pubDate>Thu, 14 Nov 2024 08:16:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f6b8495-772f-431d-b663-6187ed0011e8</guid><dc:creator>Red J.</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;HF crystal orientation and Ccap have been checked and look fine.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;Soldering has been redone.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;I&amp;rsquo;m creating a new ticket today for a hardware revision.&lt;/p&gt;
&lt;p&gt;Despite these efforts, the system keeps showing the same issue.&lt;/p&gt;
&lt;p&gt;I have tried using the Zephyr link layer controller by adding &lt;code&gt;CONFIG_BT_LL_SW_SPLIT=y&lt;/code&gt; to &lt;code&gt;prj.conf&lt;/code&gt;, and it starts to advertise. I&amp;rsquo;ve searched but couldn&amp;rsquo;t find much on the implications of using this stack instead of SoftDevice.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 BLE Works Once, Then Fails – Stuck in HFCLK Initialization</title><link>https://devzone.nordicsemi.com/thread/509481?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 14:29:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a735d88-9c08-4902-9da9-7da5114c8b40</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;So, the system is halting for some reason here, and I&amp;#39;m inclined to think it&amp;#39;s either due to a soldering issue (on the HF clock or the nRF52 SoC), or that the HF clock is loaded incorrectly.&lt;/p&gt;
&lt;p&gt;Have you had the custom board HW design reviewed by a Nordic engineer? If not, that might be a good place to start. You can create a private ticket here on DevZone and upload your schematics (pdf) and PCB files (gerber files) there.&lt;/p&gt;
&lt;p&gt;Here are some common issues with custom designs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HF crystal is soldered on 90 degrees off, so the GND pads are on the clock pads and vice versa.&lt;/li&gt;
&lt;li&gt;The HF crystal isn&amp;#39;t loaded correctly. Optimally the load capacitors should be the value of Ccap in the following formula, where CL is the load capacitance of the crystal in the datasheet.&amp;nbsp;&lt;strong&gt;Ccap = 2 * CL - 4pF&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Some pins on the nRF52832 isn&amp;#39;t soldered correctly and thus the nRF52832 isn&amp;#39;t behaving as expected. Please double and triple check all the soldering pads.&lt;/li&gt;
&lt;li&gt;The HF clock could drift or be disturbed by noise due to a bad ground layer on your custom PCB. Make sure there are plenty of vias between the GND layers and that there aren&amp;#39;t any &amp;quot;lone&amp;quot; areas that aren&amp;#39;t well connected to GND.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>