<?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>nRF5340 with DS3231 as LXFO</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128181/nrf5340-with-ds3231-as-lxfo</link><description>Hi, 
 I would like to seek a guidance with proper usage of DS3231 as LFXO with nRF5340. 
 HW: 
 Custom board, DS3231 32kHz output connected to nRF&amp;#39;s X1 with pull-up resistor. X2 floating. INT/SQW floating (we don&amp;#39;t need sub-seconds accuracy). Both SOC</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Jul 2026 20:49:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128181/nrf5340-with-ds3231-as-lxfo" /><item><title>RE: nRF5340 with DS3231 as LXFO</title><link>https://devzone.nordicsemi.com/thread/569130?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2026 20:49:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15d78272-000c-4a3e-8898-a09cc2671f0b</guid><dc:creator>reavertm</dc:creator><description>&lt;p&gt;Sorry for long reply. Works as expected indeed. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 with DS3231 as LXFO</title><link>https://devzone.nordicsemi.com/thread/567207?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2026 12:40:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a742115b-5a75-469f-b74b-a276fa1c68e9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;&lt;span&gt;I would expect the peaks to be at VDD. Are you able to swap out&amp;nbsp;the 100K&amp;nbsp;resistor with a smaller value (10 k or 4.7 kOhm) and see if the signal improves with a stronger pull up resistor? It also looks like the oscilloscope&amp;#39;s sample rate may be too low to accurately capture the waveform.&lt;/span&gt;&lt;/p&gt;
