Hello,
I want to add USB CDC to my custom board with MK60DX256.
I follow this guide http://mcuoneclipse.com/2013/04/27/usb-cdc-with-the-frdm-k20d50m/ but I have a trouble in USB0:Init_USB_OTG.
The problem is into USB_Init in the Module Clock Frequency that remains STOPPED (not 48 MHz).
I attached three pictures that show the clocks configuration.
Could anyone help me?
Thanks
已解决! 转到解答。
I had no problems to set it up using CW 10.6 (with update 4). Attached is a test project (I have not run it on hardware!), and the settings work for me.
Hi Erick,
I installed CW 10.6 and I make an update.
Now the CPU settings shows USB clock settings.
I think USB_CDC add Virtual COM support but now I realize that isn't true. Isn't it?
Which PEx component I need to add to get Virtual COM functionality?
Thanks for your help!
Federico
Hi Frederico,
this one is for K64F, but should pretty much apply for K60 too:
http://mcuoneclipse.com/2014/10/25/usb-cdc-with-the-frdm-k64f-finally/
Erich
Hi Erich,
I try different firmware and I noticed that my computer recognize an "Unknown Device".
If I try to update the driver, windows says that the correct driver is already installed and the the Virtual Com doesn't appear.
Which is the problem?
Thank you very much!
Federico
Hello Erich,
I solved my problem.
The issue was due to a wrong USB enumeration. I attached my board to an USB HUB and the PC recognized the Virtial COM.
Thanks for your help and compliments for your website. It's very useful and instructive!
Federico
Hi Erich,
yes I followed the instruction.
The strange thing is: I create a project (from your original project on Git) that support both MK60DN and MK60DX microcontroller, if I load the firmware on MK60DN my PC recognize the virtual com, but if I switch to MK60DX my PC recognize only an Unknown device.
I attached the project.
Thanks
Federico
what version are you currently using?
You can download 10.6 and install it side-by-side, so you still have your current version available, just in case.
That^'s actually the way I recommend to switch to a newer version anyway: keep the existing one installed, until your projects are migrated (or you might keep using the older version for your older projects).
Erich
Hello Jorge,
thanks for the reply!
I switched to Expert mode in ProcessorExpert and I can set PLL Clock under (PLL/FLL Clock Section), but the USB clock setting doesn't appear under this section.
In fact, when I debug the project, the CDC_Task return: ERR_BUSOFF; /* USB bus not available yet */
Which is the problem?
I attached my project, create with CodeWarrior 10.5 and the ProcessorExpert developed by Erick Styger.
Thanks
Federico