This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB Printer Class for AM3359AZCZ100

Other Parts Discussed in Thread: AM3359

I posed this to TI Tech Support and have been referred here for the answer. Below is the question I sent to Tech Support.

 

My question is about the USB on a BeagleBone Black board that uses an AM3359AZCZ100. Specifically, I want to use the AM3359AZCZ100 as an embedded printer emulator.

My question is: Can the USB controller in the AM3359AZCZ100 be used for a "USB Printer Class"? (The documentation and app notes talk about HID Class, Mass Storage Class, Hub Class, and Gadget Mode(???), but makes no mention of the USB Printer Class.)

If the USB Printer Class is supported or can be developed, please direct me to any app notes, data sheets, development tools that I will need.

As an additional note... I need this function regardless of the OS and/or without any OS.

Thank you for your help in advance.

Bob

  • It is possible to make printer class device on your beagle bone. I must warn you that it is not easy if you are beginner to USB. All documentation you need is located at http://www.usb.org/home

    Regards,
    Maciej

  • Hi Robert,

    The Arago distribution kernel, which comes with the official AM335x SDK, seems to include a USB Printer Device Class driver for USB printers and printer cables. It is located in drivers/usb/class/usblp.c.

    The other embedded linux distribution for the BBB, the Angstrom distribution, is actually just a set of patches ahead of the mainline kernel, so I guess it should support USB Printer Device Class as well.

    I haven't done this, but to enable the printer functionality in the Arago kernel, it seems like you will need these kernel options:

    config USB_PRINTER
        tristate "USB Printer support"
        depends on USB
        help
          Say Y here if you want to connect a USB printer to your computer's
          USB port.

          To compile this driver as a module, choose M here: the
          module will be called usblp.

    and

    config USB_G_PRINTER
        tristate "Printer Gadget"
        help
          The Printer Gadget channels data between the USB host and a
          userspace program driving the print engine. The user space
          program reads and writes the device file /dev/g_printer to
          receive or send printer data. It can use ioctl calls to
          the device file to get or set printer status.

          Say "y" to link the driver statically, or "m" to build a
          dynamically linked module called "g_printer".

          For more information, see Documentation/usb/gadget_printer.txt
          which includes sample code for accessing the device file.

    Best regards,
    Miroslav

  • Thanks for your suggestions so far. I have been to the USB.org site and understand the information. However there is nothing specific to the AM3359AZCZ100  or the BeagleBone Black.

    The distributions that Miroslav have suggested appear to both require human responses and use a Linux Kernel as the OS. My application is for an embedded process without any human interface of any kind. My device needs to be able to boot and perform it's function all by itself. I also want to be able to be able to "run" without a Linux Kernel or with some other OS.

    By the way... yes, I'm a bit of a "rookie" when it comes to Linux and such, but have a zillion years of designing uProcessors and uControllers for embedded applications autonomous applications. Often my designs have run without any OS or kernel and the applications are constructed using only assembly language so that may be a preferred approach for me if anyone has any info in that area.  

    Bob 

  • My previous note took into consideration that OP wants bare-metal solution.

    There are hundreds of thousands different USB devices, no way USB implementers (usb.org) can mention hardware in the documentation.

    The way to solve this is to:

    1. get Sitara Starterware and study USB stack

    2. grab USB Printer class documentation, study it and finally implement on Starterware.

    The printer class is simple therefore step 1 should be the most challenging. This thread might be helpful: http://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/217001.aspx

    Regards,
    Maciej 

  • Thanks for your additional input Maciej. This looks like it may be very helpful. Since it still looks to be high level structured C++ type stuff I have passed it on to our S/W person for working with that level of code.

    As we are still evaluating the use of the AM3359AZCZ100 for our embedded processor, I'm hoping that TI can provide me with more direct application information. In particular, we may need to create our own applications using low level assembly language. While we like the AM3359AZCZ100, this needs to be as painless as possible for us to implement. Cost and time to market is important. A huge learning curve or science project trying to figure out how to make the AM3359AZCZ100 work for us can't be tolerated.

    Perhaps someone knows if TI offers a more traditional type of tech support for their products that we could contract either on a annual or project basis.

    Bob

  • Is the printer the only function for AM3359? I believe programming Cortex-A device in assembly is ridiculously hard and reserved for very specialized low power, high performance embedded projects.

    How many kUnits are you planning to produce?

    Regards,
    Maciej 

  • John Murphy1 said:

    I am pretty sure you need Linux Kernel for that.

    I believe there should be a USB bulk example in StarterWare http://processors.wiki.ti.com/index.php/StarterWare_USB

    Regards,
    Maciej 

  • We generally create assembly language modules for all of our uController projects. We do a lot of "bit fiddling" and it is easer with assembly. Also, assembly generally makes faster, more compact functions. High level languages tend to get very bulky. Also, they tend to not be portable. Assembly language is easiest to move between compilers and operating systems since it is only device dependent.

    Besides, I guess I'm just old school.

    Bob