Clock divider equations

nRF54LM20A | nRF54LM20B Datasheet

The following equations are used to select SCK and MCK frequencies.

In the following equations, the following notation is used:
  • fCK is the SCK or MCK frequency in Hz.
  • fsource is the frequency of the selected clock source, either ACLK or PCLK.
  • DIV is the CONFIG.SCK.DIV or CONFIG.MCK.DIV register value.

The first equation is used to calculate the value of CONFIG.MCK.DIV or CONFIG.SCK.DIV for a given source, and MCK or SCK frequency.

Figure 7. MCK and SCK clock frequency equation
MCK and SCK clock frequency equation

Because of rounding errors, an accurate MCK clock may not be achievable. The equation does not take into account the maximum register values of CONFIG.MCK.DIV or CONFIG.SCK.DIV.

The actual MCK or SCK frequency can be calculated using the equation below.

Figure 8. Actual MCK and SCK clock frequency
Actual MCK and SCK clock frequency

The clock error can be calculated using the equation below. The error e is the percentage difference from the requested fMCK or fSCK frequency.

Figure 9. MCK and SCK frequency error equation
MCK and SCK frequency error equation