USB protocol of mcf52259rm with windows7

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

USB protocol of mcf52259rm with windows7

3,115 Views
swapnilmisal
Contributor II

I have been working on usb OTG protocol of MCF52259RM coldfire family controller. Using this protocol to communicate with PC having Windows 7 O.S. Drivers get detected whenever i plug it, no error is observed in device manager. But when I try to program controller using USB I am unable to access my product using PC application software. This software and drivers for USB work fine with WindowsXP , but with Windows7 it has got problems . Please can anyone help me to solve this problem.Is there any difference in windowsXP and windows7 usb protocol that I should take care.

Labels (1)
0 Kudos
Reply
19 Replies

2,749 Views
JimDon
Senior Contributor III

You said "usb OTG protocol". This does not make sense, as OTG protocol just means being a host. Do you mean that you are emulating a usb mass storage device?

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

hi Jim

USB OTG is a module in MCF52259 which i am using for communication with PC. This communication includes transfer of data from MCF52259 after computation when requested by PC .

0 Kudos
Reply

2,749 Views
JimDon
Senior Contributor III

Ok, but are you using CDC, HID, Mass storage? Thats what I mean by protocol.

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

Ok ,  Mass Storage protocol is used. Bulk control transfer.

0 Kudos
Reply

2,749 Views
tom_thompson
Contributor III

Just a wild suggestion here, but if you only have the board plugged in, is the USB running in a high-speed mode? Then when you plug in another (presumably slower) USB device, does the USB transfer rate go down? I am wondering if the transfer rate of the USB interface changes when a second device is added, and the new transfer rate is compatible with your board, while the initial rate is not.

---Tom

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

hi

 

I am thinking the problem is with suspend and wake up conditions because i found that when REFRESH button in

Device manager-->USB Root Hub Properties --> Power. everything is working fine. and also  checked with USB analyzer whether some kind of data is send when REFRESH button is hit but found nothing.

Can u provide any solution so that my device will work fine without need of pressing REFRESH button.

this occurs only when USB Root Hub connecting my device is also connected to USB mouse.


0 Kudos
Reply

2,749 Views
PaoloRenzo
Contributor V

Hi Swapnil

I think it's time to open a support ticket. There are many variables that need to be addressed correctly to get the right picture of your problem. Support guys might have heard of this too.

Regards

Paolo

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

Hello Paolo,

    

I got a way out of this problem, it is related to Suspend & Wake up events during USB communication.

I just ignored using Suspend & wake up interrupts and found that its working fine.

Only I cannot used power saving mode due to this solution.

win7 PC deals with the events differently as compared win Xp.

If you think same please let me know the difference.

--Swapnil

0 Kudos
Reply

2,749 Views
JimDon
Senior Contributor III

If you saw the mess that is the Windows USB stack you would realize that it might be hard to say why this is.

I would easily believe that XP and WIn7 handle usb differently.

If you are plugged into a USB hub, do you really need power saving mode?

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

Hi Jim,

I do not need power saving mode, but one more thing i observed that if MCF52259 is connected to win7 PC for long time (more than 1 hr) with changes i made in Suspend & Wake  up routines USB communication goes down again if no communication is done over that time, what could be the reason for this.

0 Kudos
Reply

2,749 Views
PaoloRenzo
Contributor V

Do you support all the USB setup packets? Maybe trying with a software usb sniffer for details. Since it's already enumerated in W7, you should be able to see all the packets between PC and mcf52259

Are you doing USB bootloader or something like that?

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

Yes it support all USB setup packets.

I used USB monitoring tool and found that descriptor  is correctly configured with bulk transfer option.

One more difference i found that there is continuous signals on USB_DM port of MCF52259 after every 1msec when connected to windows7 but its not the case with windows XP. these signals are observed only for few time on windows XP.

These signals might be SOF signals.

Still I have not got the solution for my problem, will u please guide me further.

OBSERVATION:  if there any communication on other usb port driven by same usb controller whose one port is connected to my controller mcf52259, my device starts responding to application software on windows7 PC. but there is sequence first connect mcf52259 and than other device to other usb port.

what kind of firmware changes I need to do so my device communicate with windows7 PC.

0 Kudos
Reply

2,749 Views
PaoloRenzo
Contributor V

Have you trid with more PC using Win7? Just to make sure

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

yes I did and found same problem with 2 other PC.

Can i get any sample code working for windows 7 with any basic usb operation.

0 Kudos
Reply

2,749 Views
PaoloRenzo
Contributor V

What device are u using? Have you tried MQX USB device example just to make sure? I think the INF file is different for Windows7 PCs,, but it doesn't sound like your problem.

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

I am directly using usb communication with mcf52259 to erase & program flash memory.

I am stuck with this problem , tried with many solutions that could have problem with , but still no progress.

MCF52259 responses to "descriptor request " from PC and found "Device is working properly" in device manager . But when I start my application to communicate, the signals are continuously being send over DP and DM lines but MCF52259 is not able to detect these signals and generate interrupt.

And previously described observation that USB communication is successful with win7 when other standard device is connected to a usb port next to my usb cable connected to MCF52259 board. These USB ports are controlled by same usb controller inside PC.

Please let me where to look for solution for this. 

0 Kudos
Reply

2,749 Views
PaoloRenzo
Contributor V

Hi Swapnil

Not sure what's going on here but would need more clues. It's hard for me to believe that USB signals behaves different if using XP or Win7.

Also one idea I have from the top of my head is the usb era/program routines using flash memory. Maybe Win7 requieres shorter times when an erase/program routine disables interrupts, then usb is down for a while? What happens if you remove flash routines for a while? I would like to have a shorter equation :-)

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

And one more if erase/program routines are executed fast how come when connecting other usb device to nearby usb port starts it working.

these other devices are like usb mouse, keyboard but not pendrive(any other storage devices).

even after some time if other usb device is removed MCF52259 works fine with USB till i disconnect.

whether signals from usb mouse makes usb controller to check all usb ports it has been controlling or any such thing which is making MCF52259 possible to communicate.

0 Kudos
Reply

2,749 Views
swapnilmisal
Contributor II

Hi Paolo,

     I really don't think that windows 7 requires less time , even if its true any USB application configures endpoints after PC gets descriptor values. In my case this configuration is not done as after CONTROL USB transfer for descriptor any signals sent by PC is not detected by MCF52259.I am using bulk transfer in USB OTG.

So can u give any other suggestions please.

0 Kudos
Reply