USB_CLK internal source for MCF54418

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB_CLK internal source for MCF54418

Jump to solution
860 Views
eukeniurkiaga
Contributor II

Hi,

We want to add USB HOST functionality to our device, based on MCF54418. We want to use the pll divider as USB_CLK internal source. We are working with fvco=500MHz (the maximum). We have already tested all our system working with this frequency (NAND Flash controlle  fnfc = fvco / 14; flexbus  controller  fbus = fsys / 2 = fvco / 4 , and fsys = fvco / 2)

At page 8-8 (PLL Divide Register) in the "MCF5441x Reference Manual" I can read this in the OUTDIV4 bit field description:

 

"Note: If used as the USB clock source, the OUTDIV4 resulting frequency must be 60 MHz. This may require that fVCO be less than the maximum."

We have used OUTDIV4=7 and  fvco = 10 * 50MHz = 500MHz , so fusb = fvco / 8=62,5MHz.

With 62,5MHz The MQX USB Host Mass Storage Example works fine just by disabling the external peripheral clock for USB in usb_mcf5441.c:

_mqx_int _bsp_usb_host_init(struct usb_host_if_struct *usb_if)
{

................


//reg_ptr->CCM.MISCCR &= ~0x0001;

 

reg_ptr->CCM.MISCCR |= 0x0001; //PLL drives USB serial interface clocks

.........

}

It has been Luck? Could the usb host work without problems with 62,5MHz instead of 60MHz? Or It must be exactly 60MHz as I suppose by reading the note at the OUTDIV4 bit field description?

Is there anyway to achieve exactly 60MHz for fusb,internally without changing the other frequencies (already tested)?

Any suggestion?

Thanks in advance,

Regards,

Labels (1)
Tags (3)
0 Kudos
1 Solution
623 Views
miduo
NXP Employee
NXP Employee

Hi,

I'm afraid it shall be exactly 60 MHz and very precise (low jitter) due to USB specification requirements.

Notice the USB specifications states:

full speed data is clocked at 12.000 Mb/s with data signalling tolerance of +-0.25 %

low speed data is clocked at 1.500 Mb/s with data signalling tolerance of +-1.5 %

If look into MCF54418 Data Sheet, Table 14, you will see that peak to peak PLL jitter is 10 %.

That means it doesn't fit into the specification of USB bus. For this reason we recommend to use an external 60 MHz clock source to USB_CLKIN, which fits +-0.25%/+-1.5% requirement by USB specification.

I think at room temperature in lab you may work with 60MHz or even 62.5MHz from PLL, but the jitter is not guaranteed by the Data Sheet across process/voltage/temparature variations to meet USB bus specification requirement.

Back to the case when only internal PLL is available, make sure:

OUTDIV4 - if used as the USB clock source, the fVCO may require to be less than the maximum. fUSB = fVCO / (OUTDIV4+1). so you need to have fVCO = 480 MHz, OUTDIV4 = 7.

View solution in original post

3 Replies
624 Views
miduo
NXP Employee
NXP Employee

Hi,

I'm afraid it shall be exactly 60 MHz and very precise (low jitter) due to USB specification requirements.

Notice the USB specifications states:

full speed data is clocked at 12.000 Mb/s with data signalling tolerance of +-0.25 %

low speed data is clocked at 1.500 Mb/s with data signalling tolerance of +-1.5 %

If look into MCF54418 Data Sheet, Table 14, you will see that peak to peak PLL jitter is 10 %.

That means it doesn't fit into the specification of USB bus. For this reason we recommend to use an external 60 MHz clock source to USB_CLKIN, which fits +-0.25%/+-1.5% requirement by USB specification.

I think at room temperature in lab you may work with 60MHz or even 62.5MHz from PLL, but the jitter is not guaranteed by the Data Sheet across process/voltage/temparature variations to meet USB bus specification requirement.

Back to the case when only internal PLL is available, make sure:

OUTDIV4 - if used as the USB clock source, the fVCO may require to be less than the maximum. fUSB = fVCO / (OUTDIV4+1). so you need to have fVCO = 480 MHz, OUTDIV4 = 7.

623 Views
eukeniurkiaga
Contributor II

Thank you Fang for your help,

I think that it will be better if we add an external 60 MHz clock for the USB.

Regards,

0 Kudos
623 Views
TomE
Specialist II

Yes, Fang has given a very good and detailed answer.

Your testing shows it "working" at 62.5MHz and with "too much jitter", but how did you test it? If you just plugged a Mouse or USB Key into it, then those devices can probably handle the wrong and varying clock speed.

"Working with one device" is one thing, but "meeting the specifications" gives you a guarantee it should work with ALL devices. They're built to meet the same specs, and they can build something that absolutely requires that clock accuracy if they want to.

Where the clock accuracy is needed is where you have USB Hubs. They have to be able to receive data on one port from a device, and get rid of it out another port. If the speeds don't match it might overrun or underrun. It might not (it might be able to handle the speed differences), but it might not, and that means some brands or models mightn't work.

The same clock accuracy requirements apply to Ethernet, and for the same reason. Before switches, when there were only repeaters, they could only handle something like 5 BITS of clock difference over a 1500-byte message. That often meant you could send SMALL packets through a hub with inaccurate clocks, but long ones would get mangled.

If you're only going to ever plug one simple device into the USB port, then you can get away with an out-of-specification clock, but be warned. I have a USB keyboard at work with a USB Hub in it (and a socket for a mouse). I've even heard about USB Memory Sticks with inbuilt hubs.

Going with an external 60MHz hybrid oscillator is the best solution. Good luck with the EMC at that frequency.

Tom

0 Kudos