USB stack sample project TWR-K20D50M modification

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

USB stack sample project TWR-K20D50M modification

Jump to solution
1,010 Views
gaminn
Contributor IV

Hello,

what changes should I make in a Freescale USB stack sample project for TWR-K20D50M to be able to use it on my own board with MK20DX256 MCU. My board has 8 MHz RC resonator, USB connector connected directly to MK20DX256 and some other stuff. At the moment any of the USB stack sample project doesn't work - PC doesn't recognize usb device.

Labels (1)
Tags (2)
0 Kudos
1 Solution
638 Views
gaminn
Contributor IV

Dear Mark,

thank you for your hint about RC resonator. I will replace it.

However, the USB stack sample projects work for me now even with the resonator - it was software problem, I didn't edit the source code of the sample project properly so USB interrupt was not enabled. Stupid mistake...

View solution in original post

0 Kudos
2 Replies
638 Views
mjbcswitzerland
Specialist V

Hi

The USB operation requires a high resolution 48MHz clock (< 0.25% or 2'500ppm). Although it is possible to generate this from the 8MHz RC oscillator it will only be approximate and usually outside fo the USB tolerance specification, meaning that it either won't work or will work only unreliably.

Designs requiring USB therefore need an accurate clock source - usually a clock or a quarz (for the main oscillator or on the USB clock input - for chips with this option). The only exception is if the RC oscillator can be tuned to obtain an accurate enough clock but this will probably only be accurate at a stable temperature and so is only really an option for experimental work, such as a school project where only one device needs to work in a controlled environment. For anything that will go into production it would however be begging for big (technical and subsequnt financial) problems ;-)

Regards

Mark

0 Kudos
639 Views
gaminn
Contributor IV

Dear Mark,

thank you for your hint about RC resonator. I will replace it.

However, the USB stack sample projects work for me now even with the resonator - it was software problem, I didn't edit the source code of the sample project properly so USB interrupt was not enabled. Stupid mistake...

0 Kudos