Don't enumerate USB CDC VCOM with a new project

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

Don't enumerate USB CDC VCOM with a new project

Jump to solution
2,372 Views
itr1718
Contributor III

Hello,

 

I am working with KL27 MCU and KDS and try to apply USB CDC demo project on my own project.

USB VCOM is recognised with the example project. But if I apply it similary to my project with copied files, it is not enumerated. 

 

I upload also my project.

Can someone check which mistakes there are or what I should do for it?

 

Thanks and have a good day.

0 Kudos
Reply
1 Solution
2,363 Views
myke_predko
Senior Contributor III

Hey @itr1718 

First off, can I make the comment that asking for people to look over a project and find your mistakes is a big ask and somewhat unreasonable?  Very few people here have the time to go through a mass of files looking for a problem and nobody is paid to do it.  If you're going to post code and ask people to review, I suggest that you keep it to less than 40 lines so that all of it basically fits in one screen for easy review.  

Secondly, I've done what you're trying to do (get the CDC demo working in my project) a number of times.  I would suggest that you look at your clocking and how you set it up - when I went to the current SDK with MCUXpresso, I had a lot of issues with clocking (the clock wizard requires a very good understanding of the clock circuitry and patience as you need to hit buttons repeatedly), 

To get things working initially, I copied the "clock_config.*" files from the demo into my project.  I DO NOT recommend that you do this blindly but it may be a way of move the ball forwards - you didn't say which platform you're getting the demo files from and what exactly is the platform you're working with (You should explain clocking on both platforms). 

If you feel clocking is good, post a screen shot of the clock wizard for your project so that it can be reviewed here (looking at block diagram isn't too big an ask).  

I know how frustrating it can be to get USB CDC working.

Good luck and let us know how you are doing,

myke

View solution in original post

7 Replies
2,364 Views
myke_predko
Senior Contributor III

Hey @itr1718 

First off, can I make the comment that asking for people to look over a project and find your mistakes is a big ask and somewhat unreasonable?  Very few people here have the time to go through a mass of files looking for a problem and nobody is paid to do it.  If you're going to post code and ask people to review, I suggest that you keep it to less than 40 lines so that all of it basically fits in one screen for easy review.  

Secondly, I've done what you're trying to do (get the CDC demo working in my project) a number of times.  I would suggest that you look at your clocking and how you set it up - when I went to the current SDK with MCUXpresso, I had a lot of issues with clocking (the clock wizard requires a very good understanding of the clock circuitry and patience as you need to hit buttons repeatedly), 

To get things working initially, I copied the "clock_config.*" files from the demo into my project.  I DO NOT recommend that you do this blindly but it may be a way of move the ball forwards - you didn't say which platform you're getting the demo files from and what exactly is the platform you're working with (You should explain clocking on both platforms). 

If you feel clocking is good, post a screen shot of the clock wizard for your project so that it can be reviewed here (looking at block diagram isn't too big an ask).  

I know how frustrating it can be to get USB CDC working.

Good luck and let us know how you are doing,

myke

2,334 Views
itr1718
Contributor III

Hi @myke_predko and @mjbcswitzerland ,

 

thank you for your replying.

First of all, I agree that my attitude was wrong and that no one has much time for the whole project. I had to ask briefly without whole project, but also clearly. I apologize about it.

 

I used a example for FRDM-KL43Z. I didn't concern clock. I will check it.

 

Thanks again and if I get it successfully, let you know.

0 Kudos
Reply
2,325 Views
mjbcswitzerland
Specialist V

Hi

The KL43 and KL27 are quite different in a number ways so you will need to reference the correct package if using SDK since they make a set for each rather than using a generic solution .

Regards

Mark

 

2,332 Views
myke_predko
Senior Contributor III

@itr1718 

No worries - keep us up to date as to your progress.  

If your target is the K27, could I suggest that you look at the code for the FRDM-KL27Z 

Remember to look at your clocks.

myke

2,308 Views
itr1718
Contributor III

@myke_predko , @mjbcswitzerland ,

 

I changed clock_config from FRDM-KL27Z example and it works finally. My PC recognize the virtual com port. 

 

I thought that FRDM-KL43Z is compatible with MKL27Z256xxx4. Because the SDK for MKL27Z256xxx4 has also examples for FRDM-KL43Z. 

FRDM-KL27Z has mcu KL27Z64. The mcu is perhaps more compatible with MKL27Z256.

 

Thank you again and have a nice day

itr

2,294 Views
myke_predko
Senior Contributor III

@itr1718 

Great job - congratulations on getting your code working.  

Keep us updated as to your progress!

myke

0 Kudos
Reply
2,359 Views
mjbcswitzerland
Specialist V

Hi

I agree with Myke that there is a bit of a problem with the present "open Source" mentality of I expect everything to be available, everything to be open, everything to be free and I expect others to do my work for me if something goes wrong. Many a hobby developer dreams about turning their hobby into a living but at the same time despises anyone who actually may request a financial contribution for their sometimes many hours of work during the helping process.

If one day I can find open source dentists and doctors and bakers so that actually earning a few bucks a day to get by in the world becomes superfluous I would also be happy to fall in to that mode of helping out 100% of the time.

USB debugging (the SDK code is spread over many files so it is easy to get completely lost) is however certainly a big ask.

I would suggest using https://github.com/uTasker/uTasker-Kinetis since it works with KDS on KL27 (and most other processors), has bullet proof USB-CDC and also a KL27 + USB simulator which tells you if anything is wrong (including clocking) and tests the complete process -meaning that no project time is lost and no others need to give up their Sundays searching for bugs in a haystack (over and over again) each time the SDK stack breaks or is broken by the implementer.

Regards

Mark