I'm running an MK60FN1M0VLQ12 device from an 8MHz external crystal and so far, things have been working well.
I followed one of the examples from the Reference Manual (section 126.96.36.199) to set up the MCG, SIM and OSC modules. The example shows moving from FEI mode through to PEE mode with a 16MHz crystal with an 128MHz MCGOUTCLK. Similar in fashion to my requirements, I made some tweaks to get my output to 120MHz from the 8MHz clock but everything else is the same.
I'm trying to get a USB CDC example up and running based on some code provided by IAR Systems which appears to work well on the K60 Tower System but when I attempt to port the code over to my device, I always get a "USB device not recognized" error within Windows. I'm assuming that it can only be clock related and that for some reason, the USB isn't getting the 48MHz from my 8MHz external reference (120MHz PLL).
I know for a fact that my CPU is running at 120MHz so I'm currently stumped for clues as to where to look next.
One thing I have noticed is that the Reference Manual states that when setting PRDIV0, to divide down the external reference clock, the resulting frequency for the PLL must be in the range of 8-16MHz. I'm using a PRDIV0 of 1 (divide by 2) and a VDIV0 of 14 (multiply by 30) to give my 120MHz however this would mean that after the PRDIV0, the PLL would be only 4MHz, outside of the range.
Can anyone offer any suggestions as to what I could try?
This isn't an MQX project.
Thanks in advance,