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.