MCF52259 as USB Host, without using RTOS

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MCF52259 as USB Host, without using RTOS

2,321 次查看
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.

标签 (1)
0 项奖励
回复
6 回复数

1,906 次查看
PaoloRenzo
Contributor V
0 项奖励
回复

1,906 次查看
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 项奖励
回复

1,906 次查看
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 项奖励
回复

1,906 次查看
SAEL
Contributor I

Hi Paolo, SR number is 1-772722331

 

0 项奖励
回复

1,906 次查看
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 项奖励
回复

1,906 次查看
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 项奖励
回复