28 USB on-the-go full-speed (OTG_FS)

Started by tha, June 06, 2022, 07:51:11 AM

Previous topic - Next topic

tha

28.3.2 OTG full-speed core

The USB OTG FS รับ the 48 MHz ±0.25% clock จาก the reset and clock controller(RCC), โดยทาง an external quartz. The USB clock ถูกใช้สำหรับการขับ the 48 MHz domain ที่ full-speed(12 Mbit/s) และต้องถูกเปิดใช้งานก่อนการกำหนดค่า the OTG FS core.

The CPU อ่านและเขียนจาก/ถึง the OTG FS core registers ผ่านทาง the AHB peripheral bus. มันถูกแจ้ง USB events ผ่านทาง the single USB OTG interrupt line ที่อธิบายใน Section 28.15: OTG_FS interrupts.

The CPU ส่ง data ผ่าน the USB โดยการเขียน 32-bit words ไปยัง dedicated OTG_FS locations (push registers). The data ดังนั้นถูกเก็บโดยอัตโนมัติลงใน Tx-data FIFOs ที่กำหนดค่าไว้ภายใน the USB data RAM. มี one Tx-FIFO push register สำหรับแต่ละ in-endpoint (peripheral mode) หรือ out-channel (host mode).

The CPU รับ the data จาก the USB โดยการอ่าน 32-bit words จาก dedicated OTG_FS addresses (pop registers). The data ดังนั้นถูกดึงโดยอัตโนมัติจาก a shared Rx-FIFO ที่กำหนดค่าไว้ภายใน the 1.25 KB USB data RAM. มี one Rx-FIFO pop register สำหรับแต่ละ out-endpoint หรือ in-channel.

The USB protocol layer ถูกขับโดย the serial interface engine (SIE) และทำให้เป็นอนุกรมผ่าน the USB โดย the full-/low-speed transceiver module ภายใน the on-chip physical layer (PHY).

tha

28.3.3 Full-speed OTG PHY

The embedded full-speed OTG PHY ถูกควบคุมโดย the OTG FS core และถ่ายทอด USB control & data signals ผ่าน the full-speed subset of the UTMI+ Bus (UTMIFS). มันจัดให้มี the physical รองรับต่อ USB connectivity
The full-speed OTG PHY รวมส่วนประกอบต่อไปนี้:
•   FS/LS transceiver module ที่ใช้โดยทั้ง host and device. มันขับ transmission and reception โดยตรงบน the single-
     ended USB lines.
•   integrated ID pull-up resistor ที่ใช้เพื่อสุ่ม the ID line สำหรับ A/B device identification.
•   DP/DM integrated pull-up and pull-down resistors ที่ควบคุมโดย the OTG_FS core ขึ้นอยู่กับบทบาทปัจจุบันของ the
     device. เป็น a peripheral, มันเปิดใช้งาน the DP pull-up resistor เพื่อส่งสัญญาณ full-speed peripheral connections ทันที
     ที่ VBUS ได้รับสัญญานว่าอยู่ที่ a valid level (B-session valid). ใน host mode, pull-down resistors ถูกเปิดใช้งานบนทั้ง
     DP/DM. Pull-up and pull-down resistors ถูกสลับแบบไดนามิกค์เมื่อ the device's role ถูกเปลี่ยนโดยทาง the host
     negotiation protocol (HNP).
•   Pull-up/pull-down resistor ECN circuit. The DP pull-up ประกอบด้วย 2 resistors ที่ควบคุมแยกกันจาก the OTG_FS ตาม
     the resistor Engineering Change Notice ที่ใช้กับ USB Rev2.0. การตัดแต่งแบบไดนามิกของ the DP pull-up strength ยอม
     เพื่อ better noise rejection และ Tx/Rx signal quality.
•   VBUS sensing comparators ที่มี hysteresis ที่ใช้เพื่อตรวจหา VBUS Valid, A-B Session Valid และ session-end voltage
     thresholds(ขอบเขต(บน-ล่าง)). พวกมันถูกใช้เพื่อขับ the session request protocol (SRP), ตรวจหา valid startup และ end-
     of-session conditions, มอนิเตอร์ the VBUS supply อย่างคงที่ในระหว่าง USB operations.
•   VBUS pulsing method circuit ที่ใช้เพื่อ charge/discharge VBUS ผ่าน resistors ในระหว่าง the SRP (weak drive).

tha



tha

28.4.1 ID line detection

The host หรือ peripheral (ค่าเริ่มต้น) role ถูกถือว่าขึ้นอยู่กับ the ID input pin (OTG_FS_ID). The ID line status ถูกกำหนดเมื่อเสียบ the USB, ขึ้นอยู่กับว่า
ข้างไหนของ the USB cable ถูกเชื่อมต่อกับ the micro-AB receptacle.

