Change the usb device to a usb host in S3C2440 WINCE6 to implement two USB hosts.

Source: Internet
Author: User

The default value of S3C2440 is a usb device, a usb host, that is, a main port and a slave port. Let's take a look at the knowledge about USB Device and USB Host.

 

USB Host:

The bottom layer is the USB Host Controller, and the upper layer is the USB Host Controller Driver, which is responsible for communicating with hardware to transmit data. In WinCE, UHCI, OHCI, and EHCI are supported. Host Core Driver & Hub Driver is a hardware-independent USB protocol stack that supports the USB Host protocol and USB Hub functions. The upper layer is that the USB Host Class driver is the application protocol of the USB Host. Currently, in WinCE, four applications are supported: RNDIS, Print, Mass Storage, and HID.

 

USB Device:

The bottom layer is the USB Device controller, and the upper layer is the USB Device Driver responsible for communication with hardware. The Device Core Driver is the protocol stack of the USB Device. The top layer is the application layer of the USB Device. Currently, the RNDIS, Serial, and Mass Storage applications are supported in WinCE.

 

In Catalog Items View,

USB Function Driver: used to support USB Device drivers.

USB Host Support: used to Support USB Host Controller drivers.

 

To change the USB Device to a USB Host, both hardware and software must be modified.

For hardware, see the schematic diagram. It seems that two resistors need to be modified;

Software: First remove the USB Function driver. You can set BSP_NOUSBFN = 1, and then modify the miscr register value, miscr [3] SEL_USBPAD: USB1 Host/Device select register. 0 = Use USB1 as Device, 1 = USE USB1 as Host. change the 3rd-bit miscr value to 1. modify this value in the initialization function and add a line of code s2440IOP-> miscr |=( 1 <3 );

 

---------------------------------------------------------------------

Respect others' labor results, reprinted please indicate the source http://www.cnblogs.com/feishanm

 

 

 

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.