cancel
Showing results for 
Search instead for 
Did you mean: 

Usb mouse demo problems on MB393(STR710)

nopti_albe
Associate II
Posted on December 13, 2005 at 19:03

Usb mouse demo problems on MB393(STR710)

20 REPLIES 20
nopti_albe
Associate II
Posted on August 20, 2005 at 12:54

I have been trying to make the usb mouse work with IAR and i just don't understand why it wouldn't work. I used all the examples that i have seen, I changed the main oscilator freq from 4mhz(for str711 kit) to 16mhz, changed all the compilaton related settings, the code runs, displays on uart the ''str71x mouse demo'' and after that it remains in usb init() in the nop process. If i plug it into a pc with windows xp it sais that the device is not recognized. In windows me it just hangs the entire pc. What doesn't work at the enumeration? Does anybody have a copiled working example for IAR 4.20 or 4.30?

I should mention that on an atmel kit it just works with a lot of usb configurations... no errors...

nopti_albe
Associate II
Posted on August 30, 2005 at 08:32

It does exactly the same thing... it hangs all the usb devices that I have, and windows says there is an unrecognized usb device... i would really need some help, it seems to be another problem than just a few settings :(

PS windows xp says VID 0000h and PID 0000h... this isn't good right? 🙂

I tryed a lot of computers, the code and UART goes ok... What shuld I do now? Buy a USB Protocol Analizer? As long as I don't plug it in USB the code runs perfect... after i plug it it doesn't seem to sense the link to usb... :-[

[ This message was edited by: tudor on 30-08-2005 12:42 ]

nopti_albe
Associate II
Posted on August 30, 2005 at 13:49

It shows the message, and if i plug it in the computer i have problems. If i plug it in the same computer with the jlink it stops it. I also have a hid mouse and it freezes it too. I changed the code a little bit and it even showed me the next messages, but it still doesn't work :(

scanlon
Associate II
Posted on August 30, 2005 at 14:21

You can check to see what descriptors are being sent by setting breakpoints in the code in USB_core.c (Standard_GetDescriptorData). At minimum you can determine if you are pointing at the descriptor table. Note: setting breakpoints in the enumeration sequence **will** cause the enumeration to fail. Clean your registry regularly and DONT test on the same PC that you are using for code development! A bus analyzers is not needed. ''USB Monitor'' from HHD software is very effective for capturing bus transactions. You can download a functioning (but time limited) copy from www.hddsoftware.com.

nopti_albe
Associate II
Posted on August 31, 2005 at 08:44

If i log with hhd software the transactions for the ''unknown device'' when i plug it in there are to lines that say unknown vid and pid. And at the info it says ''enumeration failed''.

So there's not much to say about the reason. If i monitor the usb hub there are quite a few transactions, but i don't know how to interpret them. Maybe I should read more about USB first...

I'll try to look at a real usb mouse and then at the st example.

PS I finally tryed to attach the usb cable with a program that does not have usb at all(in str710). The result is the same... so for me the USB programs don't work at all. It's strange because all the init part seemed to work...

Any ideas why with good code that even sends to uart usb still not ok?

[ This message was edited by: tudor on 31-08-2005 12:55 ]

scanlon
Associate II
Posted on August 31, 2005 at 10:59

USB is bit overwhelming at first. Basically it starts with enumeration where the HOST(pc) sends requests for structures that describe the hw. This is the bit that is overwhelming. Luckily, this is all taken care of by the code in USB core. It handles the USB interrupts, looks for requests that are related to enumeration and processes them. This mostly consists of pointing to descriptors (in desc.c??). You need the correct labels for the descriptors and everything should work. Set a breakpoint in the routines that send the descriptors and see if you get that far. If yes, check that the pointers point to descriptors. If no, check HW and low level routines. Toggling a IO pin and checking on a scope will tell you where you are.

nopti_albe
Associate II
Posted on September 01, 2005 at 07:09

I've read a book about USB, it's more clear to me now. I'll look in the Interrupt for USB to see witch part needs some brakepoints. So far only the ESOF part was accesed.

nopti_albe
Associate II
Posted on September 02, 2005 at 10:12

Sorry I don't have the 711 demo board :( I thought that the mb393 is more than enough :(

I will have in 2 weeks our prototipes, it would be very nice if i can make it work on MB393 before trying to make it work on the prototypes.

nopti_albe
Associate II
Posted on September 04, 2005 at 17:32

I suspect there are a few configuration settings that must be done. The system works as if the Analog part of the USB is not working. I will look in the bootcr register, configuration of pins(usb clock) and so on... there must be a small error somewhere.

What annoys me is that i've just received a Philips starter kit and of course the usb demo works from first try. From Atmel i have 3 processors running very well on USB, just the MB393 won't work.