I would like to use the USB stack for the MK64FN processor.

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

I would like to use the USB stack for the MK64FN processor.

1,421 Views
neilporven
Senior Contributor I

Hi everyone,

 

I would like to communicate from my PC using Realterm and send a character or string to the MK64FN.

I found on GitHub that someone was using FSL_USB_Stack component, where can I find this component or

is there something new that the KDS 3.0.0 comes with for USB? 

 

Also, Is there an existing current example to achieve the above?

 

thank you.

Labels (1)
0 Kudos
4 Replies

548 Views
therealfreegeek
Contributor IV

I thought I would post this link here as I was looking for USB support and came across this post and this link.

Creating a New USB project with KSDK and Processor Expert support in KDS

0 Kudos

548 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Neil Porven:

That component you talk about is a custom USB component developed by colleague Erich Styger, which you need to install separately. That component uses the legacy Freescale Baremetal USB stack v4.1.1. See his tutorial about CDC with K64F:

USB CDC with the FRDM-K64F, finally! | MCU on Eclipse

If you are using KSDK, then the USB stack is different and there are examples for CDC device class in KSDK installation, in these paths:

C:\Freescale\KSDK_1.2.0\examples\frdmk64f\demo_apps\usb\device\cdc\virtual_com\bm\kds

C:\Freescale\KSDK_1.2.0\examples\twrk64f120m\demo_apps\usb\device\cdc\virtual_com\bm\kds


Regards!,
Jorge Gonzalez

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

548 Views
neilporven
Senior Contributor I

Hi Jorge,

Thank you for giving me these options.

Naturally I decided to look at option 2, since I am using the KSDK.  I used the path you suggested:

C:\Freescale\KSDK_1.2.0\examples\frdmk64f\demo_apps\usb\device\cdc\virtual_com\bm\kds

I was able to find it with no problem, but here are the issues I encountered:

1. I didn't know what to do with it, once I found it?  I tried opening it in KDS 3.0 and importing it (this was my first guess).

2. Once I imported it, I noticed it doesn't have a main, event.c, event.h, or some other files needed in KDS to compile?

3. What is cdc?

4. Is there documentation on how to work with this examples (that don't have what is regularly needed with KDS)?  I could

    be doing something wrong of course, maybe I am not suppose to import the file and instead create a project then imported

    in a special way.  Either way, this is not spelled out (how to use the example, what components/parts are needed for your own project, etc..)???

I will investigate option 1 today and see if I have better luck, but if you can address the above issues, I will greatly appreciate it.

Neil

0 Kudos

548 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hi Neil:

Please open the pdf file called "Integration of the USB Stack and Kinetis SDK" from KSDK installation in this path:

C:\Freescale\KSDK_1.2.0\doc\usb

Basically you need to:

1- Import and build the K64 KSDK platform library project: C:\Freescale\KSDK_1.2.0\lib\ksdk_platform_lib\kds\K64F12

2- Import and build the K64 USB device library project: C:\Freescale\KSDK_1.2.0\usb\usb_core\device\build\kds\usbd_sdk_frdmk64f_bm

3- Import and build the CDC device example: C:\Freescale\KSDK_1.2.0\examples\frdmk64f\demo_apps\usb\device\cdc\virtual_com\bm\kds

CDC is the USB class. It allows your K64 to communicate with the PC by enumerating as a Virtual COM, as if it was a RS-232 device.

The example is pretty simple, just run the demo and open the terminal (Realterm, teraterm, etc.). Then all characters you type in the terminal will be echoed by the K64. There is a readme guide for each USB demo, which you will find in the demo folder.

Regards!

Jorge Gonzalez

0 Kudos