fast USB-connection with k22f

Showing results for 
Search instead for 
Did you mean: 

fast USB-connection with k22f

Contributor I

Hi there! 

My goal is to read analog data and send it via a stable and fast (min. 10 kByte) connection from the k22f to my PC. I modified the example projects (especially the ones with a CDC or HID protocol since I figured that those protocol types are the best for my use), however, I still have problems with the USB-connection. Some data packets are always wrong or get lost in transmission.

Thus, I would like to start all over again.

So when starting new: How can I achieve a stable and flawless USB transmission? With which example code should I start and what do I need to change to make sure that no information is lost or incorrectly transmitted?

Every hint is appreciated!

I am a newbie to programming with MCUXpresso so if you have any tips or pitfalls to avoid I'd be very thankful to hear them as well!


Thank you in advance for your answer!


Best regards, Ad 

0 Kudos
1 Reply

Senior Contributor II

Hi adhofer‌,

I've worked with the MK20 with HID and CDC for years and now with the MK22 with CDC and based on the SDK demos (both 2.3.1 and 2.7.0) and have NEVER seen a missing or incorrect packet.  

Could you share more information about what you are doing and how it is implemented? What kind of acknowledgement scheme have you implemented?  

If I had to guess, I would say that you are getting buffers/packet stomped on/overwritten in your code.  


0 Kudos