Hardware Access Guide
epc670 ToF HAT+ provides several low-level hardware interfaces that can be accessed directly from Linux. These interfaces are primarily intended for diagnostics, maintenance, manufacturing, and advanced development.
This guide explains how to access:
On-board temperature sensors via hwmon
On-board SPI NOR flash storage via MTD
Sensor internal temperature via driver hwmon
Sensor registers via debugfs
Temperature Monitoring (Board Sensors via hwmon)
The epc670 ToF HAT+ features two board-level temperature sensors placed near the illumination LEDs. They monitor thermal conditions around heat-generating components.
These sensors are exposed through the Linux hwmon subsystem.
Identify the correct hwmon devices
# List available hwmon devices
ls /sys/class/hwmon/
# Locate the device
grep . /sys/class/hwmon/hwmon*/name
Expected entry:
tmp112
Read current temperatures
cat /sys/class/hwmon/hwmon1/temp1_input
cat /sys/class/hwmon/hwmon2/temp1_input
Values are reported in millidegree Celsius (m°C).
Example:
42125 → 42.125 °C
Temperature Monitoring (Sensor Internal via Driver hwmon)
The epc670 sensor itself integrates multiple internal temperature sensors. These are exposed by the driver through a separate hwmon interface.
Locate the device
grep . /sys/class/hwmon/hwmon*/name
Expected entry:
epc670
Available channels
Channel |
Label |
|---|---|
0 |
epc670_temp_sensor_0 |
1 |
epc670_temp_sensor_1 |
2 |
epc670_temp_sensor_2 |
2 |
epc670_temp_sensor_3 |
Read temperatures
cd /sys/class/hwmon/hwmonX
paste temp*_label temp*_input
For more info, please visit The hwmon Interface
Sensor Register Access (Driver debugfs)
The debugfs interface allows low-level register access to the epc670 sensor for debugging and bring-up.
All epc670 debug files are located at:
/sys/kernel/debug/epc670/
If the directory is missing, mount debugfs:
sudo mount -t debugfs none /sys/kernel/debug
Available interfaces
File |
Purpose |
|---|---|
read_reg |
Read one or more sensor registers |
write_reg |
Write sensor registers |
dump |
Dump full register map |
Example: Read registers
echo "0xA0 3" | sudo tee /sys/kernel/debug/epc670/read_reg
sudo cat /sys/kernel/debug/epc670/read_reg
Example: Write registers
echo "0xA0 0x12 0x34 0x56" | sudo tee /sys/kernel/debug/epc670/write_reg
Warning
Writing invalid values may damage the device or cause undefined behavior.
For full documentation, see: The DebugFS Interface
Device Nodes Overview
Path |
Purpose |
|---|---|
|
Frame streaming |
|
Sensor control |
|
Temperature monitoring |
|
Register debugging |
|
Block-mapped flash |
Runtime Nodes Overview
Path |
Purpose |
|---|---|
|
Symlink to correct frame streaming video node |
|
Symlink to correct media device node |
|
Symlink to |
When to Use Each Interface
Task |
Interface |
Path |
|---|---|---|
Monitor LED board temperature |
hwmon (temp112) |
|
Monitor sensor internal temperature |
driver hwmon |
|
Debug sensor configuration |
debugfs |
|
Store calibration data |
SPI NOR flash |
|
Capture frames |
V4L2 video node |
|