USB
  Suspend/Resume at same time?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Suspend/Resume at same time?
egawtry
Member
posted July 30, 2010 03:48 PM     Click Here to See the Profile for egawtry   Click Here to Email egawtry     Edit/Delete Message
I am having trouble with a few machines. They (the hosts) send a suspend twice, a reset, then suspend/resume at the same time over and over. The machine says, "USB device not recognized".

Anyone understand this?

IP: Logged

Tsuneo
Member
posted July 30, 2010 10:54 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Does it occur just after plug in of USB connector?
The USB engine (SIE) on 'F32x/34x always detects Suspend when no bus activity is observed for 3 ms.
But you can ignore Suspend evnet just after plug in, for 1 second after plug in (*1).

- On the power-up initialization, disable SUSEN (POWER.0 - USB register)
- On bus reset handler, enable SUSEN

(*1) USB 2.0 Connect Timing ECN.pdf (included in zip file of USB 2.0 spec on USB.org)

Post-connect current timing
The Battery Charging spec allows devices to draw 100mA for 1 second after the connect event, regardless of what is happening on the bus.

The USB 2.0 spec currently requires devices to drop down to suspend current within 10ms of no bus activity, during both the attach debounce time (TATTDB) and during the reset time (TDRST). In practice, no devices do this. During USB compliance testing, suspend current is not tested until several seconds after the connect event.

The USB 2.0 spec would be modified such that a device is not required to drop down to the suspend current during the 1 second immediately following the connect event.

Tsuneo

IP: Logged

egawtry
Member
posted August 01, 2010 12:33 AM     Click Here to See the Profile for egawtry   Click Here to Email egawtry     Edit/Delete Message
Thanks Tsuneo,

I hope that is the solution. If it is, I will post the fix to the forum.

-Erik

IP: Logged

egawtry
Member
posted August 01, 2010 12:49 PM     Click Here to See the Profile for egawtry   Click Here to Email egawtry     Edit/Delete Message
No go. Any other ideas? This bug appeared from nowhere after working for years. I am using the SiLabs MSD code as my base.

Tsuneo, you may remember helping me debug it several years back. I noticed that SiLabs took most of our fixes we posted here and incorporated them into AN282SW. :-)

-Erik

P.S. They are still missing:

FLSCL |= 0x90; // set 48MHz for flash

After the clock init though.

[This message has been edited by egawtry (edited August 01, 2010).]

IP: Logged

Tsuneo
Member
posted August 01, 2010 11:45 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Please give us the details more.
1) Does it occur just after plug in of USB connector?
Or, wakeup after PC stand-by, or PC reboot?
What is the OS version?

2) Is your device bus-powered or self-powered?

3) When your firmware doesn't enable SUSEN (POWER.0) at all, (ie. if it always ignores Suspend), is it enumerated fine?

Tsuneo

[This message has been edited by Tsuneo (edited August 01, 2010).]

IP: Logged

egawtry
Member
posted August 02, 2010 11:35 AM     Click Here to See the Profile for egawtry   Click Here to Email egawtry     Edit/Delete Message
Hi Tsuneo,

1) Yes, on initial connection. Any version of Windows (W2K, XP, Vista) except Win7 (Win7 always works).
2) It is self-powered.
3) YES! However, is it safe to leave it like that? (I commented out the POWER = 0x01 in the USB Reset.)

After hacking for a few hours, it seems stable if I set POWER after a two second delay.

Thanks!
-Erik

P.S. After 9 days of 18 hour work days, finally some results! Thanks again.

[This message has been edited by egawtry (edited August 02, 2010).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b