Skip to content

Hardware Reference Troubleshooting

Alex J Lennon edited this page Oct 7, 2025 · 1 revision

Hardware Troubleshooting Guide

WiFi/Bluetooth Issues (IW612)

"CMD_RESP: 0x107 block in pre_asleep!" Error

Symptoms: IW612 module fails to enter sleep mode, power management issues

Root Cause: SDIO wake interrupt configuration problems

Solution:

/* Device tree fix for IW612 power management */
&usdhc3 {
    keep-power-in-suspend;
    wakeup-source;
    cap-power-off-card;
    wifi-host;
};

/* Ensure proper GPIO configuration for wake signals */
&iomuxc {
    pinctrl_usdhc3_wifi: usdhc3-wifi-grp {
        fsl,pins = <
            /* Add wake interrupt pin configuration */
        >;
    };
};

Files Modified:

  • Device tree: imx8mm-jaguar-sentai.dts
  • Power management configuration

Validation: Check dmesg for absence of "block in pre_asleep" errors


USB Audio Issues

Bidirectional Audio Not Working

Symptoms: Audio only works in one direction (host→target or target→host)

Root Cause: USB gadget configuration or ALSA routing issues

Solution: Use proven USB audio gadget configuration:

# Enable USB audio gadget
systemctl start usb-audio-gadget

# Verify bidirectional capability
arecord -D hw:Gadget,0 -f S16_LE -r 48000 test.wav &
aplay -D hw:Gadget,0 test_tone.wav

Container Integration:

  • Use loop_playback_far for target→host audio
  • Use loop_capture_near_rec for host→target audio
  • Ensure PulseAudio configuration routes through USB gadget

Validation:

  • Host should record ~699KB files from target
  • Target should play host audio (e.g., 1500Hz tones)

E-Ink Display Issues

Chip Select Routing Problems

Symptoms: Display controllers not responding, SPI communication failures

Hardware Architecture:

  • Level Shifters: Convert 1.8V → 3.3V (can be temperamental)
  • Dual Controllers: Left (CS_M) and Right (CS_S)
  • Single CS Line: Routed via L#R_SEL_DIS signal (GPIO2_IO16)

CS Routing Control:

// Route to left controller (CS_M)
gpio_set_value(GPIO2_IO16, 0);  // LOW = left

// Route to right controller (CS_S)  
gpio_set_value(GPIO2_IO16, 1);  // HIGH = right

Testing Procedure:

  1. Start with fixed direction level shifters (more reliable)
  2. Test CS routing with oscilloscope
  3. Verify SPI communication to each controller
  4. Upgrade to autosensing level shifters if register reads needed

GPIO Configuration:

&gpio2 {
    eink-cs-routing {
        gpio-hog;
        gpios = <16 GPIO_ACTIVE_HIGH>;  /* GPIO2_IO16 */
        output-low;  /* Default to left controller */
        line-name = "eink-lr-sel-dis";
    };
};

Serial Port Issues

See Development-Setup-Serial-Port-Configuration for complete LPUART troubleshooting.


Power Management Issues

High Power Consumption

Check Power Domains:

  • LPUART1-2: AONMIX (always-on) - expected
  • LPUART3-8: WAKEUPMIX - should power down in sleep

Verify Sleep States:

# Check current power state
cat /sys/power/state

# Monitor power consumption
# Use board's coulomb meter if available

Common Fixes:

  • Disable unused peripherals in device tree
  • Configure proper GPIO power states
  • Verify PMIC configuration

General Debugging

Essential Commands

# Check kernel messages
dmesg | grep -E "error|fail|timeout"

# Monitor system resources
htop
iostat 1

# Check device tree
ls /proc/device-tree/
cat /proc/device-tree/model

# Verify hardware detection
lsusb
lspci  
i2cdetect -y 1

Log Locations

  • Kernel: dmesg or /var/log/kern.log
  • System: journalctl -f
  • Boot: Serial console during boot
  • Hardware: Check /sys/ filesystem for device status

Getting Help

  1. Check this wiki first - Most common issues documented
  2. Collect logs - dmesg, journalctl, hardware status
  3. Test systematically - Isolate the problem component
  4. Contact support - info@dynamicdevices.co.uk with logs and steps to reproduce
Clone this wiki locally