The USB can only work at 48MHz.
You should start from a working evaluation board that supports USB and copy the crystal frequency it uses and how any demo code sets up the CPU.
The only USB clock source options are in Table 16-35. USB_CTRL Field Descriptions". The only clock you can use is "11 System clock source (MCGPLLSCLK)". So MCGPLLSCLK has to be 48MHz and you then have the option of setting MCGOUT to the external crystal frequency or 48MHz divided by 1, 2, 4 or 8.
" (Fext/R)*(M/B)"
FMCGOUT doesn't matter. The USB runs from MCGPLLSCLK. So you can ignore "B" for now.
R is 2^n, so 1, 2, 4, 8, 16, 32 ...
M is 4*N.
(12/R)*M = 48, so M/R=4. That gives 4/1, 8/2, 16/4 or 32/8.
Fext/R has to be between 1 and 2MHz, so the only one of the above that satisfies that is 32/8.
So R=8, M=32 and set "B" to whatever speed you want the CPU (from MCGOUT) and other peripherals (from BUSCLK, which is MCGOUT/2) to run at.
> i've also working with SPI comunications (uSD interfacing), and UART comunications,
> so i need to know exactly wich is bus frecuency to change both baud rating.
You should write your code so that those modules (and all the timer modules) derive their clock rate and clock divider parameters from a master "#define", or better still, a master global or accessor function that returns the current clock rate in convenient units (MHz usually). That way they can work no-matter what you change the clocking to, and can even handle any on-the-fly clock speed changes that you might make for power saving reasons.
Tom