Precautions for using wince USB Hub

Source: Internet
Author: User

After using the hub on ce, pay attention to the following points for the USB driver:

1. Make sure that the buffer for transmission is large enough.

2. If the USB sleep mode is set, make sure that the sleep mode is enabled during sleep.

 

Modify the buffer:

E: \ wince600 \ platform \ smdk6410 \ SRC \ drivers \ USB \ HCD \ cloud6410_ohci.c

// Amount of memory to use for HCD bufferstatic const DWORD gcTotalAvailablePhysicalMemory = 64*1024;    // 64Kstatic const DWORD gcHighPriorityPhysicalMemory = 16*1024;        // 16K

This is the buffer defined in the original code. If the hub is used to expand to Two USB, It is doubled.

Sleep processing:

See the following in the initializeohci () function:

    // PCI OHCI support suspend and resume    if ( hKey!=NULL)    {        DWORD dwCapability;        DWORD dwType;        DWORD dwLength = sizeof(DWORD);        if (RegQueryValueEx(hKey, HCD_CAPABILITY_VALNAME, 0, &dwType, (PUCHAR)&dwCapability, &dwLength) == ERROR_SUCCESS)        {            HcdMdd_SetCapability(pobOhcd, dwCapability);            USBH_INF((_T("[USBH:INF] InitializeOHCI() : USB Host Cap : 0x%08x\n"), dwCapability));        }        RegCloseKey(hKey);    }

To:

    // PCI OHCI support suspend and resume    if ( hKey!=NULL)    {        DWORD dwCapability;        DWORD dwType;        DWORD dwLength = sizeof(DWORD);        if (RegQueryValueEx(hKey, HCD_CAPABILITY_VALNAME, 0, &dwType, (PUCHAR)&dwCapability, &dwLength) == ERROR_SUCCESS)        {            dwCapability |= 0x01;            HcdMdd_SetCapability(pobOhcd, dwCapability);            USBH_INF((_T("[USBH:INF] InitializeOHCI() : USB Host Cap : 0x%08x\n"), dwCapability));        }        RegCloseKey(hKey);    }

 

The above situation occurs when the hub is used to connect to the 3G module for debugging. Now it has been basically corrected and is hereby recorded.

 

If you do not change the buffer size, after connecting to the 3G module, the serial port that is virtualized by USB appears, one serial port cannot perform at command interaction normally (normally there should be two serial ports that can perform at commands, one for dial-up Internet access and the other for AT command interaction such as SMS calls ).

If you do not ensure that the USB goes into the corresponding sleep processing when the system is sleeping, the USB goes down, causing the failure of the master u port.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.