Hi,
I have 2 boards, the targets are k64 and k20(MK20DN64XXX5) repectively.
Requirements calls for boards to communicate over USB , Just simple Data back and forth, This link would replace the UART link on the newer design. While I am not an expert in USB communication, I decided to use CDC class for this, I HOPE THIS IS THE RIGHT CHOICE!!!!.
To that end ,I was able to use one of the demos in KDS to build code for the K64 target board as a USB CDS host, I have added Freertos to that and seems to be running OK, however to be able to test the USB I need to have the k20 target running as USB CDC device but I can't find any support for this in KDS or in DSK demos and examples.
I tried to use processor expert in KDS for the K20 target but when I looked at the component list I don't see any FSL_USB for the CDC class.
Am I missing something here?
Is USB CDC class the right choice for simple request and response over usb link?
Where would I find support for the USB CDC for k20 target.
Please I need help.
Regards,
Koorosh Hajiani
Hi Koorosh
From my experience, USB CDC class is a suitable solution for transmitting data between your board and a host. If you connect the USB port to a Windows PC, it should come up in Device Manager as a COM port.
If you want to learn more about USB protocol, I recommend the book "USB Complete" by Jan Axelson. See this link: Jan Axelson's Lakeview Research
Good luck
Steve
Hello Koorosh Hajiani:
The latest NXP USB stack supporting the Kinetis K20_50MHz family was the USB Stack V4.1.1. It is available from the next link but unfortunately this is a legacy package and does not include projects for KDS, only for CodeWarrior, IAR and Keil:
A good alternative would be to use the USB components provided by colleague Erich Styger. See this article for the K20:
USB CDC with the FRDM-K20D50M | MCU on Eclipse
The related Processor Expert components from that tutorial are not delivered by default with KDS, those have to be installed:
McuOnEclipse Releases on SourceForge | MCU on Eclipse
Regards!
Jorge Gonzalez
Hi Jorge,
Many thanks for your reply.
So I have the USB_HOST_CDC demo running on the TWR64F12+ser2 board, I downloaded the USB Stack V4.0.3 and was able to build the CDC_DEVICE for k20 target using IAR WORK BENCH evaluation compiler.
Then I downloaded it to the K20 target using KDS ide and PE MULTILINK box. I plugged the device (K20) in the PC and I can see that the PC tries to download the drivers which of course it fails.
HOWEVER WHEN I plugged the k20(device) in the K64+SER2 USB socket nothing happened . The host code running on the 64k+Ser2 board does not even try to attach. I am not an expert in USB and this is the first time I'm trying to do USB.
I checked all the relevant jumpers on the TWR_K64 and SER2 board and they seem to be correct. the HOST software running on K64 target is the USB_HOST_CDC_SERIAL demo in the SDK
.Pleas, any help is truly appreciated.
Thanks,
Koorosh Hajiani