<?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>SPI Clock initialization api</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47255/spi-clock-initialization-api</link><description>I am planning to use clock 16Mhz. I went through examples and found nrfx_spim to be using this option 
 But nowhere in the code I could pinpoint exactly how the clock itself is getting initialised to provide this frequency. Can I get the code snippet</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 May 2019 10:51:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47255/spi-clock-initialization-api" /><item><title>RE: SPI Clock initialization api</title><link>https://devzone.nordicsemi.com/thread/187194?ContentTypeID=1</link><pubDate>Wed, 15 May 2019 10:51:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:274391b9-ef0c-4e4b-b885-287b1904a507</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span lang="nb-NO"&gt;Hi,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="nb-NO"&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="Aadishri GS"] I wanted to know if for SPI, clock is automatically provided based on the&amp;nbsp;frequency provided in PSEL.CLK[/quote]
&lt;p&gt;&lt;span lang="nb-NO"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="nb-NO"&gt;The clock in PSEL.CLK is generated by the nRF52840 when using the SPI master peripheral. The number configured in &lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/spi.html?cp=3_0_0_5_23_1#register.FREQUENCY"&gt;&lt;span lang="en-US"&gt;FREQUENCY&lt;/span&gt;&lt;/a&gt;&lt;span lang="nb-NO"&gt; register will decide what frequency will be output on CLK pin.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span lang="nb-NO"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;[quote user="Aadishri GS"][/quote]&lt;/p&gt;
&lt;p&gt;This is what the documentation says: &amp;quot;&lt;em&gt;Automatic internal oscillator and clock control, and distribution for ultra-low power&lt;/em&gt;&amp;quot; under &lt;em&gt;Section 5.4:&amp;nbsp;CLOCK — Clock control&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Please clarify&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;There are two clock controllers, HFCLK controller and LFCLK controller, in the clock control.&amp;nbsp; LFCLK controller supports &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/clock.html?cp=3_0_0_4_3_1_0#concept_acb_q5y_2q"&gt;32.768 kHz RC oscillator (LFRC)&lt;/a&gt;&amp;nbsp;which has ultra-low power (ULP) mode.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;-Amanda&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Clock initialization api</title><link>https://devzone.nordicsemi.com/thread/187110?ContentTypeID=1</link><pubDate>Wed, 15 May 2019 05:31:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ac40d24-a70f-4553-a992-51e26800381d</guid><dc:creator>Aadishri GS</dc:creator><description>&lt;p&gt;Yes, but I wanted to know if for SPI, clock is automatically provided based on the&amp;nbsp;frequency provided in PSEL.CLK&lt;/p&gt;
&lt;p&gt;This is what the documentation says: &amp;quot;&lt;em&gt;Automatic internal oscillator and clock control, and distribution for ultra-low power&lt;/em&gt;&amp;quot; under &lt;em&gt;Section 5.4:&amp;nbsp;CLOCK &amp;mdash; Clock control&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Please clarify&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SPI Clock initialization api</title><link>https://devzone.nordicsemi.com/thread/186982?ContentTypeID=1</link><pubDate>Tue, 14 May 2019 13:03:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d0a18ca-35d9-46a5-b71a-db5b56967f96</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Software Development Kit" href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/hardware_driver_clock.html?resultof=%22%63%6c%6f%63%6b%22%20%22%69%6e%69%74%69%61%6c%22%20%22%69%6e%69%74%69%22%20"&gt;nRF5 SDK v15.3.0: Clock&lt;/a&gt;&amp;nbsp;describes how the clock driver&amp;nbsp;&lt;span&gt;performs&lt;/span&gt; &lt;span&gt;initial&lt;/span&gt;&lt;span&gt;ization&lt;/span&gt;&amp;nbsp;and &lt;span&gt;calibration&lt;/span&gt; in the SDK.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Amanda&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>