Hi peter twiss,
If you are using the PE code, you'd better mention it in the Floor 1.
The clock stable means you finish the clock module switching.
Which clock source you are using now? external crystal or the internal osc? What the clock mode you are using when you get 5.99Mhz? FEI? And switch to which clock mode to get the 48Mhz core?PEE?
When do the MCG mode swithing ,you need to follow this diagram:

As you know, the source clock of I2C module is from system clock or the bus clock, if the system clock or bus clock is changed, the I2C baud must be changed.Then you'd better disable the I2C module when you want to change the MCG mode, after you finish the MCG mode changing ,then reconfigure your I2C mode again and enable it.
About the clock mode changing PE code, please find it from the attached code:cpu.zip
Wish it helps you!
If you still have question, please contact with me!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------