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
[Cpp]
// Amount of memory to use for HCD buffer
Static const DWORD gcTotalAvailablePhysicalMemory = 64*1024; // 64 K
Static const DWORD gcHighPriorityPhysicalMemory = 16*1024; // 16 K
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:
[Cpp]
// 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:
[Cpp]
// 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.

Related Article

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.