MCF52259 as USB Host, without using RTOS

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

MCF52259 as USB Host, without using RTOS

1,470 Views
FridgeFreezer
Senior Contributor I

Yes it's me again :smileywink:

 

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.

Labels (1)
0 Kudos
Reply
6 Replies

1,055 Views
PaoloRenzo
Contributor V
0 Kudos
Reply

1,055 Views
SAEL
Contributor I

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....)

 

 

 

0 Kudos
Reply

1,055 Views
PaoloRenzo
Contributor V

Hi SAEL

 

Can you send me the ticket number? SR (service request) # ?

 

I would like to know more about this problem

 

Thanks!

0 Kudos
Reply

1,055 Views
SAEL
Contributor I

Hi Paolo, SR number is 1-772722331

 

0 Kudos
Reply

1,055 Views
RichTestardi
Senior Contributor II

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)

0 Kudos
Reply

1,055 Views
TomE
Specialist II

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

 

0 Kudos
Reply