┬ÁTasker Forum > USB

USB when moving from MK66 to MK24



We've switched recently from the MK66FN2M0VLQ18 to MK24FN1M0VDC12 and everything seems to be working, except USB. The first set of prototypes had the pinouts done wrong, but the second design looks ok.  I've attached both the working previous design and the new one.

With the same USB code as before (no configurations changed), the device is correctly recognized by Windows, but getting this error: "The device cannot start (Code 10. An invalid parameter was passed to a service or function.)"

One thing that piqued my interest is that we were using USB1 before, but USB0 now. However I can't seem to find where the USB peripheral ID is configured.



Beware that USB0 on the K66 and K24 is a Full Speed USB controller (12Mb/s) and USB1 is a high speed USB controller (480Mb/s) and so if you have moved from USB1 to USB0 you need to make sure that you use the correct USB interface (0 rather than 1) when opening it

--- Code: ---tInterfaceParameters.ucUSB_controller = 0;
--- End code ---
and also that you specify that its endpoint characteristics are suitable for FS USB (eg. maximum bulk endpoint size is 64 bytes rather than 512 bytes).

It may be that it is enumerating but the PC recognises that its descriptors are not suitable and so shows a configuration error.



Thank you, Mark! That worked, but as we are doing stress testing before moving over to the new processor, we're seeing some very weird USB behavior. Will create a new thread to not mix this up.

Hi Alex,

I had a similar problem with the USB connectivity as you are experiencing in 2014.  On our design, it was found that we had undersized the capacitor for the VOUT33 pin for the MK22 processor we used in a project.  I see the capacitance is 100nF for your design.  This might be too low and cause noise issues on the USB's internal power supply that VOUT33 is designed to supply.  Our design uses a 2.2uF capacitor.  It is not well documented in the reference manual for the microcontroller, but I did find that Freescale's (now NXP) KwikStik-K40 Hardware Errata document on Errata ID KWIKSTIK_06 states "Undersized VOUT33 Capacitor" and the solution on page 10 of that document states: "The recommended value for the capacitor from VOUT33 to GND is from 1.76uF to 8.16uF with 2.2uF being the typical value. The capacitor (C34) connected to VOUT33 on the KwikStik is only 0.1uF. This can result in unstable or non-functioning USB operation.  Workaround: Replace C34 with a capacitor of value 1.76uF to 8.16uF".  The link to the document is: https://www.nxp.com/docs/en/errata/KWIKSTIKK40HWER.pdf

There is also a NXP Community discussion on the USB internal regulator (VOUT33) with NXP TechSupport suggesting a 2.2uF capacitor.  The link for this conversation is:

Hope this helps,



[0] Message Index

Go to full version