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.