Wince control of USB Host Power Supply

Source: Internet
Author: User

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.

 

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.