Capture_DebugSop
REVISION HISTORY¶
| Revision No. | Description |
Date |
|---|---|---|
| 1.0 | 12/13/2024 |
Question 1: No Data from Capture¶
1. Debug Flowchart for No Data from Capture¶
2. Explanation of Debug Flow for No Data from Capture¶
2.1 Hardware Issues¶
When no data is detected from Capture, you can manipulate the registers to set the corresponding PIN to GPIO and toggle it high and low (please note that for some PINs, the GPIO function may not have the highest priority, in which case you need to clear the higher priority first). If the actual output level does not change, it can be determined to be a hardware issue, and troubleshooting can be done in the following order:
2.1.1 HW-A Check Resistors¶
Check if there are any soldering issues (cold solder or missing solder) on the corresponding PIN in the schematic. If there is a cold solder, you need to re-solder the resistor; otherwise, the PIN will not be connected.
2.1.2 HW-B Check Soldering Condition¶
If the GPIO can be toggled high and low after replacing the Board, it may be due to a cold solder on the chip, requiring rework.
2.1.3 HW-C Request Assistance¶
Contact hardware colleagues for assistance in troubleshooting and re-soldering the chip.
2.1.4 HW-D Defect Reporting¶
If the GPIO still cannot be toggled high and low after replacing the Board, contact the SW Owner to report the defect.
2.2 Software Issues¶
2.2.1 Step SW-A Check PADMUX¶
-
Check if there are any conflicts in PADMUX.
-
Check if the padmux is enabled. For example, for pcupid, the padmux configuration for Capture needs to include the following content in the corresponding
arch/arm64/boot/dts/sstar/chipname-xxx-padmux.dtsibased on the selected pins:
<PAD_OUTP_CH0 PINMUX_FOR_PWMIN0_MODE_1 MDRV_PUSE_PWMIN0>, <PAD_OUTN_CH0 PINMUX_FOR_PWMIN1_MODE_1 MDRV_PUSE_PWMIN1>, <PAD_OUTP_CH1 PINMUX_FOR_PWMIN2_MODE_1 MDRV_PUSE_PWMIN2>, <PAD_OUTN_CH1 PINMUX_FOR_PWMIN3_MODE_1 MDRV_PUSE_PWMIN3>, <PAD_OUTP_CH2 PINMUX_FOR_PWMIN4_MODE_1 MDRV_PUSE_PWMIN4>, <PAD_OUTN_CH2 PINMUX_FOR_PWMIN5_MODE_1 MDRV_PUSE_PWMIN5>, <PAD_OUTP_CH3 PINMUX_FOR_PWMIN6_MODE_1 MDRV_PUSE_PWMIN6>, <PAD_OUTN_CH3 PINMUX_FOR_PWMIN7_MODE_1 MDRV_PUSE_PWMIN7>, <PAD_GPIOE_10 PINMUX_FOR_PWMIN8_MODE_3 MDRV_PUSE_PWMIN8>, <PAD_GPIOD_00 PINMUX_FOR_PWMIN9_MODE_2 MDRV_PUSE_PWMIN9>, <PAD_GPIOE_14 PINMUX_FOR_PWMIN10_MODE_3 MDRV_PUSE_PWMIN10>, <PAD_GPIOE_16 PINMUX_FOR_PWMIN11_MODE_3 MDRV_PUSE_PWMIN11>,
2.2.2 Step SW-B Check Capture Initialization Status¶
Dump the Capture bank to determine if Capture has completed initialization by checking if the value of 0x1B is not 0x00.
When Capture is uninitialized, the Bank information is as follows:
After Capture has completed initialization, the Bank information is as follows:
If initialization is not complete, data cannot be obtained. Please check if the config and DTS configuration have loaded the corresponding Capture driver.
Linux config:
Device Drivers --->
SStar SoC platform drivers --->
<*> Sstar Capture driver
Linux DTS:
capture0: capture@1f2ce000 {
compatible = "sstar,capture";
reg = <0x0 0x1F2CE000 0x0 0x80>;
......
status = "ok"; //ok: Initialize Capture
};
.....
2.2.3 Step SW-C Check Usage Method¶
Check if the usage method of Capture is correct. For details, see the usage document Capture Usage Reference. Common usage errors are as follows:
-
Incorrectly selecting direction mode and misconfiguring the direction judgment channel. In this mode, when a specific channel is set as a direction channel, it can only be used to judge pulse direction and cannot capture waveforms specifically.
-
PWM waveform frequency is too low. If Capture does not detect level changes over a period, it will automatically turn off. If you need to capture waveforms with a lower frequency, you need to set an appropriate timeout in sysfs capture/capture*/timeout.
2.2.4 Step SW-D Request Assistance¶
If the above steps SW-A and SW-B are all checked and OK, please provide Capture-related LOG and Capture BANK 0x1670, 0x167c information to the corresponding FAE.
3. Common Problem Descriptions¶
-
Unable to set to direction counting mode
- Only pcupid supports this feature.
- Only the first four groups of channels support direction counting mode, with each group's two channels, one for pulse counting and one for direction judgment.
-
Unable to set to quadrature encoder mode
- Only pcupid supports this feature.
- Similar to direction mode, only the first four groups of channels support this feature.