File tree 1 file changed +5
-4
lines changed
src/modm/board/samv71_xplained_ultra
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ using namespace modm::platform;
25
25
26
26
struct SystemClock
27
27
{
28
- // 300MHz system clock generated by PLLA from internal Rc 12MHz clock
28
+ // 300 MHz system clock generated by PLLA from external 12 MHz crystal
29
29
static constexpr uint32_t PllAMult = 25 ;
30
30
static constexpr uint32_t Frequency = 300_MHz;
31
31
static constexpr uint32_t Mck = Frequency / 2 ; // 150 MHz max.
@@ -35,10 +35,11 @@ struct SystemClock
35
35
static bool inline
36
36
enable ()
37
37
{
38
- ClockGen::setFlashLatency<Frequency / 2 >(); // Flash runs off MCK
38
+ ClockGen::setFlashLatency<Mck>();
39
+
40
+ ClockGen::enableMainExternalCrystal<12_MHz>(std::chrono::microseconds{1000 });
41
+ ClockGen::selectMainClockSource (MainClockSource::External);
39
42
40
- ClockGen::enableMainInternal (MainInternalFreq::Rc12Mhz);
41
- ClockGen::selectMainClockSource (MainClockSource::Internal);
42
43
ClockGen::enablePllA<PllAMult>();
43
44
ClockGen::selectMasterClk<MasterClkSource::PLLA_CLK, MasterClkPrescaler::CLK_1, MasterClkDivider::Div2>();
44
45
ClockGen::updateCoreFrequency<Frequency>();
You can’t perform that action at this time.
0 commit comments