File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ static inline void power_and_clock_configuration(void)
6161 int32_t slope_k = (int32_t )(slope_field_k ^ slope_sign_k ) - (int32_t )slope_sign_k ;
6262
6363 /* As specified in the nRF54L15 PS:
64- * CAPVALUE = round( (2* CAPACITANCE - 12 ) * (FICR->XOSC32KTRIM.SLOPE + 0.765625 * 2^9)/(2^9)
64+ * CAPVALUE = round( (CAPACITANCE - 4 ) * (FICR->XOSC32KTRIM.SLOPE + 0.765625 * 2^9)/(2^9)
6565 * + FICR->XOSC32KTRIM.OFFSET/(2^6) );
6666 * where CAPACITANCE is the desired capacitor value in pF, holding any
6767 * value between 4 pF and 18 pF in 0.5 pF steps.
@@ -82,7 +82,7 @@ static inline void power_and_clock_configuration(void)
8282 * offset_k should be divided by 2^6, but to add it to value shifted by 2^9 we have to
8383 * multiply it be 2^3.
8484 */
85- uint32_t mid_val = (2UL * cap_val_encoded - 12UL ) * (uint32_t )(slope_k + 392UL )
85+ uint32_t mid_val = (cap_val_encoded - 4UL ) * (uint32_t )(slope_k + 392UL )
8686 + (offset_k << 3UL );
8787
8888 /* Get integer part of the INTCAP code */
You can’t perform that action at this time.
0 commit comments