Usbh_en (corresponding to gpg6) of is used to power the USB host, which needs to be controlled in BSP and can be used in init. the following code is used in the oeminit ()-> configuregpio () function of the C file:
// Ser gpg6 to output an usbh_en
S2440iop-> gpgcon & = ~ (3 <12 );
S2440iop-> gpgcon | = (1 <12); // output
S2440iop-> gpgup | = (1 <6); // pullup disable
S2440iop-> gpgdat | = (1 <6); // gpg6 output high level to enbale USB Host
Use the above Code to enable the power supply to the USB host. Of course, the code behind the BSP package of the landlord must ensure that the gpg6 configuration cannot be changed after the above code is executed, otherwise, the previous control code will be invalid.
If gpg6 is not output as a high level: access to the USB mouse, the power indicator of the USB mouse will also be on (if it is a USB flash drive, it will always be on, and the USB flash drive cannot be identified ), however, vbus is about 3.4v. If gpg6 is output to a high level: When the USB mouse is connected, the power indicator of the USB mouse will be on (if it is a USB flash, then it will be on until it is on, You can normally identify the USB flash drive ), vbus = 5 V or so, which is the power supply voltage that allows the USB mouse to work normally. The landlord should ensure this.
Note: It is the design of our product. The circuit design method of your product for USB host is not necessarily the same. I just want to clarify the problem, and my CPU is S3C2440.