clock mode is PEE, 12MHZ crystal. init code is generated under PE, External crystal doesnot work , and program halts at "while((MCG_S & MCG_S_IREFST_MASK) != 0x00U) " //Check that the source of the FLL reference clock is the external reference clock., this is why?
MCG_C2 to either have the MCG_C2_HGO set or fnot (high gain crystal mode or low gain crystal mode).
This depends on the HW design - if the crystal has a parallel resistor and loading capacitors MCG_C2_HGO is needed for it to start but otherwise it should not be used so that it starts.