Abstract: If you are new to USB, it is helpful to understand some USB terminology before delving into Maxim ’s USB application notes. This application note introduces basic USB terminology, especially for the MAX3420E USB controller and MAX3421E USB peripheral / host controller.

Host feature rate in-out direction endpoint hub enumeration Chapter 9 (more on enumeration)
SIE
Data trigger control transmission, batch transmission, interrupt transmission, synchronous transmission bus reset
USB driver

The host USB is a "master-slave" bus, including a host and multiple slaves. The slave is called a peripheral, and is also called a functional part in USB terminology. The host is called the master device. All USB transfers are initiated by the host; peripherals always respond to transfers, and do not initiate transfers. The most commonly used host is a PC. The host is connected to the downstream device through a USB-A connector. The embedded host does not include a PC, but uses a microcontroller as a dedicated host, which may only communicate with a class of USB devices.

The MAX3421E is connected to the controller to form an embedded host.

Functional components Functional components are USB devices, also known as USB peripherals. USB peripherals are the "downstream" devices of the host and are connected using a USB B-type connector. MAX3420E is a peripheral controller. The MAX3421E can be used as a USB host or peripheral controller.

The rate USB 2.0 standard specifies the following three transfer rates: The low-speed mode transfer rate is 1.5Mbps, which is mostly used for keyboards and mice. The full-speed mode transmission rate is 12Mbps. The high-speed mode transmission rate is 480Mbps.

There is some confusion about the concept of "USB 2.0 compatible" on the market. This confusion stems from the upgrade of the USB standard version. USB 1.0 was first introduced, followed by USB 1.1, which is more ideal than 1.0. USB1.x supports both low-speed and full-speed USB bus speeds. Version 2.0 adds a high-speed mode, which completely replaces 1.1. Therefore, if you are using a full-speed device operating at 12 Mbps, you can consider it compatible with USB 2.0, even if many people only use USB 2.0 for high-speed (480 Mbps) operation.

The MAX3420E is a full-speed peripheral. The MAX3421E is a full-speed peripheral or full-speed / low-speed host.

The USB system in the in-out direction is centered on the host. Therefore, the interpretation of USB terminology assumes that the host is targeted. Therefore, from the host side, "in" indicates the transmission direction from the peripheral to the host; similarly, "out" indicates the transmission direction from the host to the peripheral.

When writing code to the MAX3420E to load "INFIFO", the data is sent by the chip, this definition seems a bit strange. However, if you keep in mind that the host is the main controller, it will be easy to understand.

Endpoint The endpoint is located inside the USB peripheral. The source or destination of all communication data is based on these endpoints and is an addressable FIFO. Each USB has a unique address, which may contain up to sixteen endpoints. The host sends data to a specific endpoint (FIFO) by sending out the device address and the endpoint number of each data transfer.

The address of each endpoint is 0 to 15, and one endpoint address corresponds to one direction. Therefore, endpoint 2-IN is completely different from endpoint 2-OUT. Each device has a default bidirectional control endpoint 0, so there is no endpoint 0-IN and endpoint 0-OUT.

The number of endpoints in the peripheral is arbitrary. During enumeration, the peripheral reports its endpoint number and characteristics to the host.

The MAX3420E provides the following endpoints: EP0: Default Control Point (CONTROL) EP1-OUT EP2-IN EP3-IN

When working as a peripheral, the MAX3421E provides the same endpoints as the MAX3420E. However, when used as a host, the MAX3421E uses SNDFIFO and RCVFIFO to transfer data to all peripheral addresses and endpoints. The MAX3421E firmware loads the functional part address and the desired endpoint number into the register, and then sends the data packet.

Hub The hub expands the number of devices that the USB host can connect to. The USB controller of the PC has a built-in hub, which is responsible for completing some low-level USB functions, such as detecting the insertion or removal of the device. The hub is connected to the upstream port (to the PC) at full speed or high speed, and to the downstream port (to the peripheral) at low speed, full speed, or high speed. The PC's root hub can provide 5V, 500mA power for each type A connector. A bus-powered external hub can provide 100mA per port. Since USB distributes 100mA of current to the external hub circuit, a bus-powered hub can have four downstream ports. If the hub has its own power supply (self-powered), each downstream port can provide up to 500mA.

The MAX3420E firmware does not know how many devices are connected to the hub. The MAX3421E provides a specific mode for communicating with low-speed peripherals connected to the hub.

When enumerating a USB device, the host gets a connection notification and then recognizes what was just inserted. The host needs to get a series of descriptors (data tables), which come from the inserted device. When all USB devices are inserted into the USB port, the host communicates with the device through the default CONTROL endpoint 0. If the host confirms that the data it receives from the device is correct, it configures the device to start working. If the host considers that the data of the device is incorrect (for example, a descriptor data conflicts or exceeds the specification), the device is ignored. A dialogue window will pop up, indicating that something is wrong with the USB device.

Chapter 9 (more information on enumeration) Chapter 9 of the USB standard defines all requests sent by the host to the peripheral during enumeration, and the data format of the peripheral's response. If you visit the official USB website, you will find a software tool called USBCV (USB Command Verifier), part of which is called "Chapter 9 Testing." These tests can prove that your enumeration code is correct. USBCV is also used in USB laboratory testing. Therefore, if this USB verification has been passed in your own laboratory, laboratory testing will not be a problem.

