Voice Chip Factory Test Plan*
1. Overview*
This factory test plan verifies various chip functions through a serial communication protocol between the host module and the MCU.
For detailed serial protocol information, please refer to the GX8006 Large Model Development Kit and download the Guoxin Micro Offline Voice Protocol_v*.pdf.
1.1. Test Requirements*
- Test host (host module)
- Voice chip (MCU)
- Serial connection between host and MCU
- Audio input device (microphone)
- Audio output device (speaker)
1.2. Test Points Included*
- Recording and playback loop connectivity
- Whether the MIC can capture sound
- Whether the speaker can play sound
- Whether GPIO can perform normal input/output
2. Test Items and Procedures*
2.1 GPIO Test (0x0D)*
This test is divided into two parts.
2.1.1 GPIO Test 1*
This test verifies whether the input/output of each GPIO pin is normal.
2.1.1.1 Hardware Requirements*
- Connect each group of pins to be tested to each other
- Default software test groups:
{2, {11, 13}}, // Group 0 {2, {12, 15}}, // Group 1 {2, {5, 9}}, // Group 2 {2, {14, 6}} // Group 3
2.1.1.2 Test Logic*
- First set one pin in a group as output mode, and the other pins as input mode
- The output pin first outputs a high level; check whether all other pins can read a high level
- The output pin then outputs a low level; check whether all other pins can read a low level
- If any test fails, there may be a problem between the pins in that group
- Use the above logic to test other groups
2.1.2 GPIO Test 2*
This test verifies whether MICN is grounded.
2.1.2.1 Hardware Requirements*
- Connect
GX_MICNandGPIO10. GPIO10needs to be adjusted according to actual hardware conditions; the default software usesGPIO10
2.1.2.2 Test Logic*
- Check whether
GPIO10is0to determine whether theGX_MICNpin is correctly grounded after soldering.
2.1.3 Test Procedure*
-
The host module sends the test command
Field Length Description Frame Header 2 0x55aa Version 1 0x00 Command 1 0x92 Data Length 2 0x0002 Data 1 0x0D (Sub-command) Data 1 0x01 (Test 1 + Test 2)
0x02 (Test 2 only)Checksum 1 Sum of bytes starting from the frame header, modulo 256 -
After receiving the command, the MCU executes the corresponding GPIO test
-
Returns the result after the test is completed
Field Length Description Frame Header 2 0x55aa Version 1 0x03 Command 1 0x92 Data Length 2 0x0002 Data 1 0x0D (Sub-command) 1 0x00 (Success)
0x01 (Failure)Checksum 1 Sum of bytes starting from the frame header, modulo 256 Return Description:
- 0x00: Success
- 0x01: Failure
2.2 Audio Loop Test (0x0C)*
This test verifies the integrity of the audio recording and playback paths.
Connection Diagram:
Voice Board Device Under Test 8006
┌───────┐ ┌──────────┐
│ │ ┌──────▶│ MIC │
│ SPK│───────│ │ │
│ │ └──────▶│ AEC(REF) │
│ │ │ │
│ MIC|◀──────────────│ SPK │
└───────┘ └──────────┘
2.2.1 Hardware Requirements*
- A voice board is required to generate audio signals
- The voice board's SPK is fed to the MCU's MIC and AEC
- The MCU's SPK output is looped back to the voice board's MIC
- For the voice loop test, the 8006 only performs waveform capture and playback; the final test result is output by the voice board to the host.
- The MCU's playback capture circuit must not be connected; the 8006's SPK and REF should only be connected after the test confirms there are no issues.
2.2.2 Test Logic*
- The MCU's
GX_MICNgrounding is verified by GPIO Test Item 2. - The voice board generates an audio signal, e.g., 1K
- The MCU captures and then plays it back, outputting to the voice board
- The voice board detects the received signal to verify whether the loop is normal
2.2.3 Test Procedure*
-
The host module sends the test command
Field Length Description Frame Header 2 0x55aa Version 1 0x00 Command 1 0x92 Data Length 2 0x0003 Data 1 0x0C (Sub-command) Data 1 0x00 (MIC channel)
0x01 (Playback capture channel)
0xFF (End test)Checksum 1 Sum of bytes starting from the frame header, modulo 256 Two tests are required: one for the MIC and one for the playback capture. When the test needs to end, the host must send the end test command.
-
The MCU returns the execution result
Field Length Description Frame Header 2 0x55aa Version 1 0x03 Command 1 0x92 Data Length 2 0x0002 Data 1 0x0C (Sub-command) 1 0x00 (Success); 0x01 (Failure) Checksum 1 Sum of bytes starting from the frame header, modulo 256 Return Description: This only indicates whether the 8006 waveform capture and playback execution for the voice loop test was successful. The final test result is output by the voice board to the host.
-
After receiving the command, the MCU starts the audio loop capture and playback for the corresponding channel
2.3 Recording and Playback Test (0x0B)*
This test verifies whether the chip's MIC and speaker are normal.
2.3.1 Hardware Requirements*
- MIC and speaker must be connected
2.3.2 Test Logic*
- After receiving the command, the MCU starts recording, captures audio for the specified duration, and plays it back after recording is complete. Determine whether it is normal by listening to the speaker output.
2.3.3 Test Procedure*
-
The host module sends the test command:
Field Length Description Frame Header 2 0x55aa Version 1 0x00 Command 1 0x92 Data Length 2 0x0002 Data 1 0x0B (Sub-command) 1 N (Recording time in seconds; due to memory limitations, the current maximum time is 10 seconds) Checksum 1 Sum of bytes starting from the frame header, modulo 256 -
After receiving the command, the MCU starts recording and captures audio for the specified duration. Start speaking at this time so that the MIC can receive sound.
-
After recording is complete, the recorded audio is played back automatically. Listen to the speaker to check whether the sound matches what was just spoken, and determine whether it is normal.
-
The MCU returns the test execution result
Field Length Description Frame Header 2 0x55aa Version 1 0x03 Command 1 0x92 Data Length 2 0x0001 Data 1 0x0B (Sub-command) Checksum 1 Sum of bytes starting from the frame header, modulo 256 Return Description: This only indicates whether the software executed successfully. Whether there is an actual problem must be determined by listening to the speaker.
-
The next test must wait until this test is completed (recording and playback finished)