•   ถ้า the B-side of the USB cable ถูกต่อกับ a floating ID wire, the integrated pull-up resistor ตรวจพบ a high ID level
     และ the default Peripheral role ถูกยืนยัน. ในการกำหนดค่านี้ the OTG_FS สอดคล้องกับ the standard FSM ที่อธิบายโดย
     section 6.8.2: On-The-Go B-device of the On-The-Go Specification Rev1.3 เสริมสำหรับ the USB2.0.
•   ถ้า the A-side of the USB cable ถูกต่อกับ a grounded ID, the OTG_FS ปล่อยออก an ID line status เปลี่ยน interrupt
    (CIDSCHG bit in OTG_FS_GINTSTS) สำหรับ host software initialization, และสลับโดยอัตโนมัติไปยัง the host role. ใน
    การกำหนดค่านี้ the OTG_FS สอดคล้องกับ the standard FSM ที่อธิบายโดย section 6.8.1: On-The-Go Adevice of the On-
    The-Go Specification Rev1.3 เสริมสำหรับ the USB2.0.

tha

28.4.2 HNP dual role device

The HNP capable bit ใน the Global USB configuration register (HNPCAP bit ใน OTG_FS_GUSBCFG) เปิดใช้งาน the OTG_FS core เพื่อเปลี่ยนแบบไดนามิกค์บทบาทของมันจาก A-host ไปเป็น A-peripheral และในทางกลับกัน, หรือจาก B-Peripheral ไปเป็น B-host และในทางกลับกันตรงตาม the host negotiation protocol (HNP). The current device status สามารถถูกอ่านโดยค่าที่รวมกันของ the Connector ID Status bit ใน the Global OTG control and status register (CIDSTS bit ใน OTG_FS_GOTGCTL) และ the current mode of operation bit ใน the global interrupt and status register (CMOD bit in OTG_FS_GINTSTS).

The HNP program model ถูกอธิบายอย่างละเอียดใน Section 28.17.

tha

28.4.3 SRP dual role device

The SRP capable bit ใน the global USB configuration register (SRPCAP bit ใน OTG_FS_GUSBCFG) เปิดใช้งาน the OTG_FS core เพื่อปิดการสร้าง VBUS สำหรับ the A-device เพื่อประหยัดพลังงาน. โปรดทราบว่า the A-device มีหน้าที่ในการขับ VBUS เสมอโดยไม่คำนึงถึง the host or peripheral role of the OTG_FS.

the SRP A/B-device program model ถูกอธิบายอย่างละเอียดใน Section 28.17.

tha

28.5 USB peripheral

section นี้ให้ the functional description of the OTG_FS ใน the USB peripheral mode. The OTG_FS ทำงานเป็น an USB peripheral ในสถานการณ์ต่อไปนี้:
•   OTG B-Peripheral
    –   OTG B-device default state ถ้า B-side of USB cable ถูกเสียบ
•   OTG A-Peripheral
    –   OTG A-device state หลังจาก the HNP สลับ the OTG_FS ไปเป็น peripheral role ของมัน
•   B-device
    – ถ้า the ID line ปรากฎ, หน้าที่และต่อถึง the B-side of the USB cable, และ the HNP-capable bit in the Global USB
       Configuration register (HNPCAP bit in OTG_FS_GUSBCFG) จะถูกเคลียร์ (ดู On-The-Go Rev1.3 par. 6.8.3).
•   Peripheral only (ดู Figure 305)
    – The force device mode bit ใน the Global USB configuration register (FDMOD in OTG_FS_GUSBCFG) ถูกเซ็ตเป็น
       1, บังคับ the OTG_FS core ให้ทำงานเป็น a USB peripheral-only (ดู On-The-Go Rev1.3 par. 6.8.3). ในกรณีนี้, the ID
       line จะถูกเพิกเฉยแม้ว่าปรากฎบน the USB connector.

Note:  ในการสร้าง a bus-powered device implementation ในกรณีของ the B-device or peripheral-only configuration, an
           external regulator ต้องถูกเพิ่มเพื่อสร้าง the VDD chip-supply จาก VBUS.



tha

28.5.1 SRP-capable peripheral

The SRP capable bit ใน the Global USB configuration register (SRPCAP bit ใน OTG_FS_GUSBCFG) เปิดใช้งาน the OTG_FS เพื่อรองรับ the session request protocol (SRP). ในวิธีนี้, มันยอมให้ the remote A-device ประหยัดพลังงานโดยการปิด VBUS ในขณะที่ the USB session ถูกแขวน.

The SRP peripheral mode program model ถูกอธิบายอย่างละเอียดใน the B-device session request protocol section.