Maxim provides an application note on the MAX3420E, which contains enumeration code that has passed USBCV testing.

SIESIE refers to the serial interface engine and is the "core" inside all USB controllers. SIE is responsible for handling the underlying protocols, such as padding bits, CRC generation and verification, and can issue error reports. The main task of SIE is to convert low-level signals into bytes for use by the controller. Some SIEs will be more advanced and flexible. The more low-level signal details it processes, the simpler it is to control the firmware. For example, some SIEs only report the results of endpoint data triggering (see below) and leave it to the firmware to determine how to handle it.

The data triggers the USB packet to start from PID or ID. Two types of PIDs are used for data transmission: DATA0 and DATA1. Both the host and peripherals contain data trigger bits, one for each endpoint. The trigger bit determines which of these data PIDs is used for data transmission. When the peripheral device comes out of reset, both the host and the peripheral device reset their internal data trigger bits to zero. Therefore, the first DATA0 PID packet is transmitted.

When the data packet transmission is correct (the sender receives the ACK PID signal, indicating that the data transmission is correct), the sender and receiver compensate their data trigger values. Then use the DATA1 PID to send the second data packet to the endpoint. After successful transmission, the DATA0 PID and DATA1 PID data packets are sent alternately (or triggered again). USB uses this mechanism as part of its error correction.

The MAX3420E can automatically maintain the data trigger. Firmware is only required when the device is reconfigured or the host sends a Clear_Feature (ENDPOINT HALT) request. The MAX3420E contains register bits to clear the trigger bit for each endpoint. When acting as a host, once the endpoint's trigger value is correctly set, the MAX3421E maintains the data trigger value. After completing the transfer to a specific endpoint, the firmware usually saves the trigger value. Then initialize the trigger before transmitting data to the same endpoint. During transmission of multiple packets to the same endpoint, SIE maintains the data trigger value.

Control transmission, batch transmission, interrupt transmission, and synchronous transmission USB have the above four transmission types. During enumeration, the peripheral tells the host which transmission type each endpoint supports.

Only the host can issue a control transmission, which consists of two or three segments. First send a specific host request by setting a data packet (8 bytes long). Then use an optional packet to move data such as the descriptor table. Finally, a handshake (status) packet is used to terminate the control transmission. As a "critical" transmission, control transmission has high bus priority and the most comprehensive error checking. Each USB peripheral requires a default control endpoint 0.

Batch transmission uses flow control and error check to move data. The batch transmission is asynchronous, which means that the scheduled transmission time is not fixed or cannot be guaranteed. The priority of the host to arrange bulk transmission is low. This does not mean that bulk transfer is slow; if the bus is lightly loaded, bulk transfer can be performed on all available bandwidth.

In fact, it is difficult to distinguish between interrupted transmission and batch transmission. The only difference between them is that the interruption point contains the polling interval value, which is used to tell the host how often to "ping" the endpoint. So the only difference between batch and interrupted transmission is how often the host schedules a transmission.

Isochronous (ISO) transmission is used for data streams, such as audio or video, where data must arrive in time to avoid interruption of audio or video data. When the device enumerates, it tells the host that its ISO endpoint requires bandwidth. If the bandwidth is appropriate, the host guarantees to send a USB frame every 1ms, including an ISO data packet to or from the device. ISO does not use handshake (ACK / NAK) or bus retry. Synchronous transmission is only suitable for full-speed and high-speed devices.

The MAX3420E (or MAX3421E in peripheral mode) has a default control endpoint of 0, and there are three other endpoints that can be used as bulk or interrupt endpoints. The MAX3421E (host) initiates transmission to all four types of endpoints.

The bus reset host resets the USB peripheral by issuing a bus reset signal. Differential signals are commonly used on D + and D- lines of full-speed and low-speed USB. But there are exceptions. The bus reset and end-of-packet signals use single-ended zero signals. At this time, D + and D- are both low.

The MAX3420E detects a bus reset and generates an interrupt signal. When the microcontroller connected to it sets the counter bit, the MAX3421E (host) generates a bus reset signal and then waits for the interrupt to complete.

USB driver Windows® has built-in drivers that support various USB devices. If the firmware supports one of these standard devices, USB products do not need to install custom drivers (no one really wants to write Windows drivers). Windows contains standard device drivers such as HID (Human Machine Interface Device) and mass storage (disk drive, CD-ROM, memory stick).

Air Filter: Prevents harmful debris, dirt and contaminants from entering your engine.

Engine protection is the name of the game.So is engine performance. Acceleration can improve up to after an old, dirty air filter is replaced. Our Pennzoil air filters are engineered to trap harmful contaminants that can damage your engine.

Old and dirty air filters lead to reduced engine power, decreased throttle response, weaker acceleration and increased engine wear. Sounds ugly. Well, it is, and you should have it replaced when it gets bad.


Air Filter

Automotive Air Filter,Car Air Filter,Air Filter Cartridge

Donguan Bronco Filter Co., Ltd , https://www.broncofilter-cn.com