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)
61
61
int32_t slope_k = (int32_t )(slope_field_k ^ slope_sign_k ) - (int32_t )slope_sign_k ;
62
62
63
63
/* As specified in the nRF54L15 PS:
64
- * CAPVALUE = round( (CAPACITANCE - 4 ) * (FICR->XOSC32KTRIM.SLOPE + 0.765625 * 2^9)/(2^9)
64
+ * CAPVALUE = round( (2* CAPACITANCE - 12 ) * (FICR->XOSC32KTRIM.SLOPE + 0.765625 * 2^9)/(2^9)
65
65
* + FICR->XOSC32KTRIM.OFFSET/(2^6) );
66
66
* where CAPACITANCE is the desired capacitor value in pF, holding any
67
67
* value between 4 pF and 18 pF in 0.5 pF steps.
@@ -82,7 +82,7 @@ static inline void power_and_clock_configuration(void)
82
82
* offset_k should be divided by 2^6, but to add it to value shifted by 2^9 we have to
83
83
* multiply it be 2^3.
84
84
*/
85
- uint32_t mid_val = (cap_val_encoded - 4UL ) * (uint32_t )(slope_k + 392UL )
85
+ uint32_t mid_val = (2UL * cap_val_encoded - 12UL ) * (uint32_t )(slope_k + 392UL )
86
86
+ (offset_k << 3UL );
87
87
88
88
/* Get integer part of the INTCAP code */
You can’t perform that action at this time.
0 commit comments