[quote user="reavertm"]&amp;quot;If two instances of the LFCLK control system request different LFCLK sources, the power and clock subsystem will secure that the most accurate of the requested LFCLK sources is selected.&amp;quot; doesn&amp;#39;t work?[/quote]
&lt;p&gt;Yes, LFXO will be used by the system when active. But you should avoid selecting different clock sources in your project. One problem with selecting the LFRC source is that this will enable periodic clock calibration&amp;nbsp;against HFXO.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 with DS3231 as LXFO</title><link>https://devzone.nordicsemi.com/thread/567159?ContentTypeID=1</link><pubDate>Mon, 01 Jun 2026 05:29:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66f31b10-0176-49a9-92f7-e9fc702b6302</guid><dc:creator>reavertm</dc:creator><description>&lt;p&gt;It somewhat works but also doesn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;I want my bootloaders to use RC (more compatible, and&amp;nbsp;there are no timestamps printed there so I don&amp;#39;t care), so I left mcuboot and b0n to use internal load capacitor and RC clock in config. They also never touch my DS3231 RTC over I2C.&lt;/p&gt;
&lt;p&gt;I am only setting BYPASS=1 in SYS_INIT and selecting XTAL of my main app on App core. I assumed ipc_radio will get it anyway, per [1]:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;If two instances of the LFCLK control system request different LFCLK sources, the power and clock subsystem will secure that the most accurate of the requested LFCLK sources is selected.&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span&gt;My main app on boot reads RTC from DS3221 over I2C and immediately calls&amp;nbsp;clock_settime(CLOCK_REALTIME, ..).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And when I print clock control registers in my main app, I get:&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span&gt;BYPASS=1 LFCLKSRC=2 LFCLKRUN=1 LFCLKSRCCOPY=2 LFCLKSTAT={SRC=2 ALWAYSRUNNING=0 STATE=1}&lt;br /&gt; &lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;So everything looks fine on app core, after a week system time drift is within 1s.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;But BLE (that is running on ipc_radio) silently stops working or at least it appeas so as I cannot connect anymore with paired BLE client.&lt;/strong&gt; I don&amp;#39;t have debug logs from Net core unfortunately so can only guess so far.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When I trigger some BLE HCI command (in ex by triggering pairing, so reconfiguration of sending advertisement packets with different allowlist), app core crashes with:&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2026-05-31T16:00:46.184Z &amp;lt;dbg&amp;gt; [sysworkq] main: stop_advertising_work_handler: &lt;br /&gt;ASSERTION FAIL [err == 0] @ WEST_TOPDIR/external/zephyr/subsys/bluetooth/host/hci_core.c:504&lt;br /&gt; &lt;strong&gt;Controller unresponsive, command opcode 0x200a timeout with err -11&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Would that be because Net core uses different LFXO (RC) and somehow got de-synchronized with App over time?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt; I did not configure ipc_radio to request LFXO and if cores got indeed desynchronized then maybe:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;If two instances of the LFCLK control system request different LFCLK sources, the power and clock subsystem will secure that the most accurate of the requested LFCLK sources is selected.&amp;quot; doesn&amp;#39;t work?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Or there is race condition because maybe ipc_radio is booted first (because b0n booted it sooner than mcuboot booted main app), ipc_radio requested LFCLK, got RC (because higher accuracy LFXO was not available yet), then main app booted and requested LCFLK, got LFXO, but it happened too late for ipc_radio to pick it up? I wil test this but would like to know how it&amp;#39;s supposed to work because reference manual is not fully clear on this, in ex whether cores can run on different low frequency clocks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Also, what is expected voltage level on signal on X1 vs VDD in case of rail-to-rail external LFXO and expected signal shape for&amp;nbsp; X1 in such configurtation on nRF5340 ?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;My nRF5340 runs on VDD=3.3, 100k pull-up resistor on X1 brings down external 32KHz down to 1,64V.&amp;nbsp;&lt;/span&gt;&lt;span&gt;It is also a pulse, not square. Does it need to be square? Oscilloscope output below:&lt;/span&gt;&lt;span&gt;&lt;a href="https://sigmalabsspace-my.sharepoint.com/:i:/g/personal/mm_sigmalabs_space/IQD6W31HrNnIQa_RitHxun7gARYtonXIpmae9V0hVFD23co?e=6yWxc3"&gt;sigmalabsspace-my.sharepoint.com/.../IQD6W31HrNnIQa_RitHxun7gARYtonXIpmae9V0hVFD23co&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;LLM in typical overly confident manner says that resistor is too strong and I should get it closer to 3.3V and it&amp;#39;s root cause for BLE not working. But it sounds like nonsense to me, if I indeed have &amp;quot;significant parasitic capacitance&amp;quot; on X1, and external LFXO is not interpreted correctly by nRF, it would fail to keep system time stable on App core all the same&amp;nbsp; - I think -&amp;nbsp;but that one appears to work fine.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;Thanks in advance!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;1.&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf5340/page/chapters/clock/doc/clock.html"&gt;docs.nordicsemi.com/.../clock.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 with DS3231 as LXFO</title><link>https://devzone.nordicsemi.com/thread/566581?ContentTypeID=1</link><pubDate>Wed, 20 May 2026 07:24:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8efaeb24-58f8-4875-888b-3237cdacc0d7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The clock driver does not support external clock sources, but you should be able to&amp;nbsp;work around this by setting the bypass register early on boot before the clock driver init as Bendik suggested in the post you linked (&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/119503/clock-control-configuration-confirmation"&gt;Clock Control Configuration Confirmation&lt;/a&gt;).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suggest you start with something simple like the &amp;quot;Hello World&amp;quot; sample first to verify that you are able to run it with your external clock source (CLOCK_CONTROL_NRF_K32SRC_XTAL must be set to =y). Since the system timer used by Zephyr relies on this clock source, the program will not&amp;nbsp;reach main() unless the LF clock was started (this assumes the default CONFIG_SYSTEM_CLOCK_WAIT_FOR_STABILITY is selected).&lt;/p&gt;
[quote user=""]&lt;div&gt;how should devicetree and config&amp;nbsp;look like for RC bypass to work?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;I suppose&amp;nbsp;I need&lt;/div&gt;[/quote]
&lt;p&gt;Yes, you should select &amp;quot;external&amp;quot; for the load caps.&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>