I had a project where my entire code was written in CodeWarrior 10.6.4. Right now, I need to add the USB feature to my project, therefore the code for this new feature should also be in CodeWarrior. I want to add USB CDC DEVICE mode for MK50DX256CLK10. I downloaded USB Stack v4.1.1 NXP bare metal (no OS) USB Stack and by referring to the example project for MK53N512ZCLQ10 I wrote the code for my processor. It seems to work fine with some complications. The USB Device is detected but I see nothing on the hyperterminal. I try to transmit data but I receive nothing. I used USBTrace to find out what is wrong and I found that while receiving the status is unsuccessful. I have attached what I see on the USBTrace. I would appreciate if someone could help me with this
Hi
The USB Stack v4.1.1 NXP baremetal stack software for K53 project is based on Kinetis 100MHz silicon V1.x.
Customer now is using Kinetis 100MHz silicon V2.x.
There with some difference at MCG, SIM and USB module.
Please check AN4445 application note for the detailed info.
So far, the KSDK software provide the USB driver for Kinetis 100MHz silicon V2.x product.
Customer could using KDS IDE software with KSDK software.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi
Please check my attached project, which I tested working with TWR-K40D100M board (K40 100MHz silicon Rev2.x MCU on board).
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Hui,
Thank you for the info. Is there a project for mk50 board?
I used your reference code for my project and I am getting several warnings.
I think these alignment warnings are the real problem cause the USB CDC doesn't work.I have attached the screenshots of the warning below.
-Kiran
Hi
Yes, the project is also suitable for K50 product.
I will check with Processor Expert team if there with updated USB CDC component.
Thank you for the patience.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Hui,
When I used USB Stack v4.1.1 NXP bare metal (no OS) USB Stack to create my project(mk50) based on example project on mk53, I could create the virtual com port but I could not send/receive characters on the hyper terminal (teraterm). Please let me know if there is a way out of this situation.
-Kiran
Hi
I checked KSDK V2.0 provide software package for MK50DX256xxx10 product.
Customer could refer that USB CDC device application located below folder:
C:\Freescale\SDK_2.0_MK50DX256xxx10\boards\twrk60d100m\usb_examples\usb_device_cdc_vcom\bm
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Hui,
But the above is for KDS not for Codewarrior right?
Hi
Right.
So far, with strategy modification, the new Kinetis software will be released for KDS, not CodeWarrior any more.
Thank you for the understanding.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Hui,
The project you sent me is for TWR-K40D100M board (K40 100MHz silicon Rev2.x MCU on board). In the http://cache.nxp.com/files/32bit/doc/app_note/AN4445.pdf manual the SIM_SOPT2 is changed from 4004_8004 to 4002_F100 and SIM_CLKDIV2 is changed from 4004_8048 to 4002_F014. But in the MK40 and MK50 they look the same. Please correct me if I interpreted it wrongly. Also I get the following warnings. I have attached the screenshots for all below.
-Kiran
Hi
Customer could check Product part number to get the silicon version (the part number with char 'Z' means silicon Rev 1.x), just using below picture as an example:
The [MK50DX256CLK10] is silicon Rev 2.x product;
The [MK50DX256ZCLL10] is silicon Rev 1.x product.
Your used MK50DX256CLK10 product is silicon Rev 2.x product.
Wish it helps.
Have a great day,
Ma Hui
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Hui,
I started doing my project in KDS for USB CDC using this link https://centaurian.co.uk/2015/12/23/ksdk-usb-cdc-printf/
I got it working for my board. I want to type on hyper terminal and I am not being able to do that. How do I make scanf work for that? Please reply in your spare time.
-Kiran