I think the AHB prescaler divisors are not correctly calculated.
The enum kinds here are mapped to four bits which are then used to left-shift the divisor in here.
However, there's a gap in the divisors, there is no Div32, but the bits-to-divisor calculation does not handle this gap.
This means, that when a prescaler of 64 or higher is used, the reported frequency is too high by a factor of 2.
I think the AHB prescaler divisors are not correctly calculated. The enum kinds here are mapped to four bits which are then used to left-shift the divisor in here. However, there's a gap in the divisors, there is no Div32, but the bits-to-divisor calculation does not handle this gap. This means, that when a prescaler of 64 or higher is used, the reported frequency is too high by a factor of 2.