<?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>nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106050/nrf52833-custom-board-hard-fault-when-using-bluetooth</link><description>Hello, 
 I am trying to get into Zephyr development and for my project I have created a custom board based on nRF52833 QDAA (40 pin). I have been successfully able to verify the board functionality using the nRF5 SDK by using some of the examples provided</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Jan 2024 21:53:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106050/nrf52833-custom-board-hard-fault-when-using-bluetooth" /><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/462992?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2024 21:53:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09975bca-9729-43c8-b629-0d6ec46b588d</guid><dc:creator>Kesims</dc:creator><description>&lt;p&gt;Hey, I have just received a revision of my board with slight improvements to the PCB layout and everything seems to be running as expected now. One more time, thank you for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/459342?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2023 11:44:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6ff324a-1adf-4b4a-888b-e83ddbd268e1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for the update! It might be a good idea to create a new&amp;nbsp;support ticket requesting a review of your board layout. Although I haven&amp;#39;t examined the schematics,&amp;nbsp;the behaviour you describe suggests there could be an issue with the placement of your crystal or the routing. These things can lead to a marginal clock signal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/459256?ContentTypeID=1</link><pubDate>Wed, 06 Dec 2023 19:56:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:680450c4-3262-4dfe-b564-9075af3d8074</guid><dc:creator>Kesims</dc:creator><description>&lt;p&gt;I do not have any breakpoints set, and I am using only printk() for debug.&lt;br /&gt;&lt;br /&gt;mpsl_clock_hfclk_latency_set() seems to run fine. This debug code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void main(void)
{
    mpsl_clock_hfclk_latency_set(MPSL_CLOCK_HF_LATENCY_WORST_CASE);
    printk(&amp;quot;HFCLKSTAT: %s\n&amp;quot;, to_binary(*hfclkstat));

    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;
    int counter = 1000000;
    while(NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0 &amp;amp;&amp;amp; counter-- &amp;gt; 0);
//    while(NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0);
    NRF_TIMER1-&amp;gt;TASKS_CAPTURE[0] = 1;

    printk(&amp;quot;HF Clock has started. Startup time: %d uS\n&amp;quot;, NRF_TIMER1-&amp;gt;CC[0]);
}&lt;/pre&gt;&lt;br /&gt;is able to get to the end and prints out:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v2.5.0 ***
HFCLKSTAT: 00000000000000010000000000000000
HF Clock has started. Startup time: 250000 uS&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;... just timing out at the counter when trying to start up the crystal - otherwise it gets stuck in the while loop.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Today I have been very lucky as I have been able to get my hands on a very similar board to what I am working with, also with nRF52833 QDAA and without DCDC. I have tried the exact same code and have been able to run everything just fine, with crystal starting after 361 us, therefore I believe the issue is related to physical layout of my board - I have probably messed something up so that it just barely works under some circumstances, but not under others. (I have also done more thorough testing of my board and found out that even though it is somewhat working with the CONFIG_BT_LL_SW_SPLIT=y, there still seems to be a pretty large packet loss). &lt;br /&gt;&lt;br /&gt;As I am still in high school (that is not even EE focused), I make quite a lot of errors and I believe my current board might need a slight redesign - it was my first attempt to design a tiny low power board based on flex PCB and it simply might be on the edge of working state...&lt;br /&gt;&lt;br /&gt;Thank you very much, your time and help was very valuable for me! I will add a response to this thread once I will be able to get my new prototype board, hopefully with better design.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/459141?ContentTypeID=1</link><pubDate>Wed, 06 Dec 2023 10:55:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f016eba-204c-45b4-8e33-c4879538aa6d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Please try to call mpsl_clock_hfclk_latency_set() with MPSL_CLOCK_HF_LATENCY_WORST_CASE and see if you encounter the same assert. I&amp;#39;m still confused as to why the Softdevice and Zephyr controller are seemingly able to use the HFXO, while you are not able to start the crystal &amp;#39;manually&amp;#39; with my code snippet. Also, when testing this, make sure you don&amp;#39;t have any breakpoints set. The CPU should not be halted when the Bluetooth stack is enabled, as this will break the real-time requirements of the controller, which can lead to random asserts.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/459059?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2023 17:09:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce1f4f37-68f5-414a-ac91-96d6d7e2ca62</guid><dc:creator>Kesims</dc:creator><description>&lt;p&gt;The DCDC was in fact set to y. I have messed up when copying KConfig from the nRF52833DK board.&lt;/p&gt;
&lt;p&gt;Unfortunately fixing it did not help, even after that the HFCLKSTAT SRC is still 0 and not working :/ ...&lt;br /&gt;&lt;br /&gt;The schematic is based on the circuit configuration no. 6 example for QFN40 (Product specification page 594).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/458874?ContentTypeID=1</link><pubDate>Tue, 05 Dec 2023 08:01:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcdcb37f-6f79-487a-9654-62dbbdbc16f0</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Yes, &amp;#39;0&amp;#39; means the CPU is running off the internal oscillator. However, this makes it even more strange that your program got stuck waiting for the &amp;#39;EVENTS_HFCLKSTARTED&amp;#39; event. The crystal is clearly able to ramp up when using the old SDK and with the Zephyr controller.&lt;/p&gt;
&lt;p&gt;From the schematics, I noticed that you have not mounted the optional inductors for the DCDC regulator. Please confirm that the DCDC is not enabled by ensuring that CONFIG_BOARD_ENABLE_DCDC=y is not set in the .config output file&amp;nbsp;in build/zephyr/&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/458816?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2023 18:03:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a742938-6a19-4dfa-9fab-5d4a55b87689</guid><dc:creator>Kesims</dc:creator><description>&lt;p&gt;HFCLKSTAT SRC is 0, meaning the device is probably using the internal oscillator?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/458701?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2023 10:34:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17cb094f-b19f-41f7-af8d-6856af4c12b5</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming. This suggests that the crystal is working correctly. If it was giving the wrong frequency, you would not be able to see the advertisements or connect to the device. Before starting the crystal, please check if the XTAL bit is set in&amp;nbsp;&lt;a title="HFCLKSTAT" href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/clock.html?cp=5_1_0_4_3_2_16#register.HFCLKSTAT"&gt;HFCLKSTAT&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/458666?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2023 08:31:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:053223b5-ee56-4cfa-a65f-96a3c5b32c38</guid><dc:creator>Kesims</dc:creator><description>&lt;p&gt;Yes, the Buetooth communication works fine when this option is enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/458664?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2023 08:27:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d616c33d-e4de-454e-8239-1cae25d21106</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="Kesims"]I have also figured out that I can start the device and run BT on it when I enable CONFIG_BT_LL_SW_SPLIT=y&amp;nbsp; in the prj.conf[/quote]
&lt;p&gt;Are you able to discover and establish a Bluetooth connection with your board?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/458621?ContentTypeID=1</link><pubDate>Sun, 03 Dec 2023 14:03:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eda59fbf-dbc1-41d8-8cb8-43c95882ff89</guid><dc:creator>Kesims</dc:creator><description>&lt;p&gt;First of all, thank you very much for your response.&lt;br /&gt;&lt;br /&gt;It seems like the crystal is not starting at all? The code gets stuck in the while loop. I have tried replacing the crystal as well as capacitors, but no luck so far.&lt;br /&gt;&lt;br /&gt;I am using the following crystal, I suppose that should be alright? &lt;a id="" href="https://www.lcsc.com/product-detail/Crystals_HD-7E032000F01_C655046.html"&gt;https://www.lcsc.com/product-detail/Crystals_HD-7E032000F01_C655046.html&lt;/a&gt; Originally I have tried starting it up with 8pF capacitors, later with 12pF capacitors, without any success.&lt;br /&gt;&lt;br /&gt;I have also figured out that I can start the device and run BT on it when I enable CONFIG_BT_LL_SW_SPLIT=y&amp;nbsp; in the prj.conf&lt;br /&gt;&lt;br /&gt;Do you by any chance have any other ideas? I might as well try to assemble one more prototype board just to make sure it is not some weird hardware issue caused by repeated re-soldering of some components on the current board...&lt;br /&gt;&lt;br /&gt;UPDATE: The issue is unfortunately present on both prototypes. Unfortunately don`t have an oscilloscope at home to check what is going on... I will have an access to one during the week though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52833 custom board Hard Fault when using Bluetooth</title><link>https://devzone.nordicsemi.com/thread/457537?ContentTypeID=1</link><pubDate>Mon, 27 Nov 2023 11:58:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f24ba30-ab83-4eeb-9c6e-a54fd1195e88</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello &lt;span&gt;Matej&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;Please try to measure the startup time of your 32M crystal as I suggested in this post:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/102119/mpsl-assert-112-2134-if-using-multiple-ble-communication/437657"&gt;RE: MPSL ASSERT: 112, 2134 if using multiple BLE communication&lt;/a&gt;&amp;nbsp;. The MPSL assertion indicates that the crystal oscillator was not active when it was supposed to.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>