Interfacing USB printer with MK22

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing USB printer with MK22

81 Views
sharath_mallesh
Contributor I

I have been facing issues with interfacing a USB printer to K22 controller based custom board. The printer supports ESC/P commands and I am using the example code provided in the SDK: "SDK_2.9.0_FRDMK22F\boards\frdmk22f\usb_examples\usb_host_printer_plain_text\bm".

When i run the example code, the bus enumeration is being done and i am able to see prints of PID and VID of the attached device, and also i am able to get device attached and detached events. The issue is after enumeration when the controller(as in code) tries to get the device id, a STALL interrupt is being asserted(as observed in the USB0-ISTAT register) as shown in the image below.

sharath_mallesh_1-1611767605796.png

Changes to print commands to support ESC/P commands needs to be done, as i stuck with this error not able to move forward, since i'm new to USB concepts any inputs will be helpful. 

Labels (1)
0 Kudos
2 Replies

52 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hi Sharath,

Are you using a supported printer with the example? Please check supported printers in the below extract from the readme file.

Currently, it supports the virtual printer (see device_printer_virtual_plain_text applicatioin) and the real printer, which supports the PJL and postscript (for example, HP LaserJet P2055dn). PJL is one printer control protocol (PCP) from HP, postscript is one page description language (PDL) from Adobe.

Best regards,

Felipe

0 Kudos

43 Views
sharath_mallesh
Contributor I

Hi Felipe,

I'm using a POS/receipt printer which supports ESC/P commands to print. But I'm using the SDK example just to bring up the USB communication with the printer. 

0 Kudos