MCF52223EVB and USB Implementation

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

MCF52223EVB and USB Implementation

5,236 Views
PopsStack
Contributor I
I have finally managed to get some semblance of operation out of the dev board .Can anyone point me in the direction of some software for implementing the USB port on the dev board. I have read all the documentation and tried to configure the USB port but I think I am tripping up on the configuration of the ports as I do not know exactly which pins must be configured in the PAR registers.
 
I have also tried to use the HID example code but cannot get that running. Is this the right stuff to get going with. I am only needing to hook a memory stick onto the USB port to get data on and off of.
 
Any ideas.
 
Many thanks.
Labels (1)
0 Kudos
Reply
15 Replies

1,958 Views
PopsStack
Contributor I
 
 I am trying to get the CMX USB Mass Storage demo onto FLASH. I have followed the steps using the Targetting ColdFire literature as a guide to step me through the process.
 
I continuously get :
 
" Flash Programmer : PE MicroProtocol Plugin: Error occured while tryng to write memory"
 
I have done a hardare diagnistics run and cannot get any joy here.
 
Using the Console Debug with Coldfire stationery for demo progs I have no probs.
 
Any ideas.
 
Nic
0 Kudos
Reply

1,958 Views
PopsStack
Contributor I
Can the CMX USB Host stuff be reconfigured for Console Debug on the IDE - my brain is now saturated. Done lots of reading but cannot find a way to do this.
 
Nic
0 Kudos
Reply

1,958 Views
DrSeuss
Contributor I
No the code is too big for RAM.

On the programming did you load the device setting? There is a button in the lower center of the Flash tool panel. Chick this and then load the m52223_48Mhz file.
0 Kudos
Reply

1,958 Views
PopsStack
Contributor I
Hi Doc
 
I went to Flash Programming, noticed that the usb-host project is selected as default.
 
Then under Load Settings selected the 48MHZ file and saw the correct Flash structure for the 52223 that being 8Kx32x1 and the map. Selected all for erasing and started the erase - each time I get a connection failure.
 
I tried a hardware test as well - no luck.
 
From the P&E driver installation CD - I did a test and all appears satisfactory. This is why I asked if there is a way to set this demo up under Console Debug so I can carry on until I resolve my Flash issues. Guess I would have to trim too much to get at least the USB to be see the mem stick.
 
I know this may not be strictly good manners but would I be able to port some of the usb host stuff into a stationery configured Console Debug test prog to see if I can at least see the mem stick. I have tried to write some code following the 52223RM notes on USB and am now getting myself into a flat spin rather rapidly because I am dealing with a lot of unknowns.
 
Thanks
 
Nic
0 Kudos
Reply

1,958 Views
DrSeuss
Contributor I
You are using the USB debug pod correct?
The LPT pod will not work with the 48MHz crystal frequency.
0 Kudos
Reply

1,958 Views
DrSeuss
Contributor I
0 Kudos
Reply

1,958 Views
PopsStack
Contributor I
I have downloaded the CMX code for the USB host and Mass Storage. Is there any magic regarding getting this running. I have connected a monitor at the prescribed 9600 etc and cannot get and joy with implementing the calls or for that matter see any confirmation of having conencted a mem stick to the USB port.
 
I also had some trouble with the paths for the project. Any changes needed here.
 
Any idea what the scsci.c code is used for.
 
0 Kudos
Reply

1,958 Views
DrSeuss
Contributor I
You must have the wrong code (mine does not have that file) please try attached.
0 Kudos
Reply

1,958 Views
DrSeuss
Contributor I
MCF5222x_host_demos_beta.zip
Message Edited by t.dowe on 2009-10-21 02:36 AM
0 Kudos
Reply

1,958 Views
DrSeuss
Contributor I
Documentation is at:
mcf5222x-host-demos
 
Flash stick stuff:
mcf5222x-host-demos\projects\CodeWarrior-570-1984\mcf5222x\mass-storage
 
Host hid stuff:
mcf5222x-host-demos\projects\CodeWarrior-570-1984\mcf5222x\hid
 
Read the PDF docs and use the appropriate *.mcp file from the dirs above.
0 Kudos
Reply

1,958 Views
PopsStack
Contributor I
I did use this file and got the host demo code. When I started Code Warrior from this project file, I assume that all configuration is ready for this to be loaded (Presume can be run from debug mode). I cannot seem to track through the code from entry point through to the " main" function. Seems like my GUI on the IDE has also changed somewhat.
 
Should this code run without any mod to the configuration - and can it run in Debug mode? or does one have to load to FLASH first.
 
I have also tried putting a few printf statements in so I can try see where I am - I used the stdio.h include but must be getting the paths all messed.
 
I must be doing something really STOOPID.
 
Thanks for the input.
0 Kudos
Reply

1,958 Views
PopsStack
Contributor I
Also forgot to mention that I am using the Rev B 52223EVB. I left the jumpers as per factory setting - any changes required to this.
0 Kudos
Reply

1,958 Views
DrSeuss
Contributor I
The Host project only contains a flashed based target. Yes you will have to flash the EVB.
Also the VBUS select jumper must be in the HOST position as OTG does not have the current drive to run a flash stick.
0 Kudos
Reply

1,958 Views
PopsStack
Contributor I
Thanks for the input - been running in ever decreasing circles and getting very confused.
 
Can one reconfigure to be able to run this on the Console Debug.
 
Am finding the understanding of USB protocol a little heavy. I guees using the output to the UART will be a way of stepping through the whole lot - just thought getting it ont othe Debug will be a little easier.
 
Thanks again - hopefully I will be able to get the flash going.
0 Kudos
Reply

1,958 Views
DrSeuss
Contributor I
The following thread addresses USB host mode.
It also contains an attachement for the software.

Understand that to talk to a flash drive, the MCF52223 must be a host and you must use the mass storage class.
0 Kudos
Reply