KINETIS KL25 USB CDC and SERIAL

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

KINETIS KL25 USB CDC and SERIAL

3,955 Views
DolomitiLynx
Contributor III

I have designed  a KL25 microcontroller based board, and I'm now in the testing and validation phase of the development process. I would like to let the board  be recognizable from a PC as a serial port. This would give me the possibility to test  the USB (layout) reliability making an echoo test. (For example a pc program would continuously send a serial frame and expect the echo from the board).

Is available an example implementing a similar feature, or better, is there a BAREMETAL project implementing the USB Serial Class Device? If not, do you know from where to start?

Thanks in advance to whom could give me some hints on how to implent such a feature.

Best Regards

G.

2 Replies

795 Views
BlackNight
NXP Employee
NXP Employee

Hi Giulio,

what you are asking for is USB CDC device class. The Freescale USB stack (bare metal) comes with an example for this. Based on this stack there is as well an open source Processor Expert component for it:

I wrote a few articles/tutorials about it:

http://mcuoneclipse.com/2012/10/07/tutorial-usb-cdc-with-the-kl25z-freedom-board/

http://mcuoneclipse.com/2012/08/05/a-shell-for-the-freedom-kl25z-board/

http://mcuoneclipse.com/2012/11/16/usb-cdc-and-sci-side-by-side-with-the-freedom-board/

Sources and components are available on the GitHub site refered in above articles.

The following article describes how to import the components:

Processor Expert Component *.PEupd Files on GitHub | MCU on Eclipse

If you want to see how this looks or works: I have attached a project with all files generated, ready to run on the FRDM-KL25Z: it uses 38400 baud and echoes characters on the USB port of the KL25Z. This project is available and maintened on GitHub here: mcuoneclipse/Examples/FRDM-KL25Z/Freedom_UsbCdc at master · mcuoneclipse · GitHub

I hope this helps.

794 Views
perlam_i_au
Senior Contributor I

Hi Giulio:

Here is the AN4370 USB DFU Bootloader for MCUs I hope it can help you, also you can visit  USB Stack Product Summary Page , here you will find other examples and information.

Let me know if you still have problems

0 Kudos