This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SPI Clock initialization api

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 in the SDK where the clock is actually getting calibrated / initialised

Parents Reply
  • Hi,

    Aadishri GS said:
    I wanted to know if for SPI, clock is automatically provided based on the frequency provided in PSEL.CLK

    The clock in PSEL.CLK is generated by the nRF52840 when using the SPI master peripheral. The number configured in FREQUENCY register will decide what frequency will be output on CLK pin.

    Aadishri GS said:

    This is what the documentation says: "Automatic internal oscillator and clock control, and distribution for ultra-low power" under Section 5.4: CLOCK — Clock control

    Please clarify

     There are two clock controllers, HFCLK controller and LFCLK controller, in the clock control.  LFCLK controller supports 32.768 kHz RC oscillator (LFRC) which has ultra-low power (ULP) mode.

    -Amanda

     

Children
No Data
Related