Search by Tags

Colibri PXA USB host driver registry settings

 

Compare with Revision




Subscribe for this article updates

USB DMA buffer

The default buffer size for the USB DMA is 128KB (0x0002_0000 bytes). This is sufficient for most use cases.

However, more memory may be required if multiple USB devices need to be connected simultaneously. The number and type of USB endpoints define the total required buffer size.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\OHCI]
PhysicalPageSize=dword:0x00020000 

General USB Host Registry Settings

BSP Version 3.3 and onwards:

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\OHCI]
"OCEnable"=dword:0x00000001     ;Over current enable, default 1. If 0 you can use the OverCurrent GPIO as normal GPIO 
"OCPol"=dword:0x00000000        ;Over current polarity, default 0 (Low Active) 
"PENGpio"=dword:0xffffffff      ;Power enable GPIO, default -1 (SODIMM pin129). For no GPIO choose -2                   
"PENPol"=dword:0x00000000       ;Power enable polarity, default 0 (Low Active) For Colibri PXA310 see note below!!
"PENAlwaysOn"=dword:0x00000001  ;Power enable always on, default 1. 0: PEN disabled when USB Client is detected  

Colibri PXA310: PENPol

Due to on module circuits, it is not possible to change the power-enable polarity (PENPol) of the Colibri PXA310 module if using the default PEN pin (SODIMM 129). Changing the polarity to 1 (high active) will always disable the USBH port on the module.
Workaround:

  • Use an inverter on the carrier board to provide the correct polarity.
  • Use a different PENGpio (not SODIMM pin 129).

Reset USB Device on Error

BSP Version 4.2 and onwards:
If an USB device doesn't react on a SetOrClearFeature request, it is now possible to reset this USB device automatically. The behavior can be configured through the following registry setting. The default setting doesn't reset the USB device. It's not necessary to use this feature normally. It could help with issues with some USB devices. Try a setting 2 in case you want to check if this might help in your case.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\OHCI]
"ResetDeviceOnError"=dword:0x00000000   ; 0: no reset
                                        ; 1: reset if device doesn't respond 
                                        ; 2: reset on any USB error
                                        ; 4: reset on IssueTransfer status error
                                        ; 8: reset if transfer not done.

USB Host Driver Dependencies

USB Host (OHCI) and USB Client (USBFN) driver are linked. Both drivers have to be enabled even if you need one driver only.