I would like to connect a tablet running on windows 7 with my own card which is built around Kinetis K20. Please suggest how should I interface both using USB.
Will my K20 support communication with a Windows 7 device?
Yes, this can be done, and is quite common. You really need to define how you need to interface (what USB class). You will need to operate the K20 device as a USB Device, not a USB Host, as the Win7 device will be the Host.
Have a look at the baremetal USB stack examples; there are many good examples that might do just what you need. Install the stack, and look through the documentation/examples: USB Stack Product Summary Page
Alternatively, you could use MQX if you desire an RTOS. There are many examples for this as well. Install MQX, and look through the documentation/examples: http://www.freescale.com/mqx
MK20 50MHz product provides USB Full speed controller, which can communication with PC (Windows 7 OS).
Freescale provides USB stack, the latest version is V4.1.1.
Customer can download it from below link:
After programed, MK20 can works as USB device, such HID mouse or CDC device communication with PC.
Wish it helps.
I have problems with USB device application on MK20 board, could you tell me how
to port the application code from MK40 which exists in USB Stack v4.1.1 to MK20?
What I have done is as follows, but it doesn't work.
Host USB: PC with Windows 7 OS
Slave USB: MK20
IDE: IAR Embedded Workbench for ARM V220.127.116.1104
Based Project: Freescale USB Stack v4.1.1/Source/Device/app_composite/msd_and_cdc/jar_ew/kinetis_40/USB_MSD_CDC.ewp
I changed very little from based projected for my board, which is:
1. Changed Processor variant setting to MK20DN512Zxxx10 which is used on my board in General Options of IAR.
2. Changed #include <MK40N512VMD100.h> to #include <MK20N512VMD100.h> in derivative.h file
3. Removed GPIO_Init().
4. Removed #ifdef MCU_MK40N512VMD100 pair in pll_init() function in main_kinetis.c
5. Modified #if (defined MCU_MK40N512VMD100) || (defined MCU_MK53N512CMD100) || (defined MCU_MK60N512VMD100) || (defined MCU_MK70F12)
to #if (defined MCU_MK40N512VMD100) || (defined MCU_MK53N512CMD100) || (defined MCU_MK60N512VMD100) || (defined MCU_MK70F12)
|| (defined MCU_MK20N512VMD100) in usb_devapi.h file
6. kept the same Linker configuration file, which is MK40N512VMD100_Flash.icf
What else needed to do?
Need your help. Thank you!
Solved. It was a hardware problem. Thank you!
Retrieving data ...