I'm looking at a new project that involves using an MCF52259 in USB-host mode to read HID devices (EG PC Keyboard, mouse, or joystick) to control some hardware. We are using CW7.2 and coding in C.
I know there's a USB stack for the CMX RTOS (and indeed most other RTOSes out there) however the swap to an RTOS would be a lot of effort just to gain USB support, so I'm looking for pointers on standalone C code to run in host mode.
Any tips / experience / code snippets greatly appreciated.
Paolo Renzo wrote:Maybe this as an option?
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MEDICALUSB
Maybe not.
Definitely not, if you want to develope an USB HOST for MSD application. See my post "USB HOST for MSD on MCF51JM128" for details (point out Freescale reply....)
Hi SAEL
Can you send me the ticket number? SR (service request) # ?
I would like to know more about this problem
Thanks!
Hi Paolo, SR number is 1-772722331
I have a USB stack that works in host mode you can use -- you'll need to add the upper level logic for handling HID (I talk SBC/SCSI)...
You can see all the code at the bottom of this page in the skeleton project: http://www.cpustick.com/downloads.htm
usb.[ch] is the USB host/device mode driver, and scsi.[ch] shows how to put an upper level SBC/SCSI driver on top of it.
Unfortunately, you'll have to ignore #if's for all the other MCUs -- but the 52259 works fine.
I've also used the code to talk PIMA, so it should be pretty flexible.
-- Rich (rich@testardi.com)
We bought a standalone stack from SMX as we needed to be able to read and write USB Memory Sticks. That required the memory driver and a file system driver that understood FAT as well as the USB driver. Their drivers are written to run under their OS, but can also be compiled to be called from polling loops (the way we ran it).
You can always take a set of drivers that expect to run under an OS and "fake them out" with glue code.
Good luck.
Tom