File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -219,11 +219,11 @@ namespace klib::core::lpc175x::io::system {
219219 static_assert (PreDivider > 0 , " Invalid pre-divider" );
220220
221221 // calculate the fcco frequency using the oscilator and multiplier
222- constexpr static uint32_t partial_freq = (Freq * 2 * Multiplier) / klib::exp2 (static_cast <uint32_t >(PreDivider));
222+ constexpr static uint32_t partial_freq = (Freq * 2 * Multiplier) / klib::exp2 (static_cast <uint32_t >(PreDivider - 1 ));
223223
224224 static_assert (
225- (Multiplier == 1 ) || (partial_freq >= 156 '000'000 && partial_freq <= 320 '000'000 ),
226- " Invalid Fcco output. PLL frequency needs to be between 156 and 320mhz "
225+ (Multiplier == 1 ) || (partial_freq >= 275 '000'000 && partial_freq <= 550 '000'000 ),
226+ " Invalid Fcco output. PLL frequency needs to be between 275 and 550mhz "
227227 );
228228
229229 // calculate the final frequency
You can’t perform that action at this time.
0 commit comments