This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to force a device to suspend



Hi,

 

I'm absolving a placement in a small Company right now and my job is to implement the USB API for the 5528 into the framework of this company.

I have tested the functionality of the USB API with the examples provided by TI and the Programms are running as planned.

 

In the beginning i had a problem with the USB_enable()-function in the usb.c of the API-version  3.0, since it started the XT2 oscillator with the parameter XT2DRIVE_3, even though the crystal works with 4Mhz on our board. Is this a setting that is different, depending on how the board is designed by us, or is it a mistace in the API?

If started with XT2_Start(XT2DRIVE_0); everything works just fine, if the known issue in the USB_suspend() is fixed. (USBPLLCTL &=~UPLLEN; has to be put out of the if-statement.)

The device gets suspended and resumed multiple times to complete enumeration but does so successfully after a short period of time.

 

The problem i have right now is, that in the examples as well as in our framework, the host never suspends the device once enumeration is complete and therefore never stops the PLL and XT2 oscillator. Since in our design the device isn't powered by the Vbus, we want the device to be in suspended mode as often as possible if no data is received or has to be send. with the forceRemoteWakeup enabled we would not have any problems with reactivating the usb-device if needed, i guess.

 

so, is it possible to force the host to set the device into suspended mode to save some energy? is there a command the device could send or something? The device should, of cause, still be able to detect if data is incoming, but i guess the host should resume the device before sending the data.

 

i read somewhere the host would suspend devices automaticly after 3ms of inactivity, but the pc isn't doing so. im using windows 7 with Hterm terminal.

 

Since I'm doing a placement and am still studying communications technologies this is all quite new for me. I'm learnign a lot but still lack lots of knowledge, as it seems. :)

 

with best regards,

 

Tobias Kleigrewe

  • > so, is it possible to force the host to set the device into suspended mode to save some energy?

    Usually, USB devices go to Suspend, just when host PC drops into Stand-by (global Suspend). But some PC device drivers may make the target device Suspend (Selective Suspend).

    For Windows, these class drivers support Selective Suspend.

    [ HID ]
    Enabling USB Selective Suspend for HID Devices
    http://msdn.microsoft.com/en-us/library/ff538662(VS.85).aspx

    [ MSC ]

    USB Hard Disk Drive Testing Overview - USB Selective Suspend
    http://msdn.microsoft.com/en-us/library/bb961621.aspx

    [ Still Image ]
    Running the Digital Still Camera Tests
    http://msdn.microsoft.com/en-us/library/dd834235.aspx

    [ WinUSB ]
    WinUSB Power Management
    http://msdn.microsoft.com/en-us/library/ff728834(VS.85).aspx
    * Selective Suspend
    The following power policy settings affect the behavior of selective suspend:
    - AUTO_SUSPEND
    - SUSPEND_DELAY

    The following table shows how the registry keys affect the selective suspend feature.
    - DeviceIdleEnabled
    - DeviceIdleIgnoreWakeEnable
    - UserSetDeviceIdleEnabled
    - DefaultIdleState
    - DefaultIdleTimeout


    Also, get "USB_select-susp.docx" on this page,
    Selective Suspend in USB Drivers
    http://msdn.microsoft.com/en-us/windows/hardware/gg463309.aspx

    Tsuneo

  • thanks for the reply,

     

    but since we are using a cdc interface on our usb-device none of this helps. i searched the internet even more and as it seems selective suspend isn't supported by the usbsers.sys driver that is used by the cdc device.

    since my time here is limited, i won't start trying to implement this functionality myself and will focus on implementing the usb-api into our framework properly.

     

    thanks for your help none the less.

     

    tobias kleigrewe

**Attention** This is a public forum