Skip to content

Day 41 โ€“ Logs: Control Plane v3 Bring-up


๐Ÿงช Test Environment

  • Platform: Raspberry Pi
  • Driver: myadc_iio
  • Firmware: STM32 (register model v3)

๐Ÿ“‹ Test Log

Mode Switch

echo one-shot | sudo tee /sys/bus/iio/devices/iio:device0/mode

Output:

one-shot

Read Without Trigger

cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw
cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

Output:

101
101

Observation:

  • No automatic sampling
  • Mode is passive

Trigger One-Shot

echo 1 | sudo tee /sys/bus/iio/devices/iio:device0/one_shot

Output:

1

Read After Trigger

cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

Output:

102

Read Again

cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw

Output:

102

๐Ÿ“Š Observations

  • One-shot trigger successfully updates data
  • Data remains stable after acquisition
  • No repeated sampling
  • Control flow is fully deterministic

๐Ÿง  Analysis

The behavior confirms:

  • ACQ_MODE = ONE_SHOT does not trigger sampling
  • CMD = ONE_SHOT_START correctly initiates acquisition
  • Data path correctly reflects latest sample
  • Linux driver correctly interacts with firmware

โš ๏ธ Issues Encountered

1. Register test interference

Problem:

  • FIFO tests affected by background sampling

Root cause:

  • Timer-driven updates still active

Solution:

  • Separate:

  • register-only tests

  • task-based tests

2. One-shot trigger bug (driver)

Problem:

  • Incorrect input parsing (if (...) ;)

Fix:

  • Remove stray semicolon
  • Proper validation

3. Mutex unlock issue

Problem:

  • Early return without unlock

Fix:

  • Use goto out_unlock

โœ… Final Status

  • All tests passed
  • One-shot fully functional
  • Control plane validated
  • Linux integration stable

๐Ÿ Conclusion

Day 41 successfully completes:

  • Register model v3
  • Linux driver integration
  • One-shot acquisition pipeline

System is now ready for:

  • Advanced IRQ handling
  • Trigger/buffer integration
  • Further driver refinement