Skip to content
  • Alexander Potashev's avatar
    RT74765. twr-k60n512: setup clocks · 5c122449
    Alexander Potashev authored
    Core/system clock rate: 100 MHz
    Peripheral clock rate:   50 MHz
    FlexBus clock rate:      50 MHz
    Flash clock rate:        25 MHz
    
    The PLL takes the 50 MHz on-board external clock from the EXTAL pin and
    feeds the MCGOUTCLK with a 100 MHz clock.
    
    On the Kinetis MCU, we have to sequentally switch between 3 clocking
    modes until we can enter the desired PEE mode (PLL Engaged External
    mode).
    
    The `KINETIS_MCG_C2_EREFS_MSK` and `KINETIS_MCG_C2_HGO_MSK` bits should
    be cleared, otherwise the Ethernet module of the MCU cannot send nor
    receive packets.
    
    Testing:
        `udelay(1000)` works correctly (tested by blinking the green LED.)
    5c122449