<?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>Can softdevice and cli module coexist?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81893/can-softdevice-and-cli-module-coexist</link><description>Hi, 
 I&amp;#39;m trying to migrate bluetooth softdevice to a project contained cli module. I found cli module and softdevice would all create an app timer. The softdevice first created, then the cli module created would cause a crash. 
 My question is whether</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 22 Nov 2021 09:41:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81893/can-softdevice-and-cli-module-coexist" /><item><title>RE: Can softdevice and cli module coexist?</title><link>https://devzone.nordicsemi.com/thread/339986?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 09:41:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f6b28e6d-3d88-4b0f-a983-79409a7ac9eb</guid><dc:creator>ChengCheng</dc:creator><description>&lt;p&gt;Got it. Big thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can softdevice and cli module coexist?</title><link>https://devzone.nordicsemi.com/thread/339955?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 07:54:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a6dbb14-7098-4b63-8824-6fd046b42852</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The clock driver behaves differently when using SoftDevice or not, so depending on how you request the LFCLK (?) that can cause problems. If your application anyway should have the SoftDevice enabled at all times, then simply initialize the SoftDevice before other libraries (though you probably want logging at the very beginning).&lt;/p&gt;
&lt;p&gt;(Also, note that the SoftDevice will always keep the LFCLK running, so there is no need to explicitly request it as long as your app always use a SoftDevice).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can softdevice and cli module coexist?</title><link>https://devzone.nordicsemi.com/thread/339942?ContentTypeID=1</link><pubDate>Mon, 22 Nov 2021 05:53:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8381d4cb-3516-4f9d-9e07-5b75c8178105</guid><dc:creator>ChengCheng</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;buddy,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for your reply. I fixed this issue, but&amp;nbsp;I found if request a LFCLK before&amp;nbsp;initializing the softdevice would cause a crash. So what&amp;#39;s the root cause? Thank you!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can softdevice and cli module coexist?</title><link>https://devzone.nordicsemi.com/thread/339807?ContentTypeID=1</link><pubDate>Fri, 19 Nov 2021 11:36:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:918073ec-b6b7-4127-bfb8-2200e7247f29</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]My question is whether softdevice and cli module can coexist? [/quote]
&lt;p&gt;Yes, there is no problem combining CLI and SoftDevice. That is for instance done in the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/ble_sdk_app_interactive.html"&gt;BLE Interactive Command Line Interface Example&lt;/a&gt;.&lt;/p&gt;
[quote user=""]How should the clock module be configured in this &lt;span&gt;scenario? &lt;/span&gt;[/quote]
&lt;p&gt;Like in any other example that use a SoftDevice. For the LFCLK this is started when the SoftDevice runs, and always continue to run. The HFXO can be requested if the application needs it, typically using the clock driver.&lt;/p&gt;
[quote user=""]The app&amp;nbsp;timers just only depend on RTC1, can this be configured&amp;nbsp;?[/quote]
&lt;p&gt;The app_timer implementation is hard coded to use RTC1. It would be possible to modify it to use another RTC, but I do not see a good reason for that. If you need to use an RTC in your app, pick a different one. The nRF52840 has three RTCs. RTC0 is reserved for the SoftDevice when that is used. RTC1 for the app_timer. RTC2 you can use for&amp;nbsp;anything.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>