K22F USB Printer Sample

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

K22F USB Printer Sample

822 Views
corytodd
Contributor III

Hello,

We recently moved from Coldfire to the Kinetis line and have been looking for usb printer sample. On the Coldfire series using USB stack 4.1.1 we can enumerate as a printer without issue.

A few questions that hopefully you can clear up for us:

  1. Can we use the 4.1.1. USB stack? There has been mention in this forum that the register definitions are incompatible which aligns with what I've experienced.
  2. I have heard that a new Kinetis SDK, 1.1, will be released this month. Any chance that will support printer devices?
Labels (1)
Tags (2)
4 Replies

515 Views
mjbcswitzerland
Specialist V

Cory

I can't ofer you a printer class solution out of the box but you could look at the uTasker project which has USB device support. It is fully compatible with the K22F (and all other KL and K parts with USB) and has been operated in USB-MSD, HID-mouse, HID-keyboard, HID-Kboot, USB-CDC modes as well as composite mixtures of them (including multiple CDC instances mixed with other classes). See for example Re: Re: Kinetis bootloader v. 1.1

However the solution has a few advantages:

1. It has very clean construction consisting on a hardware driver (HAL to the USB generic layer), a generic USB layer (HW and class independent) and a class/application layer. This means that there are no porting difficulties - there is also a Coldfire HAL which means that the USB generic and class layers can be used on Kinetis (KL or K parts) or Coldfire parts with no changes required.

2. It allows USB operartion to be simulated to analyse cases or develop new applications/classes. If you have a USB recording of a printer class in operation the sequences can be played through the code for development/debugging without need for HW which feels a bit like cheating in some ways. It was possible to develop and debug (reverse engineer) something like the KBOOT HID protocol in about 3 hours which then worked on all KL and K parts with no futher effort. I don't know how complicated the printer class is but with a reference recording the details can usually be filled in without much effort.

3. The application/class interface can use different methods depending on each control/application data packet requirements (including peeking in the USB interrupt, handling completely in the interrupt and/or deferring the work to a task level). BULK data pipes can be handled as if they were a bidirectional UART interface which again makes the interface very easy to work with at the class/application layer.

3. The USB device stack has been used and proven in various industrial projects over a period of 5 years on Coldfire and about 2 on Kinetis parts (whereby the USB controller in the Kinetis is almost identical to the one in the Coldfire).

Regards

Mark

http://www.utasker.com/kinetis.html

515 Views
corytodd
Contributor III

Mark,

Thank you very much for your helpful response. I'll take a look at the uTasker offerings and see what we can work with.

Best Regards,

Cory

0 Kudos

515 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Cory Todd,

No printer class in the coming KSDK 1.1, and so far no plan to support it yet. Sorry for the inconvenience that has caused.


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

515 Views
guitardenver
Contributor IV

NXP,

Has there been any update on the development on a printer class. I know the SDK is on 1.3.0. Just wondering if there is now any plan for doing a printer class?

Thanks,

0 Kudos