It seems ethernet needs 25MHz clock and USB needs 24MHz clock, and they could not work together. Am I right?
Yes! You can work from a 50MHz osc, then go down to 2MHz and derive to 96MHz. USB gets 48MHz for the internal PHY and Ethernet RMII mode works from external 50MHz osc. CPU works at 96MHz. External reference must be fixed to 50MHz if using Ethernet in RMII mode and more options if you run in Ethernet MII mode. All of this using a single reference. If you use RMII_CLKIN or USB_CLKIN you have even more options.
For your specific example, seems like you want to use Ethernet MII mode, then you only have to worry about USB 48MHz requirement. Ethernet MII mode gets 25MHz from PHY (TX_CLK and RX_CLK). Clk gets generated from the PHY. Then you'll be fine
Hope this helps.
Paolo is correct. We do this on a K70 and it works just fine.
I would check carefully the valid frequency ranges when using the K60/K70 120 or 150MHz FPU part since they are different to the K60 100M parts, for example.
Whereas the K60 100MHz part can divide the 50MHz clock first down to 2MHz (it needs 2MHz..4MHz) this is not in the valid frequency range for the K70 120MHz/150MHz, which requires it to be between 8 and 16MHz.
The K70 120M/150M parts also have an extra divide at the output of their VCO.
To run the K70 120MHz part at its maximum 120MHz system speed and generate 48MHz for USB the typical method is to divide the 50MHz PHY clock by 5 to 10MHz. Then multiply this by 24 to get 240MHz VCO output frequency (must be between 180MHz and 360MHz). The VCO output is automatically divided by 2 to give a 120MHz system clock.
Using the MCGPLL0CLK as source to derive the USB clock it requires a divide value of 4 in the SIM's CLKDIV2 setting with fractional flag set. That is 0x00000009 -> 120MHz * 2/(5) = 48MHz.
Retrieving data ...