<?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>Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81418/bug-in-ncs-v1-7-1-with-32khz-rc-oscillator-and-mcuboot-enabled</link><description>Well, this one took me many hours of tracing to track down the root cause, so I hope it helps someone! 
 Note: I wasn&amp;#39;t able to reproduce this directly with a sample included in the nRF Connect SDK. But it happens with my application, based on the &amp;quot;light_ctrl</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 10 Sep 2024 14:20:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81418/bug-in-ncs-v1-7-1-with-32khz-rc-oscillator-and-mcuboot-enabled" /><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/501962?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 14:20:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9f8a8d8-7097-41fb-aad9-2d7075978d32</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for sharing a link to the thread with the issue you are currently facing. Please continue the discussion in that new thread.&lt;/p&gt;
&lt;p&gt;If you see any similarities between the issue you are currently facing and the issues discussed in this older thread, then please link to this thread from the new one, and describe what are the similarities.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/501884?ContentTypeID=1</link><pubDate>Tue, 10 Sep 2024 10:26:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04c2a17d-4764-4620-9b9e-3e11d82de2e9</guid><dc:creator>fafeyto</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/114520/nrf52832-dfu-ble-with-rc-oscillator"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/114520/nrf52832-dfu-ble-with-rc-oscillator&lt;br /&gt;&lt;br /&gt;I&lt;/a&gt;&amp;nbsp;have similar problem but could not fixed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/501424?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2024 18:13:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7ce8c3a-f53c-4b13-928d-c87124d62e21</guid><dc:creator>Droidik</dc:creator><description>&lt;p&gt;What exactly do you mean?&lt;br /&gt;The solution is clearly written in the last response + it has been fixed over 3 years ago.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/501385?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2024 13:31:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6462f7d-b23d-498e-9ac3-38db7da3dcd0</guid><dc:creator>fafeyto</dc:creator><description>&lt;p&gt;I am having the same problem. Any progress?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/340794?ContentTypeID=1</link><pubDate>Thu, 25 Nov 2021 17:00:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3056d30b-df01-4e5a-a7d2-4eecba2cd98a</guid><dc:creator>Droidik</dc:creator><description>&lt;p&gt;&lt;em&gt;&amp;quot;We&amp;#39;ve not noticed anything yet after a week or two.&amp;quot;&lt;br /&gt;&lt;/em&gt;Thank&amp;nbsp;you for sharing this helpful info, I&amp;#39;ll probably also solve it this way.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&amp;quot;The temp_nrf5 files doesn&amp;#39;t seem to handle calibration&amp;quot;&lt;br /&gt;&lt;/em&gt;No, it does not directly, but the calibration code needs to sample temperature from nrf&amp;#39;s internal temperature sensor, so that&amp;#39;s the reason.&lt;br /&gt;&lt;br /&gt;Yes, the root cause is that the calibration now requires a multithreading support, but the dependency between the&amp;nbsp;&lt;span&gt;&lt;strong&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION&lt;/strong&gt; and&amp;nbsp;&lt;strong&gt;CONFIG_MULTITHREADING&lt;/strong&gt;&amp;nbsp;config options is not defined in the code.&lt;br /&gt;It works in app builds because&amp;nbsp;&lt;strong&gt;CONFIG_MULTITHREADING&amp;nbsp;&lt;/strong&gt;is turned on by default and it doesn&amp;#39;t work in mcuboot builds because mcuboot&amp;#39;s config explicitly disables it &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;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/340611?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 19:45:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8540d118-24bc-4cbe-8c02-6f6375f8e26e</guid><dc:creator>optimisedpd</dc:creator><description>&lt;p&gt;Yes, I think (although only intuitively) that the RC clock accuracy in MCUBoot shouldn&amp;#39;t be an issue. But could be wrong. We&amp;#39;ve not noticed anything yet after a week or two.&lt;/p&gt;
&lt;p&gt;I certainly think what you found could solve it - but maybe not the root cause. I think the root cause is more likely to be the calibration routine as Nordic said this is what changed, and it not being designed to support single threaded applications.&lt;/p&gt;
&lt;p&gt;Similar to this ticket, but for things to do with mutex/locks as in the error above instead of sleep;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/76899/zephyr-build-smp_svr-for-thingy52-fails"&gt;devzone.nordicsemi.com/.../zephyr-build-smp_svr-for-thingy52-fails&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/340609?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 19:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95dff3df-d4b5-46e3-8995-69a3fdedca74</guid><dc:creator>Droidik</dc:creator><description>&lt;p&gt;Thank you very much for the update!&lt;br /&gt;Yes, I mentioned there that it isn&amp;#39;t recommended, because the Zephyr docs say so: &amp;quot;&lt;em&gt;If calibration is disabled when RC is used for low frequency clock then accuracy of the low frequency clock will degrade. Disable on your own risk.&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;This makes sense for a functionality that requires higher precision clock like BLE, but I guess it&amp;#39;s OK to use it in mcuboot (that&amp;#39;s only my impression - feel free to correct me).&lt;br /&gt;&lt;br /&gt;I think I found the problem -&amp;nbsp;&lt;a href="https://github.com/mcu-tools/mcuboot/blob/main/boot/zephyr/Kconfig#L685"&gt;https://github.com/mcu-tools/mcuboot/blob/main/boot/zephyr/Kconfig#L682&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/340606?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 19:21:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:306bf5d1-0ca0-458e-bbc4-7dddab626493</guid><dc:creator>optimisedpd</dc:creator><description>&lt;p&gt;I also filed a private support case with Nordic and got some more info;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Okay, so it might not be due to a bug after all, but rather that the calibration routine for the 32kHz clock was changed (in nRFConnect SDk v1.6.0 I think). Basically, the 32kHz requires a calibration routine that depends on multithreading. So you will need to enable multithreading or disable the calibration in the sub-image that&amp;#39;s not compiling. The temp_nrf5 files doesn&amp;#39;t seem to handle calibration, but they do require multithreading, so please try enabling that in your application.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I would think one of the configs&amp;nbsp;&lt;/span&gt;&lt;span&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION&lt;/span&gt;&lt;span&gt;=n&amp;nbsp;&lt;/span&gt;&lt;span&gt;or CONFIG_MULTITHREADING=y would be sufficient here&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I ended up solving with&amp;nbsp;&lt;/span&gt;&lt;em&gt;CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC_CALIBRATION=n&lt;/em&gt;&lt;span&gt;&amp;nbsp;to avoid the size overhead of multithreading. However someone on the Zephyr bug does say this isn&amp;#39;t recommended. I&amp;#39;m not sure why but will post there.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Note: this only needs to be set for the MCUBOOT image, not the main image, i.e. adding to a&amp;nbsp;&lt;span&gt;&lt;span style="text-decoration:underline;"&gt;\child_image\mcuboot.conf&lt;/span&gt;&amp;nbsp;as per&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html&lt;/a&gt;&amp;nbsp;which then merges with the default MCUBOOT configuration.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/340605?ContentTypeID=1</link><pubDate>Wed, 24 Nov 2021 19:13:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9271425d-7793-42ce-b9ac-87ad15b2a221</guid><dc:creator>Droidik</dc:creator><description>&lt;p&gt;Identical (or very similar) bug is also tracked here - &lt;a href="https://github.com/zephyrproject-rtos/zephyr/issues/40538" rel="noopener noreferrer" target="_blank"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/40538&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/338806?ContentTypeID=1</link><pubDate>Fri, 12 Nov 2021 13:33:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5beffff7-1580-4ab9-91bd-b871fc68d3f7</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes, I think it would definitely be best to solve the build issue with the RC clock. The issue has been reported internally, and we are looking for a solution.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Bug in NCS v1.7.1 with 32kHz RC Oscillator and MCUboot enabled</title><link>https://devzone.nordicsemi.com/thread/337942?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 14:04:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd88356b-f53c-4b42-955b-db3d449096a4</guid><dc:creator>optimisedpd</dc:creator><description>&lt;p&gt;I later found the _SYNTH clock causes us issues with provisioning, so maybe this isn&amp;#39;t the best approach! It may be better to solve the build issues with the _RC clock.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>