diff --git a/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1.png b/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1.png
new file mode 100644
index 0000000..795f7a8
Binary files /dev/null and b/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1.png differ
diff --git a/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1en.png b/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1en.png
new file mode 100644
index 0000000..a9985a5
Binary files /dev/null and b/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1en.png differ
diff --git a/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2.png b/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2.png
new file mode 100644
index 0000000..8e73148
Binary files /dev/null and b/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2.png differ
diff --git a/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2en.png b/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2en.png
new file mode 100644
index 0000000..25ca941
Binary files /dev/null and b/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2en.png differ
diff --git a/assets/images/faq/wifiaudio_bl/FCM362K_problem_5.png b/assets/images/faq/wifiaudio_bl/FCM362K_problem_5.png
new file mode 100644
index 0000000..6089555
Binary files /dev/null and b/assets/images/faq/wifiaudio_bl/FCM362K_problem_5.png differ
diff --git a/assets/images/faq/wifiaudio_bl/FCM362K_problem_5en.png b/assets/images/faq/wifiaudio_bl/FCM362K_problem_5en.png
new file mode 100644
index 0000000..a37b4f8
Binary files /dev/null and b/assets/images/faq/wifiaudio_bl/FCM362K_problem_5en.png differ
diff --git a/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1.png b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1.png
new file mode 100644
index 0000000..795f7a8
Binary files /dev/null and b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1.png differ
diff --git a/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1en.png b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1en.png
new file mode 100644
index 0000000..a9985a5
Binary files /dev/null and b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1en.png differ
diff --git a/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2.png b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2.png
new file mode 100644
index 0000000..8e73148
Binary files /dev/null and b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2.png differ
diff --git a/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2en.png b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2en.png
new file mode 100644
index 0000000..25ca941
Binary files /dev/null and b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2en.png differ
diff --git a/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_5.png b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_5.png
new file mode 100644
index 0000000..6089555
Binary files /dev/null and b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_5.png differ
diff --git a/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_5en.png b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_5en.png
new file mode 100644
index 0000000..a37b4f8
Binary files /dev/null and b/en/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_5en.png differ
diff --git a/en/docs/dev_doc/faq/technical_faq/a316_firmware_dev_faq.md b/en/docs/dev_doc/faq/technical_faq/a316_firmware_dev_faq.md
new file mode 100644
index 0000000..303b47f
--- /dev/null
+++ b/en/docs/dev_doc/faq/technical_faq/a316_firmware_dev_faq.md
@@ -0,0 +1,123 @@
+---
+title: A316 Series Product Firmware Development FAQ
+description: This document provides common issues and solutions encountered during A316 series product firmware development, including XU316 communication issues, device power supply problems, etc., helping developers quickly resolve development challenges.
+keywords: A316 firmware development, XU316 communication issues, USB device power supply, firmware development FAQ, device recognition problems
+---
+
+--8<-- "common/phaten_xmos_support_img.md"
+
+# A316 Series Product Firmware Development FAQ
+
+!!! Note
+ 1. The solutions provided in this document are based on the A316-HF-DAC development board. Other A316 series products may have different communication issues and solutions.
+ 2. The following problem solutions use A316-HF-DAC as an example. Other A316 series products may need adjustments based on actual conditions.
+
+## Communication Issues
+
+### Q1: XU316 cannot send/receive data when connected to PC or MCU via serial port, and logic analyzer cannot capture data
+
+
+
+=== "Problem Symptoms"
+ - XU316 cannot send/receive data when connected to PC via serial port
+ - Logic analyzer cannot capture communication data
+ - Cannot receive messages sent by XU316
+
+=== "Possible Causes"
+ 1. Insufficient MCU response speed
+ - MCU is processing other initialization tasks while XU316 has already completed initialization
+ 2. Power supply issues
+ - MCU is not providing power to XU316
+
+=== "Problem Analysis"
+ 1. Initialization timing issues
+ - XU316 sends 4 power-on commands (0x00) after power-up
+ - 300ms interval between each command
+ - If initialization is not completed or no response is given before the 4 commands are sent, communication fails
+ 2. Power supply issues
+ - Insufficient power supply to XU316 will cause startup failure
+
+=== "Solutions"
+ 1. Optimize initialization process
+ - Prioritize XU316 configuration
+ - Ensure initialization is completed before XU316 sends power-on commands
+ 2. Check power supply design
+ - Check hardware design
+ - Perform hardware modifications if necessary (flying wires, short circuits, etc.)
+
+
+
+### Q2: Sending IIS in command is ineffective when WiFi is in slave mode
+
+
+
+=== "Problem Symptoms"
+ 1. After normal connection and power-up, current mode shows USB, but sending IIS in command has no effect
+
+=== "Possible Causes"
+ 1. Firmware function limitations
+ - Current firmware does not support mode switching from WiFi (IIS slave) to XMOS (IIS master)
+
+=== "Problem Analysis"
+ 1. Communication status
+ - Commands can communicate normally
+ - But mode switching function does not take effect
+ 2. Function limitations
+ - Firmware has not implemented the conversion function from WiFi slave mode to XMOS master mode
+
+=== "Solutions"
+ 1. Modify connection method
+ - Mount WiFi module to Bluetooth module
+ - Implement mode switching function through Bluetooth module
+
+
+
+## Device Recognition Issues
+
+### Q1: Device is recognized and plays normally on PC, but mobile phone cannot recognize the device
+
+
+
+=== "Problem Symptoms"
+ 1. Device can be recognized and play normally on PC
+ 2. Cannot recognize device when connected to mobile phone
+
+=== "Possible Causes"
+ 1. Power supply mode issues
+ - When mobile phone acts as output device, it should provide power to the device
+
+=== "Problem Analysis"
+ 1. Power supply mode conflict
+ - Mobile phone shows charging status when connected to device
+ - Causes mobile phone to fail to output audio normally
+
+=== "Solutions"
+ 1. Modify device power supply design
+ - Check and optimize device power supply section
+ - Adjust discharge section design
+ - Ensure device can correctly receive power when connected to mobile phone
+
+
+
+
+
diff --git a/en/docs/dev_doc/faq/technical_faq/technical_faq.md b/en/docs/dev_doc/faq/technical_faq/technical_faq.md
new file mode 100644
index 0000000..55eb0b7
--- /dev/null
+++ b/en/docs/dev_doc/faq/technical_faq/technical_faq.md
@@ -0,0 +1,134 @@
+---
+title: Common Questions and Answers for WiFi Audio + Bluetooth Modules
+description: This document summarizes common technical questions and answers regarding wireless WiFi modules and Bluetooth modules, including IR remote decoding, power consumption, chip architecture, TX/RX switching, Bluetooth TWS, etc., to help developers quickly locate and solve problems.
+keywords: 8711, wireless speaker, IR remote, module power consumption, WIFI BT chip, TX RX switching, Bluetooth TWS, technical FAQ
+---
+
+--8<-- "common/phaten_xmos_support_img.md"
+
+# Technical FAQ for WiFi Audio + Bluetooth Modules
+
+## Q1: Does the module support IR remote decoding?
+
+**IR remote decoding is supported.**
+
+---
+
+## Q2: Power consumption during module operation and standby
+
+=== "Sleep Mode 1"
+ - **Operating state**: Both TX/RX are in sleep, WiFi is off, TX and RX BLE are working
+ - **How to enter sleep**:
+ - The application actively calls the Sleep interface
+ - Automatically enters after detecting no I2S data for a period of time
+ - **Wake-up method**:
+ - UART/GPIO interrupt wakes up TX → TX wakes up RX
+ - UART/GPIO interrupt wakes up RX → RX wakes up TX (bi-directional wake-up)
+ - **Current**:
+ - Unidirectional wake-up: TX ≤1mA, RX ≤3mA
+ - Bidirectional wake-up: TX ≤3mA, RX ≤3mA
+
+=== "Sleep Mode 2"
+ - **Operating state**: TX WiFi does not sleep, RX WiFi sleeps, TX/RX BLE are off
+ - **How to enter sleep**:
+ - The application actively calls the Sleep interface
+ - Automatically enters after detecting no I2S data for a period of time
+ - **Wake-up method**:
+ - The application calls the playback interface (TX automatically wakes up RX)
+ - RX is automatically woken up when I2S data is detected
+ - **Current**: RX ≤1mA
+
+---
+
+## Q3: What is the WIFI and BT chip architecture of the module?
+
+A single SoC integrates both WIFI and BT functions.
+
+---
+
+## Q4: Does it support online TX/RX switching?
+
+### Support status:
+- Supports online TX/RX switching in WIFI mode
+- BT mode limitations:
+ - SoC only supports BLE5.0
+ - Does not support Classic BT
+ - Cannot transmit audio via mobile phone Bluetooth
+
+### Working mode description:
+
+=== "**TV Mode**:"
+ - The transmitter box is WIFI TX
+ - The receiving speakers are dual RX (left/right channels)
+
+ 
+
+=== "**BT Mode**:"
+ - Left speaker:
+ * Receives mobile phone signal via BT
+ * Simultaneously acts as WIFI TX to transmit to the right speaker
+ - Right speaker: pure WIFI RX mode
+
+ 
+
+---
+
+## Q5: Bluetooth TWS function implementation
+
+- **Native Bluetooth TWS is not supported**
+- **Alternative solution**:
+ - In BT mode, the left speaker (with IR receiver) acts as TX
+ - Transmits the right channel to the right speaker via TWS
+ - The right speaker (without IR receiver) acts as RX to receive the TWS signal
+
+
+
+
+
\ No newline at end of file
diff --git a/en/docs/dev_doc/protocols/xu316_zerocode_protocol.md b/en/docs/dev_doc/protocols/xu316_zerocode_protocol.md
index fd101a5..3e1daea 100644
--- a/en/docs/dev_doc/protocols/xu316_zerocode_protocol.md
+++ b/en/docs/dev_doc/protocols/xu316_zerocode_protocol.md
@@ -1,83 +1,83 @@
---
-title: XU316 USB HiFi解码器免开发产品配置协议
+title: XU316 USB HiFi Decoder Zero-Development Product Configuration Protocol
status: new
-description: XU316 USB HiFi解码器免开发产品配置协议文档
+description: XU316 USB HiFi Decoder Zero-Development Product Configuration Protocol Documentation
authors:
- admin
tags:
- - 协议
+ - Protocol
- XU316
- - USB音频
+ - USB Audio
- UART
search:
boost: 2
---
-# XU316 USB HiFi解码器免开发产品配置协议
+# XU316 USB HiFi Decoder Zero-Development Product Configuration Protocol
--8<-- "common/phaten_xmos_support_img.md"
-## 协议概述 :material-file-document-outline:
+## Protocol Overview :material-file-document-outline:
-!!! abstract "功能定位与范围"
- 本文档详细描述了XU316 USB HiFi解码器免开发产品与MCU之间通过UART进行通信的配置协议。该协议提供了音频设备配置、状态监控和媒体控制的完整功能集。
+!!! abstract "Function Positioning and Scope"
+ This document provides a detailed description of the configuration protocol for communication between the XU316 USB HiFi Decoder zero-development product and MCU via UART. This protocol offers a complete feature set for audio device configuration, status monitoring, and media control.
-## 一、协议基础规范 :material-connection:
+## I. Protocol Foundation Specifications :material-connection:
-### 1.1 底层通信协议
+### 1.1 Underlying Communication Protocol
-**基于UART (Universal Asynchronous Receiver/Transmitter) 协议**
+**Based on UART (Universal Asynchronous Receiver/Transmitter) Protocol**
-| 参数 | 值 |
+| Parameter | Value |
|:---------------:|:--------------------:|
-| 波特率 | 115200 bps |
-| 数据位 | 8 |
-| 奇偶校验 | 无 |
-| 停止位 | 1 |
-| 数据流控 | 无 |
+| Baud Rate | 115200 bps |
+| Data Bits | 8 |
+| Parity | None |
+| Stop Bits | 1 |
+| Flow Control | None |
-### 1.2 帧格式与数据传输
+### 1.2 Frame Format and Data Transmission
-!!! example "通用帧格式"
- 所有命令和响应均遵循以下帧格式:
+!!! example "Universal Frame Format"
+ All commands and responses follow the following frame format:
- | 字段 | 字节数 | 说明 |
+ | Field | Bytes | Description |
|:----------:|:--------:|:-----------------------------------------:|
- | 帧头 | 2 | 固定为0x55aa |
- | 版本 | 1 | 协议版本号 |
- | 命令字 | 1 | 指示帧的功能 |
- | 数据长度 | 1 | 后续数据的长度N,不包含最后的校验和字节 |
- | 数据 | N | 具体的数据内容 |
- | 校验和 | 1 | 从帧头开始按字节求和,结果对256求余 |
+ | Frame Header | 2 | Fixed as 0x55aa |
+ | Version | 1 | Protocol version number |
+ | Command Word | 1 | Indicates frame function |
+ | Data Length | 1 | Length N of subsequent data, excluding the final checksum byte |
+ | Data | N | Specific data content |
+ | Checksum | 1 | Sum of bytes starting from frame header, result modulo 256 |
-!!! warning "数据传输说明"
- 所有大于1个字节的数据均采用 **大端模式** 传输。协议中示例数据均以十六进制表示。
+!!! warning "Data Transmission Notes"
+ All data larger than 1 byte is transmitted using **big-endian mode**. Sample data in the protocol is represented in hexadecimal.
-### 1.3 通信机制
+### 1.3 Communication Mechanism
-#### 1.3.1 确认机制
+#### 1.3.1 Acknowledgment Mechanism
-!!! tip "确认与超时处理"
- - 所有命令均需对方回复确认
- - 默认命令超时时间为300ms,超时后视为通信失败
- - 特殊命令可能有不同的超时时间,会在相应命令描述中说明
+!!! tip "Acknowledgment and Timeout Handling"
+ - All commands require acknowledgment from the other party
+ - Default command timeout is 300ms, communication failure is assumed after timeout
+ - Special commands may have different timeout periods, which will be specified in the respective command descriptions
-#### 1.3.2 重试与容错机制
+#### 1.3.2 Retry and Fault Tolerance Mechanism
```mermaid
flowchart TD
- A[发送命令] --> B{等待响应}
- B -->|超时| C[重发命令]
- C --> D{重试次数<4?}
- D -->|是| B
- D -->|否| E[使用默认配置]
- B -->|收到响应| F[处理响应]
+ A[Send Command] --> B{Wait for Response}
+ B -->|Timeout| C[Retransmit Command]
+ C --> D{Retry Count < 4?}
+ D -->|Yes| B
+ D -->|No| E[Use Default Configuration]
+ B -->|Response Received| F[Process Response]
```
-## 二、设备启动与初始化 :material-power-plug:
+## II. Device Startup and Initialization :material-power-plug:
-### 2.1 启动交互流程
+### 2.1 Startup Interaction Flow
```mermaid
sequenceDiagram
@@ -86,843 +86,844 @@ sequenceDiagram
participant Flash
rect
- Note over XU316,Flash: System Loader固件
+ Note over XU316,Flash: System Loader Firmware
rect
- Note over XU316,MCU: 上电启动阶段
- XU316->>MCU: 发送开始启动命令(0x00)
+ Note over XU316,MCU: Power-up Startup Phase
+ XU316->>MCU: Send startup command (0x00)
Note over XU316:
- alt 超时未收到响应(最多尝试4次,如果4次都没有收到响应直接进入USB->I2S模式)
- XU316->>MCU: 重发送开始启动命令(0x00)
+ alt Timeout without response (max 4 attempts, if no response after 4 attempts, directly enter USB->I2S mode)
+ XU316->>MCU: Retransmit startup command (0x00)
end
- MCU-->>XU316: 返回启动选项
- Note over XU316: 解析启动选项
+ MCU-->>XU316: Return startup options
+ Note over XU316: Parse startup options
end
rect
- Note over XU316,Flash: 基础信息更新阶段
- alt 启动选项不包含0x01(不更新基础产品信息)
- XU316->>Flash: 读取基础产品信息
- Flash-->>XU316: 返回基础产品信息
- else 启动选项包含0x01(更新基础产品信息)或者从Flash读取数据不完整
- XU316->>MCU: 发送读取基础产品信息命令(0x01)
- MCU-->>XU316: 返回新基础产品信息
- XU316->>Flash: 保存配置
+ Note over XU316,Flash: Basic Information Update Phase
+ alt Startup option doesn't include 0x01 (don't update basic product information)
+ XU316->>Flash: Read basic product information
+ Flash-->>XU316: Return basic product information
+ else Startup option includes 0x01 (update basic product information) or incomplete data read from Flash
+ XU316->>MCU: Send read basic product information command (0x01)
+ MCU-->>XU316: Return new basic product information
+ XU316->>Flash: Save configuration
end
end
rect
- Note over XU316,Flash: 上电配置获取阶段
- alt 启动选项不包含0x02(不更新上电配置)
- XU316->>Flash: 读取上电配置
- Flash-->>XU316: 返回上电配置数据
- else 启动选项包含0x02(更新上电配置)或者从Flash读取数据不完整
- XU316->>MCU: 发送获取上电配置命令(0x02)
- MCU-->>XU316: 返回新上电配置
- XU316->>Flash: 保存新上电配置
+ Note over XU316,Flash: Power-up Configuration Retrieval Phase
+ alt Startup option doesn't include 0x02 (don't update power-up configuration)
+ XU316->>Flash: Read power-up configuration
+ Flash-->>XU316: Return power-up configuration data
+ else Startup option includes 0x02 (update power-up configuration) or incomplete data read from Flash
+ XU316->>MCU: Send get power-up configuration command (0x02)
+ MCU-->>XU316: Return new power-up configuration
+ XU316->>Flash: Save new power-up configuration
end
end
rect
- Note over XU316: Loading应用模式阶段
- XU316->>MCU: 发送获取当前模式命令(0x03)
- MCU-->>XU316: 返回当前模式
- Note over XU316: 根据当前模式,loading对应模式
+ Note over XU316: Loading Application Mode Phase
+ XU316->>MCU: Send get current mode command (0x03)
+ MCU-->>XU316: Return current mode
+ Note over XU316: Load corresponding mode based on current mode
end
end
rect
- Note over XU316,MCU: APP运行阶段
- XU316->>MCU: 获取当前用户配置命令(0x04)
- MCU-->>XU316: 返回当前用户配置
- Note over XU316: 初试化APP并应用当前用户配置
- XU316->>MCU: 发送启动完成命令(0x05)
- MCU-->>XU316: 返回完成命令响应
- par 并行处理
- loop 状态上报
- XU316->>MCU: 状态改变或15S定时发送
+ Note over XU316,MCU: APP Running Phase
+ XU316->>MCU: Get current user configuration command (0x04)
+ MCU-->>XU316: Return current user configuration
+ Note over XU316: Initialize APP and apply current user configuration
+ XU316->>MCU: Send startup completion command (0x05)
+ MCU-->>XU316: Return completion command response
+ par Parallel Processing
+ loop Status Reporting
+ XU316->>MCU: Status change or 15S periodic transmission
end
- loop 业务处理
- MCU->>XU316: 发送业务指令
- XU316-->>MCU: 响应业务指令
+ loop Business Processing
+ MCU->>XU316: Send business instructions
+ XU316-->>MCU: Respond to business instructions
end
end
end
```
-### 2.2 启动流程详细说明
+### 2.2 Detailed Startup Flow Description
-=== "上电启动与选项阶段"
- 1. XU316启动会发送开始启动命令(命令字0x00) 给MCU,包含:
+=== "Power-up Startup and Options Phase"
+ 1. XU316 startup sends startup command (command word 0x00) to MCU, containing:
- UAC1.0 VID/PID
- UAC2.0 VID/PID
- - 基础信息CRC
- - 上电配置信息CRC
- 2. MCU接收启动命令,检查信息是否需要更新,并发送相应回复
- 3. XU316等待MCU响应
- 4. 如果超时未收到响应,XU316重发启动命令最多4次
- 5. 若仍无响应,则直接加载默认USB配置枚举USB
- 6. 如有正常响应,XU316解析启动选项
+ - Basic information CRC
+ - Power-up configuration information CRC
+ 2. MCU receives startup command, checks if information needs updating, and sends corresponding response
+ 3. XU316 waits for MCU response
+ 4. If timeout without response, XU316 retransmits startup command up to 4 times
+ 5. If still no response, directly load default USB configuration and enumerate USB
+ 6. If normal response received, XU316 parses startup options
-=== "基础信息更新阶段"
- **执行条件**: 启动选项包含0x01(更新基础产品信息)
+=== "Basic Information Update Phase"
+ **Execution Condition**: Startup option includes 0x01 (update basic product information)
- **步骤**:
+ **Steps**:
- 1. XU316发送0x01命令请求读取基础产品信息
- 2. MCU返回新基础产品信息给XU316
- 3. XU316更新并保存配置到内部存储
+ 1. XU316 sends 0x01 command to request reading basic product information
+ 2. MCU returns new basic product information to XU316
+ 3. XU316 updates and saves configuration to internal storage
-=== "上电配置获取阶段"
- **执行条件**: 启动选项包含0x02(更新上电配置)或从Flash读取数据不完整
+=== "Power-up Configuration Retrieval Phase"
+ **Execution Condition**: Startup option includes 0x02 (update power-up configuration) or incomplete data read from Flash
- **步骤**:
+ **Steps**:
- 1. XU316发送0x02命令请求获取上电配置
- 2. MCU返回新上电配置给XU316
- 3. XU316更新并保存配置到内部存储
+ 1. XU316 sends 0x02 command to request power-up configuration
+ 2. MCU returns new power-up configuration to XU316
+ 3. XU316 updates and saves configuration to internal storage
-=== "应用固件加载阶段"
+=== "Application Firmware Loading Phase"
- **步骤**:
+ **Steps**:
- 1. XU316发送0x03命令获取当前输入输出模式
- 2. MCU返回当前模式信息给XU316
- 3. XU316根据返回模式加载对应输入输出模式
+ 1. XU316 sends 0x03 command to get current input/output mode
+ 2. MCU returns current mode information to XU316
+ 3. XU316 loads corresponding input/output mode based on returned mode
-=== "应用初始化阶段"
- **步骤**:
+=== "Application Initialization Phase"
+ **Steps**:
- 1. XU316发送0x04命令获取当前用户配置
- 2. MCU返回当前用户配置给XU316
- 3. XU316初始化应用并应用相关配置
- 4. XU316发送0x05命令表示启动完成
- 5. MCU返回确认响应
+ 1. XU316 sends 0x04 command to get current user configuration
+ 2. MCU returns current user configuration to XU316
+ 3. XU316 initializes application and applies related configuration
+ 4. XU316 sends 0x05 command to indicate startup completion
+ 5. MCU returns acknowledgment response
-## 三、协议命令集 :material-console:
+## III. Protocol Command Set :material-console:
-### 3.1 命令分类概览
+### 3.1 Command Classification Overview
-=== "启动与基础命令(0x00-0x0F)"
- | 命令字 | 命令描述 | 发送方向 |
+=== "Startup and Basic Commands (0x00-0x0F)"
+ | Command Word | Command Description | Direction |
|:--------:|:---------------------------------------------|:----------:|
- | 0x00 | 开始启动 | XU316→MCU |
- | 0x01 | 读取产品信息 | XU316→MCU |
- | 0x02 | 读取上电配置信息 | XU316→MCU |
- | 0x03 | 获取当前输入输出模式 | XU316→MCU |
- | 0x04 | 获取当前用户配置 | XU316→MCU |
- | 0x05 | 启动完成命令 | XU316→MCU |
+ | 0x00 | Start Startup | XU316→MCU |
+ | 0x01 | Read Product Information | XU316→MCU |
+ | 0x02 | Read Power-up Configuration Information | XU316→MCU |
+ | 0x03 | Get Current Input/Output Mode | XU316→MCU |
+ | 0x04 | Get Current User Configuration | XU316→MCU |
+ | 0x05 | Startup Completion Command | XU316→MCU |
-=== "业务控制命令(0x20-0x2F)"
- | 命令字 | 命令描述 | 发送方向 |
+=== "Business Control Commands (0x20-0x2F)"
+ | Command Word | Command Description | Direction |
|:--------:|:---------------------------------------------|:----------:|
- | 0x20 | 报告应用状态 | XU316→MCU |
- | 0x21 | 媒体控制 | MCU→XU316 |
- | 0x22 | 报告播放音频流格式和类型 | XU316→MCU |
- | 0x23 | 设置输入输出模式 | MCU→XU316 |
- | 0x24 | 发送播放音量 | MCU→XU316 |
- | 0x25 | 发送录音音量 | MCU→XU316 |
- | 0x26 | 切换MCLK | MCU→XU316 |
+ | 0x20 | Report Application Status | XU316→MCU |
+ | 0x21 | Media Control | MCU→XU316 |
+ | 0x22 | Report Playback Audio Stream Format and Type | XU316→MCU |
+ | 0x23 | Set Input/Output Mode | MCU→XU316 |
+ | 0x24 | Send Playback Volume | MCU→XU316 |
+ | 0x25 | Send Recording Volume | MCU→XU316 |
+ | 0x26 | Switch MCLK | MCU→XU316 |
-=== "HID-MCU互相透传命令(0xEE-0xEF)"
- | 命令字 | 命令描述 | 发送方向 |
+=== "HID-MCU Mutual Transparent Transmission Commands (0xEE-0xEF)"
+ | Command Word | Command Description | Direction |
|:--------:|:---------------------------------------------|:----------:|
- | 0xEE | HID发起的通过XU316透传给MCU的命令 | XU316→MCU |
+ | 0xEE | HID-initiated command transmitted to MCU via XU316 | XU316→MCU |
-=== "DAC控制指令(0xF0-0xFF)"
- | 命令字 | 命令描述 | 发送方向 |
+=== "DAC Control Commands (0xF0-0xFF)"
+ | Command Word | Command Description | Direction |
|:--------:|:---------------------------------------------|:----------:|
- | 0xF0 | DAC配置选择命令 | MCU→XU316 |
+ | 0xF0 | DAC Configuration Selection Command | MCU→XU316 |
-!!! note "命令使用说明"
- 1. 所有命令必须遵循基本帧格式规范
- 2. 每个命令都需要对方回复确认后才视为执行成功
- 3. 业务控制命令(0x20及以上)仅可在设备启动完成后使用
+!!! note "Command Usage Instructions"
+ 1. All commands must follow basic frame format specifications
+ 2. Each command requires acknowledgment from the other party before being considered successfully executed
+ 3. Business control commands (0x20 and above) can only be used after device startup is completed
-### 3.2 基础功能命令详解
+### 3.2 Basic Function Commands Detailed Explanation
-#### 3.2.1 开始启动(0x00)
+#### 3.2.1 Start Startup (0x00)
-=== "命令格式"
- **XU316发送**
+=== "Command Format"
+ **XU316 Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x00
- 数据长度: 1字节 - 17
- 数据: 17字节
- B0: 重启原因 (0x00上电重启, 0x01切换模式重启, 0xFF其他原因)
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x00
+ Data Length: 1 byte - 17
+ Data: 17 bytes
+ B0: Restart reason (0x00 power-up restart, 0x01 mode switch restart, 0xFF other reasons)
B1-2: USB Vendor ID (UAC1.0)
B3-4: USB Product ID (UAC1.0)
B5-6: USB Vendor ID (UAC2.0)
B7-8: USB Product ID (UAC2.0)
- B9-12: 基础信息32bit CRC
- B13-16: 上电配置信息32bit CRC
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ B9-12: Basic information 32bit CRC
+ B13-16: Power-up configuration information 32bit CRC
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **MCU返回**
+ **MCU Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x00
- 数据长度: 1字节 - 0x1
- 数据: 1字节
- B0: 启动选项
- 0x00 使用所有的默认信息
- 0x01 需要更新基础产品信息
- 0x02 需要更新上电配置信息
- 0x04 需要更新其他配置信息
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x00
+ Data Length: 1 byte - 0x1
+ Data: 1 byte
+ B0: Startup options
+ 0x00 Use all default information
+ 0x01 Need to update basic product information
+ 0x02 Need to update power-up configuration information
+ 0x04 Need to update other configuration information
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- 1. 该命令在XU316上电或重启后首先发送,用于告知MCU设备已启动
- 2. XU316将当前存储的产品信息CRC和配置信息CRC发送给MCU
- 3. MCU通过比对CRC确定是否需要更新XU316中的配置信息
- 4. MCU在响应中通过启动选项字段告知XU316后续需要执行的操作
+=== "Function Description"
+ 1. This command is sent first after XU316 power-up or restart to inform MCU that the device has started
+ 2. XU316 sends the currently stored product information CRC and configuration information CRC to MCU
+ 3. MCU determines whether to update configuration information in XU316 by comparing CRC
+ 4. MCU informs XU316 of subsequent operations to be performed through the startup options field in the response
-=== "使用流程"
+=== "Usage Flow"
```mermaid
flowchart TB
- A[XU316启动] -->B[发送0x00命令]
- B -->C{MCU响应}
- C -->|超时| D[重发命令]
- D -->E{重试次数<4?}
- E -->|是| C
- E -->|否| F[使用默认配置]
- C -->|正常响应| G[解析启动选项]
- G -->|0x01| H[更新基础产品信息]
- G -->|0x02| I[更新上电配置信息]
- G -->|0x04| J[更新其他配置信息]
- G -->|0x00| K[继续启动流程]
+ A[XU316 Startup] -->B[Send 0x00 Command]
+ B -->C{MCU Response}
+ C -->|Timeout| D[Retransmit Command]
+ D -->E{Retry Count < 4?}
+ E -->|Yes| C
+ E -->|No| F[Use Default Configuration]
+ C -->|Normal Response| G[Parse Startup Options]
+ G -->|0x01| H[Update Basic Product Information]
+ G -->|0x02| I[Update Power-up Configuration Information]
+ G -->|0x04| J[Update Other Configuration Information]
+ G -->|0x00| K[Continue Startup Process]
```
-=== "注意事项"
- * 如果MCU无响应,XU316会使用存储的默认配置继续启动
- * 重启原因字段可用于MCU识别XU316重启的具体原因,以便进行不同处理
- * 当需要更新多项信息时,MCU可将多个选项通过位操作组合在一起
+=== "Notes"
+ * If MCU has no response, XU316 will continue startup using stored default configuration
+ * The restart reason field can be used by MCU to identify the specific reason for XU316 restart for different processing
+ * When multiple pieces of information need to be updated, MCU can combine multiple options through bit operations
-#### 3.2.2 读取产品信息(0x01)
+#### 3.2.2 Read Product Information (0x01)
-=== "命令格式"
- **XU316发送**
+=== "Command Format"
+ **XU316 Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x01
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x01
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **MCU返回**
+ **MCU Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x01
- 数据长度: 1字节 - 0x3C (60字节)
- 数据: 60字节 - 产品基础信息,详见数据字段说明
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x01
+ Data Length: 1 byte - 0x3C (60 bytes)
+ Data: 60 bytes - Product basic information, see data field description for details
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 该命令用于XU316获取产品基本信息,如VID/PID、产品名称等
- - 执行条件:启动选项中包含0x01标志或产品信息CRC不匹配
- - XU316收到此信息后会更新内部存储的产品基础信息
+=== "Function Description"
+ - This command is used by XU316 to obtain basic product information, such as VID/PID, product name, etc.
+ - Execution condition: Startup option includes 0x01 flag or product information CRC mismatch
+ - After receiving this information, XU316 will update the internally stored basic product information
-=== "数据结构"
- 产品基础信息数据结构(60字节):
+=== "Data Structure"
+ Product basic information data structure (60 bytes):
```
- VID1 (UAC1.0): 2字节
- PID1 (UAC1.0): 2字节
- VID2 (UAC2.0): 2字节
- PID2 (UAC2.0): 2字节
- ManufactureName: 16字节 (字符串)
- ProductName: 16字节 (字符串)
- SerialNumber: 16字节 (字符串)
- CRC: 4字节 (32位CRC校验)
+ VID1 (UAC1.0): 2 bytes
+ PID1 (UAC1.0): 2 bytes
+ VID2 (UAC2.0): 2 bytes
+ PID2 (UAC2.0): 2 bytes
+ ManufactureName: 16 bytes (string)
+ ProductName: 16 bytes (string)
+ SerialNumber: 16 bytes (string)
+ CRC: 4 bytes (32-bit CRC check)
```
-#### 3.2.3 读取上电配置信息(0x02)
+#### 3.2.3 Read Power-up Configuration Information (0x02)
-=== "命令格式"
- **XU316发送**
+=== "Command Format"
+ **XU316 Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x02
- 数据长度: 1字节 - 0x00
- 数据: 0字节 - 无数据
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x02
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes - No data
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **MCU返回**
+ **MCU Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x02
- 数据长度: 1字节 - 0x0E (即14字节)
- 数据: 14字节 - 上电配置信息,见4.1-上电配置参数
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x02
+ Data Length: 1 byte - 0x0E (i.e., 14 bytes)
+ Data: 14 bytes - Power-up configuration information, see 4.1-Power-up Configuration Parameters
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 该命令用于XU316获取初始上电配置信息
- - 执行条件:启动选项中包含0x02标志或上电配置CRC不匹配
- - XU316会根据此配置信息设置默认输入输出模式、音量等参数
+=== "Function Description"
+ - This command is used by XU316 to obtain initial power-up configuration information
+ - Execution condition: Startup option includes 0x02 flag or power-up configuration CRC mismatch
+ - XU316 will set default input/output mode, volume and other parameters according to this configuration information
-=== "数据结构"
- 上电配置信息数据结构(14字节):
+=== "Data Structure"
+ Power-up configuration information data structure (14 bytes):
```
- 默认输入输出模式: 5字节
- 静音时间: 2字节 (0-65535ms)
- 麦克风默认音量: 1字节
- DAC左声道默认音量: 1字节
- DAC右声道默认音量: 1字节
- CRC: 4字节 (32位CRC校验)
+ Default Input/Output Mode: 5 bytes
+ Mute Time: 2 bytes (0-65535ms)
+ Microphone Default Volume: 1 byte
+ DAC Left Channel Default Volume: 1 byte
+ DAC Right Channel Default Volume: 1 byte
+ CRC: 4 bytes (32-bit CRC check)
```
-#### 3.2.4 获取当前输入输出模式(0x03)
+#### 3.2.4 Get Current Input/Output Mode (0x03)
-=== "命令格式"
- **XU316发送**
+=== "Command Format"
+ **XU316 Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x03
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x03
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **MCU返回**
+ **MCU Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x03
- 数据长度: 1字节 - 0x05 (即5字节)
- 数据: 5字节 - 输入输出模式,见数据字段章节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x03
+ Data Length: 1 byte - 0x05 (i.e., 5 bytes)
+ Data: 5 bytes - Input/Output mode, see data field section
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 该命令用于XU316在启动时查询当前需要启用的输入输出模式
- - XU316会根据返回的模式加载相应的应用固件
- - 此命令用于设备启动过程中的模式匹配与确认
+=== "Function Description"
+ - This command is used by XU316 to query the current input/output mode that needs to be enabled during startup
+ - XU316 will load the corresponding application firmware based on the returned mode
+ - This command is used for mode matching and confirmation during device startup process
-#### 3.2.5 获取当前用户配置(0x04)
+#### 3.2.5 Get Current User Configuration (0x04)
-=== "命令格式"
- **XU316发送**
+=== "Command Format"
+ **XU316 Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x04
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x04
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **MCU返回**
+ **MCU Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x04
- 数据长度: 1字节 - 0xE (即14字节)
- 数据: 14字节 - 用户配置参数,见4.1-用户配置参数
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x04
+ Data Length: 1 byte - 0xE (i.e., 14 bytes)
+ Data: 14 bytes - User configuration parameters, see 4.1-User Configuration Parameters
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 该命令用于XU316获取当前用户选择的音量、模式等配置
- - 在应用固件加载后、应用启动前执行
- - 应用会根据返回的信息初始化相应参数
+=== "Function Description"
+ - This command is used by XU316 to obtain current user-selected configurations such as volume, mode, etc.
+ - Executed after application firmware is loaded and before application startup
+ - The application will initialize corresponding parameters based on the returned information
-#### 3.2.6 启动完成命令(0x05)
+#### 3.2.6 Startup Completion Command (0x05)
-=== "命令格式"
- **XU316发送**
+=== "Command Format"
+ **XU316 Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x05
- 数据长度: 1字节 - N
- 数据: N字节
- B0: 启动状态 (0 启动成功,1 模式不匹配,其他值 启动失败)
- B1-BN: 应用运行参数,见4.1-运行参数
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x05
+ Data Length: 1 byte - N
+ Data: N bytes
+ B0: Startup status (0 startup successful, 1 mode mismatch, other values startup failed)
+ B1-BN: Application runtime parameters, see 4.1-Runtime Parameters
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **MCU返回**
+ **MCU Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x05
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x05
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 此命令表示XU316启动流程已完成,可以开始正常工作
- - 包含启动状态信息,告知MCU启动是否成功或遇到问题
- - 所有后续业务命令只能在此命令发送成功后使用
+=== "Function Description"
+ - This command indicates that the XU316 startup process is completed and normal operation can begin
+ - Contains startup status information to inform MCU whether startup was successful or encountered problems
+ - All subsequent business commands can only be used after this command is successfully sent
-### 3.3 业务控制命令详解
+### 3.3 Business Control Commands Detailed Explanation
-!!! warning "使用前提"
- 以下命令仅可在XU316启动完成后(发送0x05命令并收到响应后)使用
+!!! warning "Prerequisites"
+ The following commands can only be used after XU316 startup is completed (after sending 0x05 command and receiving response)
-#### 3.3.1 报告应用状态(0x20)
+#### 3.3.1 Report Application Status (0x20)
-=== "命令格式"
- **XU316发送**
+=== "Command Format"
+ **XU316 Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x20
- 数据长度: 1字节 - N
- 数据: N字节 - 应用运行参数,见4.1-运行参数
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x20
+ Data Length: 1 byte - N
+ Data: N bytes - Application runtime parameters, see 4.1-Runtime Parameters
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **MCU返回**
+ **MCU Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x20
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x20
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 该命令用于XU316向MCU报告当前应用状态
- - 通常在状态发生变化时发送,例如音量变化、模式切换等
- - MCU可根据此信息更新UI显示或调整相关功能
+=== "Function Description"
+ - This command is used by XU316 to report current application status to MCU
+ - Usually sent when status changes, such as volume changes, mode switching, etc.
+ - MCU can update UI display or adjust related functions based on this information
-#### 3.3.2 媒体控制(0x21)
+#### 3.3.2 Media Control (0x21)
-=== "命令格式"
- **MCU发送**
+=== "Command Format"
+ **MCU Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x21
- 数据长度: 1字节 - 0x01 (即1字节)
- 数据: 1字节 - 媒体控制命令
- 0x00 音量+ / Vol Up
- 0x01 音量- / Vol Down
- 0x02 播放/暂停 / PLAY/PAUSE
- 0x03 下一曲 / NEXT
- 0x04 上一曲 / PREV
- 0x05 快进 / FORWARD
- 0x06 快退 / REWIND
- 0x07 静音 / MUTE
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x21
+ Data Length: 1 byte - 0x01 (i.e., 1 byte)
+ Data: 1 byte - Media control command
+ 0x00 Volume+ / Vol Up
+ 0x01 Volume- / Vol Down
+ 0x02 Play/Pause / PLAY/PAUSE
+ 0x03 Next Track / NEXT
+ 0x04 Previous Track / PREV
+ 0x05 Fast Forward / FORWARD
+ 0x06 Rewind / REWIND
+ 0x07 Mute / MUTE
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **XU316返回**
+ **XU316 Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x21
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x21
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 此命令用于MCU向XU316发送媒体控制指令
- - XU316收到指令后会转换为相应的HID命令发送给电脑
- - 适用于实现遥控器或物理按键对媒体播放的控制
+=== "Function Description"
+ - This command is used by MCU to send media control instructions to XU316
+ - After receiving the instruction, XU316 will convert it to corresponding HID commands and send to the computer
+ - Suitable for implementing remote control or physical button control of media playback
-=== "控制按键映射表"
- | 控制码 | 功能 | USB HID用途 |
+=== "Control Button Mapping Table"
+ | Control Code | Function | USB HID Usage |
|:-----:|:------------------:|:------------------:|
- | 0x00 | 音量+ | 增加系统音量 |
- | 0x01 | 音量- | 降低系统音量 |
- | 0x02 | 播放/暂停 | 控制媒体播放状态 |
- | 0x03 | 下一曲 | 切换到下一首歌曲 |
- | 0x04 | 上一曲 | 切换到上一首歌曲 |
- | 0x05 | 快进 | 在当前曲目中快进 |
- | 0x06 | 快退 | 在当前曲目中快退 |
- | 0x07 | 静音 | 切换系统静音状态 |
+ | 0x00 | Volume+ | Increase system volume |
+ | 0x01 | Volume- | Decrease system volume |
+ | 0x02 | Play/Pause | Control media playback status |
+ | 0x03 | Next Track | Switch to next song |
+ | 0x04 | Previous Track | Switch to previous song |
+ | 0x05 | Fast Forward | Fast forward in current track |
+ | 0x06 | Rewind | Rewind in current track |
+ | 0x07 | Mute | Toggle system mute status |
-#### 3.3.3 报告播放音频流格式和类型(0x22)
+#### 3.3.3 Report Playback Audio Stream Format and Type (0x22)
-=== "命令格式"
- **XU316发送**
+=== "Command Format"
+ **XU316 Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x22
- 数据长度: 1字节 - 0x02 (即2字节)
- 数据: 2字节 - 音频流格式和类型,见音频流格式和类型字段
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x22
+ Data Length: 1 byte - 0x02 (i.e., 2 bytes)
+ Data: 2 bytes - Audio stream format and type, see audio stream format and type fields
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **MCU返回**
+ **MCU Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x22
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x22
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 该命令用于XU316向MCU报告当前音频流的格式和类型
- - 通常在播放开始或格式变化时发送
- - MCU可根据此信息更新显示,如显示PCM/DSD/MQA/DOP等状态
+=== "Function Description"
+ - This command is used by XU316 to report the current audio stream format and type to MCU
+ - Usually sent when playback starts or format changes
+ - MCU can update display based on this information, such as showing PCM/DSD/MQA/DOP status
-#### 3.3.4 设置输入输出模式(0x23)
+#### 3.3.4 Set Input/Output Mode (0x23)
-=== "命令格式"
- **MCU发送**
+=== "Command Format"
+ **MCU Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x23
- 数据长度: 1字节 - 0x05 (即5字节)
- 数据: 5字节 - 输入输出模式,见输入输出模式字段
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x23
+ Data Length: 1 byte - 0x05 (i.e., 5 bytes)
+ Data: 5 bytes - Input/Output mode, see input/output mode fields
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **XU316返回**
+ **XU316 Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x23
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x23
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 此命令用于MCU要求XU316切换到特定输入输出模式
- - 通常由用户操作触发,如按下模式选择按钮
- - XU316可能需要重启以加载新模式的固件
+=== "Function Description"
+ - This command is used by MCU to request XU316 to switch to a specific input/output mode
+ - Usually triggered by user operation, such as pressing mode selection button
+ - XU316 may need to restart to load firmware for the new mode
-#### 3.3.5 发送播放音量(0x24)
+#### 3.3.5 Send Playback Volume (0x24)
-=== "命令格式"
- **MCU发送**
+=== "Command Format"
+ **MCU Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x24
- 数据长度: 1字节 - 0x02 (即2字节)
- 数据: 2字节
- 字节1: 左声道 (0xFF Mute, 0-0dB, -127:-127dB)
- 字节2: 右声道 (0xFF Mute, 0-0dB, -127:-127dB)
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x24
+ Data Length: 1 byte - 0x02 (i.e., 2 bytes)
+ Data: 2 bytes
+ Byte 1: Left channel (0xFF Mute, 0-0dB, -127: -127dB)
+ Byte 2: Right channel (0xFF Mute, 0-0dB, -127: -127dB)
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **XU316返回**
+ **XU316 Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x24
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x24
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 该命令用于MCU向XU316设置当前播放音量
+=== "Function Description"
+ - This command is used by MCU to set the current playback volume to XU316
-#### 3.3.6 发送录音音量(0x25)
+#### 3.3.6 Send Recording Volume (0x25)
-=== "命令格式"
- **MCU发送**
+=== "Command Format"
+ **MCU Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x25
- 数据长度: 1字节 - 0x01 (即1字节)
- 数据: 1字节 - 0xFF Mute,0-0dB -127:-127dB
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x25
+ Data Length: 1 byte - 0x01 (i.e., 1 byte)
+ Data: 1 byte - 0xFF Mute, 0-0dB -127: -127dB
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **XU316返回**
+ **XU316 Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x25
- 数据长度: 1字节 - 0x00
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x25
+ Data Length: 1 byte - 0x00
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 该命令用于MCU向XU316设置当前麦克风录音音量
+=== "Function Description"
+ - This command is used by MCU to set the current microphone recording volume to XU316
-#### 3.3.7 切换MCLK(0x26)
+#### 3.3.7 Switch MCLK (0x26)
-=== "命令格式"
- **MCU发送**
+=== "Command Format"
+ **MCU Sends**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x26
- 数据长度: 1字节 - 1
- 数据: 1字节 - 0:内部MCLK,1:外部MCLK
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x26
+ Data Length: 1 byte - 1
+ Data: 1 byte - 0: Internal MCLK, 1: External MCLK
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
- **XU316返回**
+ **XU316 Returns**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x26
- 数据长度: 1字节 - 0
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x26
+ Data Length: 1 byte - 0
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
```
-=== "功能说明"
- - 此命令用于XU316控制切换主时钟源
- - 可切换使用内部时钟或外部时钟
- - 对于某些需要精确同步的音频应用场景很重要
+=== "Function Description"
+ - This command is used by XU316 to control switching of the master clock source
+ - Can switch between using internal clock or external clock
+ - Important for certain audio application scenarios requiring precise synchronization
-#### 3.3.8 设置 unmute(0x27)
+#### 3.3.8 Set unmute (0x27)
-=== "命令格式"
- **MCU发送**
- ```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x27
- 数据长度: 1字节 - 2
- 数据: 2字节 -
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
- ```
-
- **XU316返回**
- ```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x27
- 数据长度: 1字节 - 0
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
- ```
-
-=== "功能说明"
- - 模式切换时dac的 unmute时间延迟, 单位是毫秒
-
-#### 3.3.9 发送音频格式的时间延迟(0x28)
-
-=== "命令格式"
- **MCU发送**
- ```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0x28
- 数据长度: 1字节 - 2
- 数据: 2字节 -
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
- ```
-
- **XU316返回**
- ```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0x28
- 数据长度: 1字节 - 0
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
- ```
-
-=== "功能说明"
- - 发送音频格式的时间延迟
-
-#### 3.3.10 获取固件版本命令(0xF1)
-
-=== "命令格式"
- **MCU发送**
+=== "Command Format"
+ **Sent by MCU**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0xF1
- 数据长度: 1字节 - 2
- 数据: 2字节 -
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x27
+ Data Length: 1 byte - 2
+ Data: 2 bytes -
+ Checksum: 1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256
```
- **XU316返回**
+ **Returned by XU316**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0xF1
- 数据长度: 1字节 - 0
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x27
+ Data Length: 1 byte - 0
+ Data: 0 bytes
+ Checksum: 1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256
```
-=== "功能说明"
- - 获取固件版本
+=== "Function Description"
+ - The unmute time delay of the DAC during mode switching, with the unit being milliseconds.
-### 3.4 DAC配置选择(0xF0)
+#### 3.3.9 Time Delay for Sending Audio Format (0x28)
-=== "命令格式"
-
- **MCU发送**
+=== "Command Format"
+ **Sent by MCU**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0xF0
- 数据长度: 1字节 - 4
- 数据: 4字节
- Byte 0:0: 使能I2C配置DAC 1: 禁止I2C配置DAC
- Byte 1 - 3: reserved
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0x28
+ Data Length: 1 byte - 2
+ Data: 2 bytes -
+ Checksum: 1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256
```
- **XU316返回**
+ **Returned by XU316**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0xF0
- 数据长度: 1字节 - 0
- 数据: 0字节
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0x28
+ Data Length: 1 byte - 0
+ Data: 0 bytes
+ Checksum: 1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256
```
-=== "功能说明"
- - 测试命令用于MCU想XU316设置DAC配置选择。让XU316通过DAC I2C配置DAC还是MCU自己配置DAC
- - 此命令为产品特定命令,不是所有产品都支持。具体支持情况请参考产品规格书说明。
+=== "Function Description"
+ - The time delay for sending the audio format.
-### 3.5 HID和MCU通过XU316数据透传命令
+#### 3.3.10 Command to Get Firmware Version (0xF1)
-#### 3.5.1 HID通过XU316透传数据给MCU(0xEE)
+=== "Command Format"
-=== "命令格式"
-
- **XU316发送**
+ **Sent by MCU**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x00
- 命令字: 1字节 - 0xEE
- 数据长度: 1字节 - 0x39(57字节), 由于HID协议限制,数据长度必须是57字节
- 数据: 57字节 - 由于HID协议限制,必须是57字节透传数据
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0xF1
+ Data Length: 1 byte - 2
+ Data: 2 bytes -
+ Checksum: 1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256
```
- **MCU返回(可以返回多帧)**
+ **Returned by XU316**
```
- 帧头: 2字节 - 0x55aa
- 版本: 1字节 - 0x03
- 命令字: 1字节 - 0xEE
- 数据长度: 1字节 - 0x39(57字节), 由于HID协议限制,数据长度必须是57字节
- 数据: 57字节 - 由于HID协议限制,必须是57字节透传数据
- 校验和: 1字节 - 从帧头开始按字节求和,结果对256求余
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0xF1
+ Data Length: 1 byte - 0
+ Data: 0 bytes
+ Checksum: 1 byte - Sum the bytes starting from the frame header, and take the remainder of the result divided by 256
```
-=== "功能说明"
- - 此命令用于HID通过XU316向MCU发起的的透传数据
- - 一般透传的数据是MCU的OTA数据或者把MCU的数据回复给HID
+=== "Function Description"
+ - To get the firmware version.
+
+### 3.4 DAC Configuration Selection (0xF0)
+
+=== "Command Format"
+
+ **Sent by MCU**
+ ```
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0xF0
+ Data Length: 1 byte - 4
+ Data: 4 bytes
+ Byte 0: 0: Enable I2C configuration DAC 1: Disable I2C configuration DAC
+ Byte 1 - 3: reserved
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
+ ```
+
+ **XU316 Returns**
+ ```
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0xF0
+ Data Length: 1 byte - 0
+ Data: 0 bytes
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
+ ```
+
+=== "Function Description"
+ - Test command used by MCU to set DAC configuration selection to XU316. Let XU316 configure DAC through DAC I2C or let MCU configure DAC itself
+ - This command is product-specific and not all products support it. Please refer to product specification for specific support details.
+
+### 3.5 HID and MCU Data Transparent Transmission Commands via XU316
+
+#### 3.5.1 HID Transparent Transmission Data to MCU via XU316 (0xEE)
+
+=== "Command Format"
+
+ **XU316 Sends**
+ ```
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x00
+ Command Word: 1 byte - 0xEE
+ Data Length: 1 byte - 0x39 (57 bytes), due to HID protocol limitations, data length must be 57 bytes
+ Data: 57 bytes - Due to HID protocol limitations, must be 57 bytes transparent transmission data
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
+ ```
+
+ **MCU Returns (can return multiple frames)**
+ ```
+ Frame Header: 2 bytes - 0x55aa
+ Version: 1 byte - 0x03
+ Command Word: 1 byte - 0xEE
+ Data Length: 1 byte - 0x39 (57 bytes), due to HID protocol limitations, data length must be 57 bytes
+ Data: 57 bytes - Due to HID protocol limitations, must be 57 bytes transparent transmission data
+ Checksum: 1 byte - Sum of bytes starting from frame header, result modulo 256
+ ```
+
+=== "Function Description"
+ - This command is used for transparent data transmission initiated by HID to MCU via XU316
+ - Generally, the transparent transmission data is MCU's OTA data or MCU data reply to HID
-## 四、数据结构定义 :material-database:
+## IV. Data Structure Definitions :material-database:
-### 4.1 产品配置数据结构
+### 4.1 Product Configuration Data Structures
-=== "1. 产品基础信息"
- | 字段 | 字节数 | 说明 |
+=== "1. Product Basic Information"
+ | Field | Bytes | Description |
|--------------------|--------|---------------------------------------------------------|
| **VID1** | 2 | USB Vendor ID (UAC1.0) |
| **PID1** | 2 | USB Product ID (UAC1.0) |
| **VID2** | 2 | USB Vendor ID (UAC2.0) |
| **PID2** | 2 | USB Product ID (UAC2.0) |
- | **ManufactureName**| 16 | USB Manufacture Name (字符串,最大16字节) |
- | **ProductName** | 16 | USB Product Name (字符串,最大16字节) |
- | **SerialNumber** | 16 | Product Serial Number (字符串,最大16字节) |
- | **CRC** | 4 | 对所有字段计算的32-bit CRC校验值 |
+ | **ManufactureName**| 16 | USB Manufacture Name (string, max 16 bytes) |
+ | **ProductName** | 16 | USB Product Name (string, max 16 bytes) |
+ | **SerialNumber** | 16 | Product Serial Number (string, max 16 bytes) |
+ | **CRC** | 4 | 32-bit CRC check value calculated for all fields |
- !!! tip "CRC使用说明"
- MCU可以根据XU316传回的CRC值判断是否需要更新产品基础信息。当CRC不匹配时,应发送完整的产品基础信息。
+ !!! tip "CRC Usage Instructions"
+ MCU can determine whether to update basic product information based on the CRC value returned by XU316. When CRC does not match, complete basic product information should be sent.
-=== "2. 上电配置信息"
- | 字段 | 字节数 | 说明 |
+=== "2. Power-up Configuration Information"
+ | Field | Bytes | Description |
|-------------------------|--------|-----------------------------------------------|
- | **默认输入输出模式** | 5 | 见输入输出模式字段说明 |
- | **静音时间** | 2 | 0-65535(ms) |
- | **麦克风默认音量** | 1 | 见麦克风音量字段说明 |
- | **DAC左声道默认音量** | 1 | 见DAC音量字段说明 |
- | **DAC右声道默认音量** | 1 | 见DAC音量字段说明 |
- | **CRC** | 4 | 对所有字段计算的32-bit CRC校验值 |
+ | **Default Input/Output Mode** | 5 | See input/output mode field description |
+ | **Mute Time** | 2 | 0-65535 (ms) |
+ | **Microphone Default Volume** | 1 | See microphone volume field description |
+ | **DAC Left Channel Default Volume** | 1 | See DAC volume field description |
+ | **DAC Right Channel Default Volume** | 1 | See DAC volume field description |
+ | **CRC** | 4 | 32-bit CRC check value calculated for all fields |
-=== "3. 应用运行参数"
- | 字段 | 字节数 | 说明 |
+=== "3. Application Runtime Parameters"
+ | Field | Bytes | Description |
|-------------------------|--------|-----------------------------------------------|
- | **输入输出模式** | 5 | 见输入输出模式字段说明 |
- | **静音时间** | 2 | 0-65535(ms) |
- | **麦克风音量** | 1 | 见麦克风音量字段说明 |
- | **DAC左声道音量** | 1 | 见DAC音量字段说明 |
- | **DAC右声道音量** | 1 | 见DAC音量字段说明 |
- | **CRC** | 4 | 对所有字段计算的32-bit CRC校验值 |
+ | **Input/Output Mode** | 5 | See input/output mode field description |
+ | **Mute Time** | 2 | 0-65535 (ms) |
+ | **Microphone Volume** | 1 | See microphone volume field description |
+ | **DAC Left Channel Volume** | 1 | See DAC volume field description |
+ | **DAC Right Channel Volume** | 1 | See DAC volume field description |
+ | **CRC** | 4 | 32-bit CRC check value calculated for all fields |
-=== "4. 用户配置参数"
- | 字段 | 字节数 | 说明 |
+=== "4. User Configuration Parameters"
+ | Field | Bytes | Description |
|-------------------------|--------|-----------------------------------------------|
- | **输入输出模式** | 5 | 见输入输出模式字段说明 |
- | **静音时间** | 2 | 0-65535(ms) |
- | **麦克风音量** | 1 | 见麦克风音量字段说明 |
- | **DAC左声道音量** | 1 | 见DAC音量字段说明 |
- | **DAC右声道音量** | 1 | 见DAC音量字段说明 |
- | **CRC** | 4 | 对所有字段计算的32-bit CRC校验值 |
+ | **Input/Output Mode** | 5 | See input/output mode field description |
+ | **Mute Time** | 2 | 0-65535 (ms) |
+ | **Microphone Volume** | 1 | See microphone volume field description |
+ | **DAC Left Channel Volume** | 1 | See DAC volume field description |
+ | **DAC Right Channel Volume** | 1 | See DAC volume field description |
+ | **CRC** | 4 | 32-bit CRC check value calculated for all fields |
-### 4.2 输入输出模式数据格式
+### 4.2 Input/Output Mode Data Format
-=== "字段位定义"
+=== "Field Bit Definitions"
- | 字节 | 功能说明 |
+ | Byte | Function Description |
|-----|-----------------------------------------------|
- | BYTE 0-BYTE4 | 具体值定义参见产品规格书 |
+ | BYTE 0-BYTE4 | Specific value definitions refer to product specification |
-### 4.3 控制参数数据格式
+### 4.3 Control Parameter Data Format
-=== "重启原因"
- | 值 | 说明 |
+=== "Restart Reason"
+ | Value | Description |
|-------|-------------------------------|
- | 0x00 | 上电重启 |
- | 0x01 | 切换模式重启 |
- | 0xFF | 其他原因重启 |
+ | 0x00 | Power-up restart |
+ | 0x01 | Mode switch restart |
+ | 0xFF | Other reason restart |
-=== "上电模式"
- | 值 | 说明 |
+=== "Power-up Mode"
+ | Value | Description |
|-------|------------------------------------------------------------|
- | 0x00 | 默认模式,启动时使用上电配置信息的参数 |
- | 0x01 | 断电记忆模式,启动时使用从MCU获取的用户配置参数 |
+ | 0x00 | Default mode, use power-up configuration information parameters at startup |
+ | 0x01 | Power-off memory mode, use user configuration parameters obtained from MCU at startup |
-=== "音量控制参数"
+=== "Volume Control Parameters"
- **麦克风音量**
+ **Microphone Volume**
- | 值 | 说明 |
+ | Value | Description |
|-------|----------------------------------------|
- | 0xFF | 静音(Mute) |
- | 0x00-0xFE | 音量值,具体映射由应用定义 |
+ | 0xFF | Mute |
+ | 0x00-0xFE | Volume value, specific mapping defined by application |
- **DAC音量**
+ **DAC Volume**
- | 值 | 说明 |
+ | Value | Description |
|-------|----------------------------------------|
- | 0x00 | 静音(Mute) |
- | 0x01-0xFF | 音量值,具体映射由应用定义 |
+ | 0x00 | Mute |
+ | 0x01-0xFF | Volume value, specific mapping defined by application |
-=== "音频流格式"
- | 值 | 格式 | 参数 |
+=== "Audio Stream Format"
+ | Value | Format | Parameter |
|-------|-------------------|-----------------|
| 0x00 | AUDIO_PCM_44100 | 44.1kHz PCM |
| 0x01 | AUDIO_PCM_48000 | 48kHz PCM |
@@ -962,16 +963,16 @@ sequenceDiagram
| 0x23 | AUDIO_MQA_1536000 | 1.536MHz MQA |
| 0x24 | AUDIO_MQA_3072000 | 3.072MHz MQA |
| 0x25 | AUDIO_MQA_6144000 | 6.144MHz MQA |
- | 0xFF | AUDIO_NO_USED | 未使用 |
+ | 0xFF | AUDIO_NO_USED | Not used |
-=== "音频类型"
- | 值 | 类型 | 说明 |
+=== "Audio Type"
+ | Value | Type | Description |
|-------|-------------------|-----------------|
- | 0x00 | PCM | 标准PCM音频 |
- | 0x01 | DoP | 保留 |
- | 0x02 | MQA | MQA编码音频 |
- | 0x03 | MQB | MQB编码音频 |
- | 0x04 | MQA_Studio | MQA Studio编码 |
- | 0x05 | DSD Native | DSD编码音频 |
+ | 0x00 | PCM | Standard PCM audio |
+ | 0x01 | DoP | Reserved |
+ | 0x02 | MQA | MQA encoded audio |
+ | 0x03 | MQB | MQB encoded audio |
+ | 0x04 | MQA_Studio | MQA Studio encoding |
+ | 0x05 | DSD Native | DSD encoded audio |
diff --git a/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/index.md b/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/index.md
new file mode 100644
index 0000000..13a9e8d
--- /dev/null
+++ b/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/index.md
@@ -0,0 +1,188 @@
+---
+title: A316免开发固件MCU开发指南
+description: 本文档提供了XU316与MCU通信开发的完整指导,包括开发步骤、参考文档和常见问题解答,帮助开发者快速实现XU316与MCU的通信功能。
+keywords: XU316开发, MCU通信开发, 音频接口控制, 通信协议, 开发指导, 常见问题解答
+---
+
+--8<-- "common/phaten_xmos_support_img.md"
+
+# A316免开发固件MCU开发指南
+
+## 开发概述
+
+本文档提供了XU316与MCU通信开发的完整指导,帮助开发者按照正确的顺序实现XU316与MCU的通信功能。开发过程分为以下几个主要步骤,每个步骤都有对应的参考文档和详细说明。
+
+## 开发步骤
+
+
+
+=== "第一步:了解基础概念和协议结构"
+ **目标**:理解XU316与MCU通信的基本概念和协议结构
+
+ **参考文档**:[:material-file-document-outline: XU316与MCU通信协议命令宏定义](命令的相关宏.md)
+
+ **学习要点**:
+
+ - 掌握帧格式的基本结构(帧头、命令、数据长度、校验和、帧尾)
+ - 理解各种命令的数据长度定义
+ - 熟悉音频格式枚举和类型定义
+ - 了解命令数据结构体的组成
+
+=== "第二步:实现基础通信功能"
+ **目标**:实现XU316与MCU的基础通信功能
+
+ **参考文档**:[:material-file-document-outline: XU316与MCU通信协议参考](命令相关.md)
+
+ **开发任务**:
+
+ - 实现环形缓冲区初始化和管理
+ - 实现数据帧的封装和发送
+ - 实现数据帧的接收和解析
+ - 实现CRC32和简单校验和计算
+ - 实现基本的通信协议处理流程
+
+=== "第三步:配置音频接口和参数"
+ **目标**:配置XU316的音频接口和相关参数
+
+ **参考文档**:[:material-file-document-outline: XU316音频接口控制代码示例](产品内容相关.md)
+
+ **开发任务**:
+
+ - 配置I2S主从模式
+ - 设置音频采样率和位深度
+ - 配置音频通道数量
+ - 设置音量控制参数
+ - 配置各种音频接口(SPDIF、ADAT、DSD等)
+
+
+
+
+
+## 常见问题解答
+
+### 通信问题
+
+!!! question "Q1: XU316通过串口连接PC时无法收发数据"
+ **问题现象**:XU316通过串口连接PC时无法收发数据,逻辑分析仪也抓不到数据
+
+ **解决方案**:
+ 1. 检查MCU响应速度,优先配置XU316
+ 2. 检查MCU是否给XU316供电
+ 3. 确保在XU316发送上电命令前完成初始化
+
+ **参考文档**:[:material-file-document-outline: 免开发固件开发问题指南](../../faq/technical_faq/a316_firmware_dev_faq.md)
+
+!!! question "Q2: 设备在PC上正常识别,但手机无法识别"
+ **问题现象**:设备在PC上可以正常识别和播放,但连接手机后无法识别设备
+
+ **解决方案**:
+ 1. 检查设备供电模式设计
+ 2. 修改设备供电部分和放电部分
+ 3. 确保设备在手机连接时能正确接收供电
+
+ **参考文档**:[:material-file-document-outline: 免开发固件开发问题指南](../../faq/technical_faq/a316_firmware_dev_faq.md)
+
+!!! question "Q3: WiFi做从模式时,发送IIS in指令无效"
+ **问题现象**:WiFi设置为从模式,发送IIS in指令后无效果
+
+ **解决方案**:
+ 1. 检查固件是否支持WiFi从模式到XMOS主模式的转换
+ 2. 将WiFi模块挂载到蓝牙模块上
+ 3. 通过蓝牙模块实现模式切换功能
+
+ **参考文档**:[:material-file-document-outline: 免开发固件开发问题指南](../../faq/technical_faq/a316_firmware_dev_faq.md)
+
+### 配置问题
+
+!!! question "Q4: 音频参数配置不正确"
+ **问题现象**:音频播放出现杂音或无声
+
+ **解决方案**:
+ 1. 检查音频采样率配置是否正确
+ 2. 验证音频通道数量设置
+ 3. 确认音量参数范围
+ 4. 检查I2S模式配置
+
+ **参考文档**:[:material-file-document-outline: XU316音频接口控制代码示例](产品内容相关.md)
+
+!!! question "Q5: 通信协议解析错误"
+ **问题现象**:接收到的数据解析不正确
+
+ **解决方案**:
+ 1. 检查帧格式定义是否正确
+ 2. 验证校验和计算方法
+ 3. 确认数据长度定义
+ 4. 检查命令字枚举定义
+
+ **参考文档**:[:material-file-document-outline: XU316与MCU通信协议命令宏定义](命令的相关宏.md)
+
+
+
+
+
diff --git a/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/产品内容相关.md b/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/产品内容相关.md
new file mode 100644
index 0000000..b38ed5d
--- /dev/null
+++ b/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/产品内容相关.md
@@ -0,0 +1,134 @@
+---
+title: Code Examples for XU316 Audio Interface Control
+description: This document provides code examples related to the control of the XU316 audio interface, including serial communication protocols, audio interface configurations, etc., to help developers quickly implement the communication function between XU316 and MCU.
+keywords: XU316 development, audio interface control, MCU communication, I2S configuration, serial protocol, audio sampling rate, DSD configuration
+---
+
+--8<-- "common/phaten_xmos_support_img.md"
+
+# Code Examples for XU316 Audio Interface Control
+
+## Document Instructions
+
+This document provides code examples related to the control of the XU316 audio interface, mainly including the following contents:
+
+1. Definition of serial communication protocol
+2. Configuration parameters of audio interface
+3. Configuration of audio sampling rate and channels
+4. Setting of volume control parameters
+
+These code examples can assist developers in rapidly achieving the communication between XU316 and MCU and configuring various audio interface parameters.
+
+## Serial Communication Protocol
+
+### Protocol Definition
+```c
+#define SWAP16(x) ((((x) >> 8) & 0x00FF) | (((x) << 8) & 0xFF00))
+#define SWAP32(x) ((((x) >> 24) & 0x000000FF) | (((x) >> 8) & 0x0000FF00) | (((x) << 8) & 0x00FF0000) | (((x) << 24) & 0xFF000000))
+/*Protocol analysis*/
+#define UART_FRAME_HEAD 0xAA
+#define UART_FRAME_TAIL 0x55
+#define HEX_UPPERCASE 0
+#define HEX_LOWERCASE 1
+#define HEX_TABLE HEX_UPPERCASE
+// Data frame structure
+typedef struct
+{
+ uint8_t head; // Frame header 0xAA
+ uint8_t cmd; // Command word
+ uint8_t len; // Data length
+ uint8_t data[32]; // Data area
+ uint8_t check; // Checksum
+ uint8_t tail; // Frame tail 0x55
+} uart_frame_t;
+```
+
+### Serial Buffer Management
+```c
+/*Serial port*/
+/* buffer sizes */
+#define RX_BUFFER_SIZE 256
+#define TX_BUFFER_SIZE 256
+#define TX_BUFFER_NUM 2 // Double buffer
+
+typedef struct
+{
+ uint8_t buffer[TX_BUFFER_SIZE];
+ uint16_t size;
+ uint8_t busy;
+} TX_BUFFER;
+
+typedef struct
+{
+ TX_BUFFER tx_buf[TX_BUFFER_NUM];
+ uint8_t curr_buf;
+ uint8_t next_buf;
+ uint8_t dma_sending;
+} UART_TX_MANAGER;
+typedef enum
+{
+ LOG_SEND,
+ LOG_RECV,
+ LOG_USER,
+ LOG_ERR
+} log_dir_t;
+```
+
+## Audio Interface Configuration
+
+### Interface Mode Configuration
+```c
+// I2S master - slave mode configuration
+#define I2S_MODE I2S_MODE_MASTER // I2S master mode, XU316 as the I2S master device
+// Synchronization mode configuration
+#define SYNC_MODE SYNC // Synchronization mode, used for audio clock synchronization
+// MIDI interface configuration
+#define MIDI_MODE MIDI_MODE_ENABLE // MIDI function enabled
+// SPDIF input interface configuration
+#define SPDIF_IN_MODE SPDIF_IN_MODE_ENABLE // SPDIF input function enabled
+// SPDIF output interface configuration
+#define SPDIF_OUT_MODE SPDIF_OUT_MODE_ENABLE // SPDIF output function enabled
+// ADAT input interface configuration (ADAT is an 8 - channel digital audio transmission format)
+#define ADAT_IN_MODE ADAT_IN_MODE_ENABLE // ADAT input function enabled
+// ADAT output interface configuration
+#define ADAT_OUT_MODE ADAT_OUT_MODE_ENABLE // ADAT output function enabled
+// DSD output interface configuration (DSD is Direct Stream Digital, used for high - resolution audio)
+#define DSD_OUT_MODE DSD_OUT_MODE_ENABLE // DSD output function enabled
+```
+
+### Audio Parameter Configuration
+```c
+// Initialize audio sampling rate
+#define AUDIO_SAMPLE_RATE (uint8_t)AUDIO_SAMPLE_RATE_44100
+#define MQA_MODE MQA_MODE_DISABLE
+#define AUDIO_CLASS AUDIO_CLASS_UAC1
+#define AUDIO_WIDTH AUDIO_WIDTH_24
+// Initialize audio channels
+#define AUDIO_INPUT_CHANNEL 9
+#define AUDIO_OUTPUT_CHANNEL 3
+// Initialize audio type
+#define AUDIO_MODE USB_MODE
+// Mute time 2 0 - 65535 (ms)
+#define MUTE_DURATION 100
+// Default microphone volume
+#define MIC_VOLUME 10
+// Default DAC left - channel volume 1 See DAC volume field description
+#define DAC_L_VOLUME 30
+// Default DAC right - channel volume 1 See DAC volume field description
+#define DAC_R_VOLUME 20
+```
+
+
+
\ No newline at end of file
diff --git a/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/命令的相关宏.md b/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/命令的相关宏.md
new file mode 100644
index 0000000..2d3b447
--- /dev/null
+++ b/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/命令的相关宏.md
@@ -0,0 +1,286 @@
+---
+title: Command Macro Definitions for XU316 and MCU Communication Protocol
+description: This document provides the command macro definitions related to the communication protocol between XU316 and MCU, including frame format, command length, communication protocol, etc., to help developers implement the communication function between XU316 and MCU.
+keywords: XU316 communication protocol, MCU command macro definitions, audio format definitions, communication frame format, command data structure, audio type definitions
+---
+
+--8<-- "common/phaten_xmos_support_img.md"
+
+# Command Macro Definitions for XU316 and MCU Communication Protocol
+
+## Document Instructions
+
+This document provides the command macro definitions related to the communication protocol between XU316 and MCU, mainly including the following contents:
+
+1. Definition of communication frame format
+2. Definition of MCU command data length
+3. Enumeration of communication protocol command words
+4. Definitions of audio formats and types
+5. Definition of command data structure
+
+These macro definitions and data structures are the basis for the communication between XU316 and MCU. Developers need to correctly understand and use these definitions to implement the communication function.
+
+## Communication Frame Format
+
+### Definition of Basic Frame Format
+```c
+#define FRAME_HEADER_H 0x55
+#define FRAME_HEADER_L 0xAA
+#define PROTOCOL_VERSION 0x01
+#define PROTOCOL_VERSION_RX 0x03
+```
+
+## Definition of Command Data Length
+
+### XU316 Command Data Length
+```c
+#define CMD00_XU316_DATA_LEN 0x11 // Command 0x00: Start-up (Startup options)
+#define CMD01_XU316_DATA_LEN 0x00 // Command 0x01: Read product information (60-byte firmware information)
+#define CMD02_XU316_DATA_LEN 0x00 // Command 0x02: Read power-on configuration (14-byte configuration parameters)
+#define CMD03_XU316_DATA_LEN 0x00 // Command 0x03: Get audio mode (5-byte mode parameters)
+#define CMD04_XU316_DATA_LEN 0x00 // Command 0x04: Get user configuration (14-byte user settings)
+#define CMD05_XU316_DATA_LEN 0x15 // Command 0x05: Startup completed (No data field)
+
+#define CMDF1_XU316_DATA_LEN 0x03 // Command 0xF1: Version number query (3-byte version information)
+
+#define CMD20_XU316_DATA_LEN 0x14 // Command 0x20: Set volume
+#define CMD21_XU316_DATA_LEN 0x00 // Command 0x21: Sound effect mode
+#define CMD22_XU316_DATA_LEN 0x02 // Command 0x22: Device status query
+#define CMD23_XU316_DATA_LEN 0x00 // Command 0x23: Bluetooth control
+#define CMD24_XU316_DATA_LEN 0x02 // Command 0x24: Send playback volume
+#define CMD25_XU316_DATA_LEN 0x01 // Command 0x25: Send recording volume
+#define CMD27_XU316_DATA_LEN 0x00 // Command 0x27: Special unmute (No data field)
+#define CMD28_XU316_DATA_LEN 0x01 // Command 0x28: Audio format delay setting (1-byte parameter)
+
+#define CMD_HID_TRANSPARENT_DATA_LEN 0x39 // Command 0xEE: HID passthrough/OTA upgrade (57 bytes)
+```
+
+### MCU Command Data Length
+```c
+#define CMD00_MCU_DATA_LEN 0x01 // Command 0x00: Start-up (Startup options)
+#define CMD01_MCU_DATA_LEN 0x3C // Command 0x01: Read product information (60-byte firmware information)
+#define CMD02_MCU_DATA_LEN 0x0E // Command 0x02: Read power-on configuration (14-byte configuration parameters)
+#define CMD03_MCU_DATA_LEN 0x05 // Command 0x03: Get audio mode (5-byte mode parameters)
+#define CMD04_MCU_DATA_LEN 0x0E // Command 0x04: Get user configuration (14-byte user settings)
+#define CMD05_MCU_DATA_LEN 0x00 // Command 0x05: Startup completed (No data field)
+
+#define CMDF1_MCU_DATA_LEN 0x00 // Command 0xF1: Version number query (No data field)
+
+#define CMD20_MCU_DATA_LEN 0x00 // Command 0x20: Set volume
+#define CMD21_MCU_DATA_LEN 0x01 // Command 0x21: Sound effect mode
+#define CMD22_MCU_DATA_LEN 0x00 // Command 0x22: Device status query
+#define CMD23_MCU_DATA_LEN 0x05 // Command 0x23: Set audio mode
+#define CMD24_MCU_DATA_LEN 0x00 // Command 0x24: Send playback volume
+#define CMD25_MCU_DATA_LEN 0x00 // Command 0x25: Send recording volume
+#define CMD27_MCU_DATA_LEN 0x00 // Command 0x27: Special unmute (No data field)
+#define CMD28_MCU_DATA_LEN 0x00 // Command 0x28: Audio format delay setting (No data field)
+
+#define CMD_HID_TRANSPARENT_MCU_DATA_LEN 0x39 // Command 0xEE: HID passthrough/OTA upgrade (57 bytes)
+```
+
+## Definition of Communication Protocol Commands
+
+### Enumeration of Command Words
+```c
+typedef enum
+{
+ /****** Basic control commands (0x00 - 0x05) ******/
+ CMD_STARTUP = 0x00, // System startup
+ CMD_GET_PRODUCT_INFO = 0x01, // Product information query
+ CMD_GET_BOOT_CFG = 0x02, // Read power-on configuration
+ CMD_GET_AUD_MODE = 0x03, // Get audio mode
+ CMD_GET_USER_CFG = 0x04, // Get user configuration
+ CMD_STARTUP_COMPLETE = 0x05, // Startup completion notification
+
+ CMD_GET_VERSION = 0xF1, // Version number query
+
+ /****** Service control commands (0x20 - 0x2F) ******/
+ CMD_REPORT_STATUS = 0x20, // Status report
+ CMD_MEDIA_CONTROL = 0x21, // Media control
+ CMD_SET_PLAY_FORMAT = 0x22, // Set audio format
+ CMD_SET_AUDIO_MODE = 0x23, // Set audio mode
+ CMD_SET_PLAY_VOL = 0x24, // Set playback volume
+ CMD_SET_REC_VOL = 0x25, // Set recording volume
+ CMD_SPECIAL_UNMUTE = 0x27, // Special unmute
+ CMD_SET_AUDIO_FORMAT_DELAY = 0x28, // Set audio format delay
+
+ CMD_HID_TRANSPARENT = 0xEE, // HID passthrough/OTA upgrade command
+
+ CMD_COUNT = CMD_SET_REC_VOL + 1 // Total number of currently supported commands
+
+} mcu_command_t;
+```
+
+### Enumeration of Startup Options (Bitmask mode)
+
+!!! note
+ **Enumeration of Startup Options (Bitmask mode)**
+ **Use uint8_t to ensure single-byte storage and support multiple option combinations**
+
+```c
+typedef enum
+{
+ BOOT_OPTION_USE_DEFAULTS = 0x00, // Use all default configurations
+ BOOT_OPTION_UPDATE_BASIC_INFO = 0x01, // Update basic product information (bit0)
+ BOOT_OPTION_UPDATE_POWER_CFG = 0x02, // Update power-on configuration information (bit1)
+ BOOT_OPTION_UPDATE_OTHER_CFG = 0x04 // Reserved configuration, currently unused (bit2)
+} boot_option_t;
+```
+
+### Enumeration of Media Control
+```c
+typedef enum
+{
+ MEDIA_KEY_VOLUME_UP = 0x00, // Volume up
+ MEDIA_KEY_VOLUME_DOWN = 0x01, // Volume down
+ MEDIA_KEY_PLAY_PAUSE = 0x02, // Play/Pause
+ MEDIA_KEY_NEXT_TRACK = 0x03, // Next track
+ MEDIA_KEY_PREV_TRACK = 0x04, // Previous track
+ MEDIA_KEY_FAST_FORWARD = 0x05, // Fast forward
+ MEDIA_KEY_REWIND = 0x06, // Rewind
+ MEDIA_KEY_MUTE = 0x07 // Mute toggle
+
+ // Reserved extension bits (0x08 - 0xFF is the reserved area for the protocol)
+
+} media_control_t;
+```
+
+## Definition of Audio Formats
+
+!!! note
+ **Enumeration of Audio Stream Formats (Compatible with AES67 - 2020 Standard)**
+ **Explicitly specify the underlying type as uint8_t to ensure 1-byte storage**
+
+### Enumeration of Audio Stream Formats
+```c
+typedef enum
+{
+ // PCM sampling rate formats (0x00 - 0x10)
+ AUDIO_PCM_44100 = 0x00,
+ AUDIO_PCM_48000 = 0x01,
+ AUDIO_PCM_88200 = 0x02,
+ AUDIO_PCM_96000 = 0x03,
+ AUDIO_PCM_176400 = 0x04,
+ AUDIO_PCM_192000 = 0x05,
+ AUDIO_PCM_352800 = 0x06,
+ AUDIO_PCM_384000 = 0x07,
+ AUDIO_PCM_705600 = 0x08,
+ AUDIO_PCM_768000 = 0x09,
+ AUDIO_PCM_1441200 = 0x0A,
+ AUDIO_PCM_1536000 = 0x0B,
+ AUDIO_PCM_32000 = 0x0C,
+ AUDIO_PCM_64000 = 0x0D,
+ AUDIO_PCM_128000 = 0x0E,
+ AUDIO_PCM_256000 = 0x0F,
+ AUDIO_PCM_512000 = 0x10,
+
+ // DSD formats (0x11 - 0x15)
+ AUDIO_DSD_64 = 0x11,
+ AUDIO_DSD_128 = 0x12,
+ AUDIO_DSD_256 = 0x13,
+ AUDIO_DSD_512 = 0x14,
+ AUDIO_DSD_1024 = 0x15,
+
+ // MQA formats (0x16 - 0x2D)
+ AUDIO_MQA_44100 = 0x16,
+ AUDIO_MQA_88200 = 0x17,
+ AUDIO_MQA_176400 = 0x18,
+ AUDIO_MQA_352800 = 0x19,
+ AUDIO_MQA_705600 = 0x1A,
+ AUDIO_MQA_1411200 = 0x1B,
+ AUDIO_MQA_2822400 = 0x1C,
+ AUDIO_MQA_5644800 = 0x1D,
+
+ // -- Based on 48kHz series --
+ AUDIO_MQA_48000 = 0x1E,
+ AUDIO_MQA_96000 = 0x1F,
+ AUDIO_MQA_192000 = 0x20,
+ AUDIO_MQA_384000 = 0x21,
+ AUDIO_MQA_768000 = 0x22,
+ AUDIO_MQA_1536000 = 0x23,
+ AUDIO_MQA_3072000 = 0x24,
+ AUDIO_MQA_6144000 = 0x25,
+
+ // -- Other base frequency series --
+ AUDIO_MQA_64000 = 0x26,
+ AUDIO_MQA_128000 = 0x27,
+ AUDIO_MQA_256000 = 0x28,
+ AUDIO_MQA_512000 = 0x29,
+ AUDIO_MQA_1024000 = 0x2A,
+ AUDIO_MQA_2048000 = 0x2B,
+ AUDIO_MQA_4096000 = 0x2C,
+ AUDIO_MQA_8192000 = 0x2D,
+
+ // Special reserved value
+ AUDIO_NO_USED = 0xFF
+
+} audio_format_t;
+```
+
+### Enumeration of Audio Types
+!!! note
+ **Enumeration of Audio Types (Compatible with AES67 - 2020 Standard)**
+ **Explicitly specify the underlying type as uint8_t to ensure 1-byte storage**
+
+```c
+typedef enum
+{
+ AUDIO_TYPE_PCM = 0x00, // PCM standard audio
+ AUDIO_TYPE_RESERVE = 0x01, // Protocol reserved field
+ AUDIO_TYPE_MQA = 0x02, // MQA encoded audio
+ AUDIO_TYPE_MQB = 0x03, // MQB encoded audio (secondary extension)
+ AUDIO_TYPE_MQA_STUDIO = 0x04, // MQA Studio master level
+ AUDIO_TYPE_DSD = 0x05 // Direct Stream Digital
+
+ // 0x06 - 0xFF is reserved for future expansion
+
+} audio_type_t;
+```
+
+## Command Data Structure
+
+### Definition of Data Structure
+```c
+typedef uint8_t byte_pair[2];
+// Command data structure
+typedef struct __attribute__((packed))
+{
+ uint8_t boot_option; // 0x00: Startup option data
+ // Basic product information
+ uint8_t vid_uac1[2]; // UAC1.0 vendor ID
+ uint8_t pid_uac1[2]; // UAC1.0 product ID
+ uint8_t vid_uac2[2]; // UAC2.0 vendor ID
+ uint8_t pid_uac2[2]; // UAC2.0 product ID
+ uint8_t product_manufacturer[16]; // Manufacturer name
+ uint8_t product_name[16]; // Product name
+ uint8_t product_serial[16]; // Serial number
+ uint8_t basic_info_crc[4]; // CRC32 of basic information
+ // User configuration is the power-on configuration information and also the application running parameters
+ uint8_t startup_status; // Startup status
+ uint8_t audio_mode[5];
+ uint8_t mute_duration[2]; // Mute time (ms)
+ uint8_t mic_volume; // Microphone volume is also the recording volume
+ uint8_t dac_l_volume; // Left channel volume (0 - 255)
+ uint8_t dac_r_volume; // Right channel volume (0 - 255)
+ uint8_t power_cfg_crc[4]; // CRC32 of power-on configuration
+ // Application running parameters
+ uint8_t media_control; // Media control command
+ uint8_t audio_format; // Audio format code
+ uint8_t audio_type; // Audio type code
+} mcu_data_t;
+```
+
+
+
\ No newline at end of file
diff --git a/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/命令相关.md b/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/命令相关.md
new file mode 100644
index 0000000..6d60751
--- /dev/null
+++ b/en/docs/dev_doc/sdk_examples/XU316和MCU通讯的示例代码/命令相关.md
@@ -0,0 +1,415 @@
+---
+title: XU316 and MCU Communication Protocol Reference
+description: Detailed description of the communication protocol between XU316 and MCU, including data structures, command formats, and processing flows.
+keywords: XU316, MCU, communication protocol, command reference
+hide:
+ -toc
+---
+
+
+--8<-- "common/phaten_xmos_support_img.md"
+
+
+# XU316 and MCU Communication Protocol Reference
+
+
+## 1. Basic Data Structures
+
+
+### 1.1 Ring Buffer
+
+```c
+define RINGBUFFERSIZE 256 // Size of the ring buffer used for UART communication caching
+typedef struct {
+uint8t buffer[RINGBUFFERSIZE]; // Data storage area
+volatile uint16t head; // Write position pointer
+volatile uint16t tail; // Read position pointer
+volatile uint16t count; // Current data count
+} ringbuffert;
+```
+### 1.2 Audio Mode Definitions
+
+```c
+// Audio mode configuration array, each mode contains 5 bytes of configuration data
+static const uint8t audiomodes[][5] = {
+{0x00, 0x80, 0xa9, 0x00, 0x01}, // USB-no-mqa mode
+{0x00, 0x80, 0x01, 0x00, 0x02}, // UAC1 mode
+{0x10, 0x80, 0x65, 0x10, 0x03}, // COAX mode
+{0x00, 0x80, 0x65, 0x10, 0x04}, // OPT mode
+{0x00, 0x80, 0xc5, 0x08, 0x05}, // SPDIF OUT mode
+{0x00, 0x82, 0xd5, 0x81, 0x06}, // I2S IN mode
+{0x20, 0x80, 0x65, 0x10, 0x07} // HDMI mode
+};
+// Corresponding mode names array
+static const char *mode_names[] = {
+"USB-no-mqa",
+"UAC1",
+"COAX",
+"OPT",
+"SPDIF OUT",
+"I2S IN",
+"HDMI"
+};
+```
+## 2. Initialization and Configuration
+
+
+### 2.1 Device Initialization Information Print
+
+```c
+define AUDIOMODECOUNT (sizeof(audiomodes) / sizeof(audiomodes[0]))
+void printinitinfo(void)
+{
+logdata(LOGUSER, "----------Device initialized----------\n");
+// Print UAC1.0 device information
+logdata(LOGUSER, "VID1: %02X%02X", mcudata.viduac1[0], mcudata.viduac1[1]);
+logdata(LOGUSER, "PID1: %02X%02X", mcudata.piduac1[0], mcudata.piduac1[1]);
+// Print UAC2.0 device information
+logdata(LOGUSER, "VID2: %02X%02X", mcudata.viduac2[0], mcudata.viduac2[1]);
+logdata(LOGUSER, "PID2: %02X%02X", mcudata.piduac2[0], mcudata.piduac2[1]);
+// Print product information
+logdata(LOGUSER, "Manufacturer: %s", mcudata.productmanufacturer);
+logdata(LOGUSER, "Name: %s", mcudata.productname);
+logdata(LOGUSER, "Serial: %s", mcudata.productserial);
+// Print CRC check information
+logdata(LOGUSER, "Basic Info CRC: %02X%02X%02X%02X",
+mcudata.basicinfocrc[0], mcudata.basicinfocrc[1],
+mcudata.basicinfocrc[2], mcudata.basicinfocrc[3]);
+logdata(LOGUSER, "Power Config CRC: %02X%02X%02X%02X",
+mcudata.powercfgcrc[0], mcudata.powercfgcrc[1],
+mcudata.powercfgcrc[2], mcudata.powercfgcrc[3]);
+}
+```
+### 2.2 Ring Buffer Initialization
+
+```c
+void ringbufferinit(void) {
+uartringbuffer.head = 0; // Initialize write position
+uartringbuffer.tail = 0; // Initialize read position
+uartringbuffer.count = 0; // Initialize data count
+}
+```
+### 2.3 Product Information Initialization
+
+```c
+void xu316init(void)
+{
+// Default audio mode configuration (USB UAC2.0)
+uint8t audio_mode[5] = {0x00, 0x80, 0xa9, 0x00, 0x01};
+// Configure UAC1.0 device information
+mcu_data.vid_uac1[0] = 0x20;
+mcu_data.vid_uac1[1] = 0xB1; // VID = 0x20B1
+mcu_data.pid_uac1[0] = 0x00;
+mcu_data.pid_uac1[1] = 0x17; // PID = 0x0017
+
+// Configure UAC2.0 device information
+mcu_data.vid_uac2[0] = 0x20;
+mcu_data.vid_uac2[1] = 0xB1; // VID = 0x20B1
+mcu_data.pid_uac2[0] = 0x00;
+mcu_data.pid_uac2[1] = 0x16; // PID = 0x0016
+
+// Configure product information
+memcpy(mcu_data.product_manufacturer, "Phaten", 6);
+// Set product name
+memcpy(mcu_data.product_name, "XMOS XU316", 11);
+// Set product serial number
+memcpy(mcu_data.product_serial, "123456789ABCDEF", 15);
+
+// Calculate and store CRC32 checksum for basic information (56 bytes)
+crc = calculate_crc32(mcu_data.vid_uac1, 56);
+mcu_data.basic_info_crc[0] = (crc >> 24) & 0xFF;
+mcu_data.basic_info_crc[1] = (crc >> 16) & 0xFF;
+mcu_data.basic_info_crc[2] = (crc >> 8) & 0xFF;
+mcu_data.basic_info_crc[3] = crc & 0xFF;
+
+
+// Initialize device status and audio configuration
+mcu_data.startup_status = 0x00;
+memcpy(&mcu_data.audio_mode, audio_mode, 5);
+
+// Configure mute duration (400ms)
+mcu_data.mute_duration[0] = MUTE_DURATION_CONFIG >> 8;
+mcu_data.mute_duration[1] = MUTE_DURATION_CONFIG;
+
+// Initialize volume settings
+mcu_data.mic_volume = MIC_VOLUME_CONFIG;
+// Initialize left and right channel DAC volumes
+mcu_data.dac_l_volume = DAC_L_VOLUME_CONFIG;
+mcu_data.dac_r_volume = DAC_R_VOLUME_CONFIG;
+
+// Calculate and store CRC32 checksum for power configuration (10 bytes)
+crc = calculate_crc32((uint8_t *)&mcu_data.audio_mode, 0x0a);
+mcu_data.power_cfg_crc[0] = (crc >> 24) & 0xFF;
+mcu_data.power_cfg_crc[1] = (crc >> 16) & 0xFF;
+mcu_data.power_cfg_crc[2] = (crc >> 8) & 0xFF;
+mcu_data.power_cfg_crc[3] = crc & 0xFF;
+
+
+// Initialize communication buffer
+ring_buffer_init();
+
+}
+```
+
+// 3. Communication Buffer Operations
+// 3.1 Ring Buffer Operation Functions
+
+// Write data to ring buffer
+
+```c
+uint8_t ring_buffer_write(uint8_t *data, uint16_t len) {
+uint16_t i;
+for(i = 0; i < len; i++) {
+if(uart_ring_buffer.count >= RING_BUFFER_SIZE) {
+return 0; // Buffer full, write failed
+}
+uart_ring_buffer.buffer[uart_ring_buffer.head] = data[i];
+uart_ring_buffer.head = (uart_ring_buffer.head + 1) % RING_BUFFER_SIZE;
+uart_ring_buffer.count++;
+}
+return 1; // Write successful
+}
+
+// Read data from ring buffer
+uint8_t ring_buffer_read(uint8_t *data, uint16_t len) {
+uint16_t i;
+if(uart_ring_buffer.count < len) {
+return 0; // Insufficient data
+}
+for(i = 0; i < len; i++) {
+data[i] = uart_ring_buffer.buffer[uart_ring_buffer.tail];
+uart_ring_buffer.tail = (uart_ring_buffer.tail + 1) % RING_BUFFER_SIZE;
+uart_ring_buffer.count--;
+}
+return 1; // Read successful
+}
+
+// Peek data (without moving read pointer)
+uint8_t ring_buffer_peek(uint8_t *data, uint16_t len) {
+uint16_t i;
+uint16_t temp_tail = uart_ring_buffer.tail;
+for(i = 0; i < len; i++) {
+data[i] = uart_ring_buffer.buffer[temp_tail];
+temp_tail = (temp_tail + 1) % RING_BUFFER_SIZE;
+}
+return 0; // Peek successful
+}
+```
+
+// 4. Checksum Calculation
+// 4.1 CRC32 Calculation
+
+```c
+uint32_t calculate_crc32(const uint8_t *buffer, uint32_t length)
+{
+uint32_t crc = 0xFFFFFFFF;
+const uint32_t poly = 0xEDB88320; // CRC32 polynomial
+
+for (size_t i = 0; i < length; i++) {
+crc ^= buffer[i];
+for (int j = 0; j < 8; j++) {
+if (crc & 1) {
+crc = (crc >> 1) ^ poly;
+} else {
+crc >>= 1;
+}
+}
+}
+return ~crc; // Return CRC32 checksum value
+}
+
+// Calculate simple checksum
+uint8_t xu316_calc_checksum(uint8_t *data, uint8_t len)
+{
+uint8_t sum = 0;
+for (uint8_t i = 0; i < len; i++) {
+sum += data[i];
+}
+return sum;
+}
+```
+
+// 5. Communication Protocol Processing
+// 5.1 Frame Validation
+// Verify frame data integrity
+
+```c
+uint8_t uart_frame_check(uint8_t *buf, uint8_t len)
+{
+// Check minimum length requirement
+if (len < 6) { // Header(2) + Version(1) + Command(1) + Length(2) + Checksum(1)
+return 0;
+}
+
+// Verify frame header
+if (buf[0] != FRAME_HEADER_H || buf[1] != FRAME_HEADER_L) {
+return 0;
+}
+
+// Get data length (big-endian mode)
+uint16_t data_len = buf[4];
+
+// Verify data length validity
+if (data_len > 256 || len < (data_len + 6)) {
+return 0;
+}
+
+// Calculate and verify checksum
+uint8_t sum = xu316_calc_checksum(buf, data_len + 5);
+if (sum != buf[data_len + 5]) {
+return 0;
+}
+
+LOG_TEMP(LOG_RECV, "", buf, len);
+return 1;
+}
+```
+
+// 5.2 Data Frame Encapsulation
+
+```c
+int xu316_pack_frame(uint8_t cmd, uint8_t *data, uint8_t len)
+{
+uint8_t tx_data[256] = {0};
+if (len >= 255) {
+return 0;
+}
+
+// Build frame header
+tx_data[0] = FRAME_HEADER_H;
+tx_data[1] = FRAME_HEADER_L;
+tx_data[2] = PROTOCOL_VERSION_RX;
+tx_data[3] = cmd;
+tx_data[4] = len;
+
+// Copy data payload
+if (data && len > 0) {
+memcpy(tx_data + 5, data, len);
+}
+
+// Calculate and add checksum
+tx_data[len + 5] = xu316_calc_checksum(tx_data, len + 5);
+len += 6;
+
+// Send data
+usart_dma_send(tx_data, len);
+LOG_INFO("Sending frame: cmd=0x%02X, len=%d", cmd, len);
+LOG_TEMP(LOG_SEND, "", tx_data, len);
+return len;
+}
+```
+
+// 5.3 Frame Length Check
+
+```c
+int check_frame_length(uint8_t *buf, uint16_t len) {
+// Verify frame header
+if (buf[0] != FRAME_HEADER_H || buf[1] != FRAME_HEADER_L) {
+LOG_DEBUG("Frame header check failed %02x %02x", buf[0], buf[1]);
+return -1;
+}
+// Get data length (big-endian mode)
+int data_len = buf[4];
+// Return complete frame length
+return data_len + 6;
+}
+
+// 5.4 Data Reception Processing
+void uart_data_process(void)
+{
+uint8_t peek_buffer[8]; // Peek buffer
+uint8_t process_buffer[256]; // Processing buffer
+int frame_length;
+
+while(uart_ring_buffer.count >= 6) { // Need at least 6 bytes to start checking
+// Peek frame header information
+ring_buffer_peek(peek_buffer, 6);
+
+// Debug output
+for(int i = 0; i < 6; i++) {
+LOG_DEBUG("peek_buffer[%d]: %02x", i, peek_buffer[i]);
+}
+
+// Check frame length
+frame_length = check_frame_length(peek_buffer, 6);
+if(frame_length < 0) {
+// Invalid frame, discard one byte
+uint8_t dummy;
+ring_buffer_read(&dummy, 1);
+LOG_ERROR("Frame length check failed %02x", dummy);
+continue;
+}
+
+// Check if there's enough data
+if(uart_ring_buffer.count < frame_length) {
+LOG_ERROR("Not enough data");
+break; // Wait for more data
+}
+
+// Read and process complete frame
+if(ring_buffer_read(process_buffer, frame_length)) {
+uart_data_parse();
+}
+}
+}
+```
+
+// 5.5 Data Parsing Processing
+
+```c
+int uart_data_parse(void)
+{
+int ret = 0;
+uint8_t cmd = 0;
+uint16_t data_len = 0;
+uint16_t rx_len = 0;
+uint8_t tmp;
+static uint8_t buffer[256] = {0};
+rx_len = g_rx_count;
+
+// Verify frame integrity
+ret = uart_frame_check((uint8_t *)g_rx_data, rx_len);
+if (ret == 0) {
+LOG_ERROR("Frame check failed %d", rx_len);
+LOG_TEMP(LOG_RECV, "", g_rx_data, rx_len);
+return -1;
+}
+
+// Parse frame information
+data_len = rx_len - 6;
+cmd = g_rx_data[3];
+if (g_rx_data[4] != data_len) {
+LOG_ERROR("Data length mismatch: expected %d, got %d", g_rx_data[4], data_len);
+return -1;
+}
+
+LOG_DEBUG("Received frame: cmd=0x%02X, len=%d", cmd, data_len);
+LOG_VERBOSE("--------------------------------");
+LOG_VERBOSE("cmd : %02X", cmd);
+memcpy(buffer, g_rx_data + 5, data_len);
+
+// Process data according to command type
+switch (cmd) {
+case 0x00: // Startup information
+// ... Process startup information ...
+break;
+
+case 0x01: // Basic information
+// ... Process basic information ...
+break;
+
+case 0x02: // Power configuration
+// ... Process power configuration ...
+break;
+
+// ... Other command processing ...
+
+default:
+LOG_ERROR("Unknown command: 0x%02X", cmd);
+break;
+}
+
+return ret;
+}
+```
+
diff --git a/en/docs/products/evb/a316_v71_game_v1.md b/en/docs/products/evb/a316_v71_game_v1.md
index b602c55..ba2a37d 100644
--- a/en/docs/products/evb/a316_v71_game_v1.md
+++ b/en/docs/products/evb/a316_v71_game_v1.md
@@ -43,7 +43,7 @@ __Virtual 7.1 Gaming Sound Card Evaluation Board__
- Supports USB Audio Class 1.0 interface, providing USB input to I²S output transmission functionality, while also supporting I²S input to USB output bidirectional transmission
- Compatible with multiple operating systems including Windows, Linux, Android, macOS, and iOS, as well as gaming consoles like PS5 and SWITCH
-
+[:shopping_cart: Purchase Sample](https://detail.1688.com/offer/953365002736.html?spm=a26286.8251493.description.1.e47225b2yh6L7A){.md-button }
diff --git a/en/docs/products/modules/a316_1926v1.md b/en/docs/products/modules/a316_1926v1.md
index b42e576..23a4001 100644
--- a/en/docs/products/modules/a316_1926v1.md
+++ b/en/docs/products/modules/a316_1926v1.md
@@ -11,7 +11,7 @@ hide:
# A316-1926-V1
---
-__XU316 Module with Integrated 48.152MHz and 49.152MHz Active Crystals for USB HiFi Decoding__
+__XU316 Module with Integrated 45.158MHz and 49.152MHz Active Crystals for USB HiFi Decoding__
@@ -20,7 +20,7 @@ __XU316 Module with Integrated 48.152MHz and 49.152MHz Active Crystals for USB H
{align=right width=200 style="float: right; margin: 0 80px 0 80px;"}
## Product Overview
-- A316-1926V1 is a USB multi-channel high-definition audio decoder module. The module uses XMOS XU316-1024-QF60BC24 chip, integrates high-precision DC-DC chip, outputting 1.8V and 0.9V voltage to XU316. The module integrates 48.152MHz and 49.152MHz active crystals, meeting different high-definition audio sampling rate requirements. The module includes a built-in 24MHz crystal required by XU316 and 16Mbit Flash for storing audio firmware.
+- A316-1926V1 is a USB multi-channel high-definition audio decoder module. The module uses XMOS XU316-1024-QF60BC24 chip, integrates high-precision DC-DC chip, outputting 1.8V and 0.9V voltage to XU316. The module integrates 45.158MHz and 49.152MHz active crystals, meeting different high-definition audio sampling rate requirements. The module includes a built-in 24MHz crystal required by XU316 and 16Mbit Flash for storing audio firmware.
- A316-1926V1 provides a USB Audio sound card device with USB 2.0 interface compatible with full-speed and high-speed, supporting sampling rates up to 768 KHz in USB 2.0 asynchronous mode.
- With different firmware, A316-1926V1 can process up to 6 channels of SPDIF high-definition audio and 2 channels of I2S high-definition audio signals, meeting the requirements of various high-definition audio decoders.
@@ -32,7 +32,7 @@ __XU316 Module with Integrated 48.152MHz and 49.152MHz Active Crystals for USB H
=== "Key Features"
- **Configuration Features**
- Integrated high-precision DC-DC chip, requiring only 3.3V external power supply
- - Integrated 48.152MHz and 49.152MHz active crystals, meeting HiFi application requirements
+ - Integrated 45.158MHz and 49.152MHz active crystals, meeting HiFi application requirements
- Integrated 16Mbit QSPI Flash for storing firmware and data
- **USB Interface Features**
- USB 2.0 (Full-speed and High-speed)
@@ -50,7 +50,7 @@ __XU316 Module with Integrated 48.152MHz and 49.152MHz Active Crystals for USB H
Operating Voltage | 3.3V
Operating Temperature | -20°C ~ 85°C
Flash Size | 16M Bytes
- Active Crystal | 48.152MHz/49.152MHz
+ Active Crystal | 45.158MHz/49.152MHz
Dimensions | 19mm x 26mm
=== "Application Scenarios"
diff --git a/en/mkdocs.yml b/en/mkdocs.yml
index 532bc5d..ec81232 100644
--- a/en/mkdocs.yml
+++ b/en/mkdocs.yml
@@ -262,8 +262,9 @@ nav:
- A316-HF-I2S-V1:
- Hardware Specifications: dev_doc/evb/a316_hf_i2s_v1/datasheet.md
- A316-LS-MIC-V2:
- - User Guide: dev_doc/evb/a316_ls_mic_v2/user_guide-en.md
- - AI Noise Reduction Effect: dev_doc/evb/a316_ls_mic_v2/dnr_effect.md
+ - Live Microphone Firmware Usage Guide:
+ - User Guide: dev_doc/evb/a316_ls_mic_v2/user_guide.md
+ - AI Noise Reduction Effect: dev_doc/evb/a316_ls_mic_v2/dnr_effect.md
- OTG Firmware Test Guide: dev_doc/evb/a316_ls_mic_v2/otg_firmware_test_guide.md
- A316-V71-Game-V1:
- User Guide: dev_doc/evb/a316_v71_game_v1/user_guide-en.md
@@ -273,11 +274,17 @@ nav:
- XU316 USB HiFi Decoder ZeroCode Product Configuration Protocol: dev_doc/protocols/xu316_zerocode_protocol.md
- Development SDK and Examples:
- dev_doc/sdk_examples/index.md
+ - A316 Firmware-Free MCU Development Guide:
+ - A316 Series Product Firmware Development FAQ: dev_doc/faq/technical_faq/a316_firmware_dev_faq.md
+ - Command Macros: dev_doc/sdk_examples/XU316和MCU通讯的示例代码/命令的相关宏.md
+ - Command Reference: dev_doc/sdk_examples/XU316和MCU通讯的示例代码/命令相关.md
+ - XU316 Audio Interface Control Code Example: dev_doc/sdk_examples/XU316和MCU通讯的示例代码/产品内容相关.md
- FQAs:
- dev_doc/faq/index.md
- Product FAQs:
- Computer audio device settings: dev_doc/hifi_audio/a316_1926v1/used_en.md
- # - General Technical Q&A:
+ - General Technical Q&A:
+ - WiFi Audio + Bluetooth Module: dev_doc/faq/technical_faq/technical_faq.md
- Services & Support:
- services_support/index.md
diff --git a/zh/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1.png b/zh/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1.png
new file mode 100644
index 0000000..795f7a8
Binary files /dev/null and b/zh/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-1.png differ
diff --git a/zh/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2.png b/zh/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2.png
new file mode 100644
index 0000000..8e73148
Binary files /dev/null and b/zh/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_4-2.png differ
diff --git a/zh/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_5.png b/zh/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_5.png
new file mode 100644
index 0000000..6089555
Binary files /dev/null and b/zh/docs/assets/images/faq/wifiaudio_bl/FCM362K_problem_5.png differ
diff --git a/zh/docs/dev_doc/faq/technical_faq/technical_faq.md b/zh/docs/dev_doc/faq/technical_faq/technical_faq.md
new file mode 100644
index 0000000..aa258be
--- /dev/null
+++ b/zh/docs/dev_doc/faq/technical_faq/technical_faq.md
@@ -0,0 +1,134 @@
+---
+title: WiFi音响+蓝牙的模组常见问题解答
+description: 本文档汇总了无线WiFi模块、蓝牙模块在红外遥控、功耗、芯片架构、TX/RX转换、蓝牙TWS等方面的常见技术问题及解答,帮助开发者快速定位和解决问题。
+keywords: 8711,无线音箱, 红外遥控, 模块功耗, WIFI BT芯片, TX RX转换, 蓝牙TWS, 技术FAQ
+---
+
+--8<-- "common/phaten_xmos_support_img.md"
+
+# WiFi音响+蓝牙的模组技术常见问题解答
+
+## Q1:模块是否支持红外遥控解码?
+
+**支持红外解码功能。**
+
+---
+
+## Q2:模块工作和待机时的功耗
+
+=== "睡眠模式一"
+ - **工作状态**:TX/RX 都睡眠,WiFi 关闭,TX 和 RX BLE 工作
+ - **进入睡眠方式**:
+ - 应用程序主动调用 Sleep 接口
+ - 检测到 I2S 无数据一段时间自动进入
+ - **唤醒方式**:
+ - UART/GPIO 中断唤醒 TX → TX 唤醒 RX
+ - UART/GPIO 中断唤醒 RX → RX 唤醒 TX(双向唤醒)
+ - **电流**:
+ - 单方向唤醒:TX ≤1mA,RX ≤3mA
+ - 双向唤醒:TX ≤3mA,RX ≤3mA
+
+=== "睡眠模式二"
+ - **工作状态**:TX WiFi 不睡眠,RX WiFi 睡眠,TX/RX BLE 关闭
+ - **进入睡眠方式**:
+ - 应用程序主动调用 Sleep 接口
+ - 检测到 I2S 无数据一段时间自动进入
+ - **唤醒方式**:
+ - 应用程序调用播放接口(TX 自动唤醒 RX)
+ - 检测到 I2S 数据自动唤醒 RX
+ - **电流**:RX ≤1mA
+
+---
+
+## Q3:模块的 WIFI 和 BT 芯片架构
+
+采用单 SOC 芯片集成 WIFI 和 BT 功能。
+
+---
+
+## Q4:是否支持在线 TX/RX 转换
+
+### 支持情况:
+- 支持 WIFI 模式的 TX/RX 在线转换
+- BT 模式限制:
+ - SOC 仅支持 BLE5.0
+ - 不支持 Classic BT
+ - 无法通过手机蓝牙传输音频
+
+### 工作模式说明:
+
+=== "**TV 模式**:"
+ - 发射盒为 WIFI TX
+ - 接收音箱为双 RX(左/右声道)
+
+ 
+
+=== "**BT 模式**:"
+ - 左音箱:
+ - 作为 BT 接收手机信号
+ - 同时作为 WIFI TX 传输给右音箱
+ - 右音箱:纯 WIFI RX 模式
+
+ 
+
+---
+
+## Q5:蓝牙 TWS 功能实现
+
+- **不支持**原生蓝牙 TWS 功能
+- **替代方案**:
+ - BT 模式下左音箱(带遥控接收头)作为 TX
+ - 通过 TWS 方式传输右声道至右音箱
+ - 右音箱(无遥控接收头)作为 RX 接收 TWS 信号
+
+
+
+
+
\ No newline at end of file
diff --git a/zh/docs/products/evb/a316_v71_game_v1.md b/zh/docs/products/evb/a316_v71_game_v1.md
index 89d39d1..55c5607 100644
--- a/zh/docs/products/evb/a316_v71_game_v1.md
+++ b/zh/docs/products/evb/a316_v71_game_v1.md
@@ -41,7 +41,7 @@ __虚拟7.1游戏声卡评估板__
- 支持USB Audio Class 1.0接口,提供USB输入到I²S输出的传输功能,同时支持I²S输入到USB输出的双向传输
- 兼容多种操作系统,包括Windows、Linux、Android、macOS和iOS等,以及PS5、SWITCH等游戏主机
-
+[:shopping_cart: 购买样品](https://detail.1688.com/offer/953365002736.html?spm=a26286.8251493.description.1.e47225b2yh6L7A){.md-button }
diff --git a/zh/docs/products/modules/a316_1926v1.md b/zh/docs/products/modules/a316_1926v1.md
index 07649fa..2fcdc00 100644
--- a/zh/docs/products/modules/a316_1926v1.md
+++ b/zh/docs/products/modules/a316_1926v1.md
@@ -1,6 +1,6 @@
---
title: A316-1926-V1 USB多路高清音频解码器模组
-description: A316-1926-V1是一款集成48.152MHz和49.152MHz有源晶体的USB HiFi解码器专用XU316模组,支持768KHz采样率,可处理6路SPDIF和2路I2S高清音频信号,适用于专业音频设备和高品质USB音频解码器。
+description: A316-1926-V1是一款集成45.158MHz和49.152MHz有源晶体的USB HiFi解码器专用XU316模组,支持768KHz采样率,可处理6路SPDIF和2路I2S高清音频信号,适用于专业音频设备和高品质USB音频解码器。
keywords: A316-1926-V1, USB音频解码器, XU316模组, 多声道音频, HiFi解码器, 768KHz采样率, SPDIF音频, I2S音频, 专业音频设备, USB声卡, 高清音频解码器
hide:
-toc
@@ -12,7 +12,7 @@ hide:
"@context": "https://schema.org",
"@type": "Product",
"name": "A316-1926-V1 USB多路高清音频解码器模组",
- "description": "A316-1926-V1是一款集成48.152MHz和49.152MHz有源晶体的USB HiFi解码器专用XU316模组,支持768KHz采样率,可处理6路SPDIF和2路I2S高清音频信号。",
+ "description": "A316-1926-V1是一款集成45.158MHz和49.152MHz有源晶体的USB HiFi解码器专用XU316模组,支持768KHz采样率,可处理6路SPDIF和2路I2S高清音频信号。",
"brand": {
"@type": "Brand",
"name": "Phaten Audio"
@@ -54,7 +54,7 @@ hide:
# A316-1926-V1
---
-__集成48.152MHz和49.152MHz有源晶体USB HiFi解码器专用XU316模组__
+__集成45.158MHz和49.152MHz有源晶体USB HiFi解码器专用XU316模组__
@@ -64,8 +64,8 @@ __集成48.152MHz和49.152MHz有源晶体USB HiFi解码器专用XU316模组__
## 产品概述
{ width=200 style="float: right; margin: 0 80px 0 80px;"}
-- A316-1926V1是⼀款 USB多路高清音频解码器模组。模组使⽤XMOS的XU316-1024-QF60BC24芯⽚,集成了高精度DC-DC芯片,输出1.8V,0.9V电压给XU316 。模组集成了48.152MHz和49.152MHz有源晶体,满足不同高清音频采用率要求。模组内置XU316所需的24MHz晶体以及16Mbit Flash用来存储音频固件。
-- A316-1926V1提供兼容全速和⾼速的USB2.0接⼝的USB AUdiO声卡设备,在USB 2.0异步模式中,能够⽀持⾼达768 KHz的采样率。
+- A316-1926V1是⼀款 USB多路高清音频解码器模组。模组使⽤XMOS的XU316-1024-QF60BC24芯⽚,集成了高精度DC-DC芯片,输出1.8V,0.9V电压给XU316 。模组集成了45.158MHz和49.152MHz有源晶体,满足不同高清音频采用率要求。模组内置XU316所需的24MHz晶体以及16Mbit Flash用来存储音频固件。
+- A316-1926V1提供兼容全速和⾼速的USB2.0接⼝的USB Audio声卡设备,在USB 2.0异步模式中,能够⽀持⾼达768 KHz的采样率。
- 配合不同的固件,A316-1926V1可以处理高达6路SPDIF高清音频,以及2路I2S高清音频信号,满足多种高清音频解码器的需求。
[:material-file-document-outline: A316-1926-V1模组数据手册](../../dev_doc/datasheet/modules/a316_1926_v1_datasheet.md){.md-button }
@@ -76,7 +76,7 @@ __集成48.152MHz和49.152MHz有源晶体USB HiFi解码器专用XU316模组__
=== "关键特性"
- **配置特性**
- 集成了高精度DC-DC芯片,模组外部只需要3.3V供电
- - 集成了48.152MHz和49.152MHz有源晶体,满足HiFi应用需求
+ - 集成了45.158MHz和49.152MHz有源晶体,满足HiFi应用需求
- 集成16Mbit QSPI Flash用来存储固件及数据
- **USB接口特性**
- USB 2.0 (Full-speed and High-speed)
@@ -94,7 +94,7 @@ __集成48.152MHz和49.152MHz有源晶体USB HiFi解码器专用XU316模组__
工作电压 | 3.3V
工作温度 | -20℃ ~ 85℃
Flash大小 | 16M Bytes
- 有源晶振 | 48.152MHz/49.152MHz
+ 有源晶振 | 45.158MHz/49.152MHz
尺寸 | 19.5mm x 26mm
=== "应用场景"
diff --git a/zh/mkdocs.yml b/zh/mkdocs.yml
index b160342..3ce0c92 100644
--- a/zh/mkdocs.yml
+++ b/zh/mkdocs.yml
@@ -262,8 +262,9 @@ nav:
- A316-HF-I2S-V1:
- 硬件规格书: dev_doc/evb/a316_hf_i2s_v1/datasheet.md
- A316-LS-MIC-V2:
- - 产品使用指南: dev_doc/evb/a316_ls_mic_v2/user_guide.md
- - AI降噪效果演示: dev_doc/evb/a316_ls_mic_v2/dnr_effect.md
+ - 直播麦克风固件使用指南:
+ - 产品使用说明: dev_doc/evb/a316_ls_mic_v2/user_guide.md
+ - AI降噪效果演示: dev_doc/evb/a316_ls_mic_v2/dnr_effect.md
- OTG固件测试指南: dev_doc/evb/a316_ls_mic_v2/otg_firmware_test_guide.md
- A316-V71-Game-V1:
- 使用指南: dev_doc/evb/a316_v71_game_v1/user_guide.md
@@ -288,8 +289,9 @@ nav:
- dev_doc/faq/index.md
- 产品常见问题:
- 电脑音频设备设置: dev_doc/hifi_audio/a316_1926v1/used.md
- # - 通用技术问答:
- # - 免开发固件开发问题指南: dev_doc/faq/technical_faq/a316_firmware_dev_faq.md
+ - 通用技术问答:
+ # - 免开发固件开发问题指南: dev_doc/faq/technical_faq/a316_firmware_dev_faq.md
+ - wifi音箱+蓝牙的模组技术问答: dev_doc/faq/technical_faq/technical_faq.md
- 服务&支持:
- services_support/index.md