ESH10000239 - I2C Long Range 4ch Module
Overview
The ESH10000239 is a long-range I²C extension module providing 4 independent I²C channels with power control, link status monitoring, and automatic discovery capabilities for connecting remote I²C devices over extended distances.
Description
The I2C Long Range 4ch module extends I²C communication beyond standard distance limitations using dedicated line drivers/repeaters. Each of the 4 channels features independent power control, reset capability, and real-time link status detection, making it ideal for connecting to remote test fixtures, DUTs, or distributed sensor networks.
Key Features:
4 Long-Range I²C Channels: Extended distance I²C communication
- Individual power enable control per channel
- Per-channel reset capability
- Real-time link status monitoring
- Automatic power management on link failure
Power Management: Smart downstream power control
- PWREN1-4: Individual power enable outputs
- Automatic power-off on link loss
- Power sequencing during module discovery
- Overcurrent/fault detection
Link Status Monitoring: Real-time connection health
- LINK1-4: Active-low link detect inputs (ReadOnlySystemControl)
- Automatic link polling during discovery
- 100ms timeout for link establishment
- FAULTn: Global fault indicator
Module Discovery: Automatic downstream module detection
- Enumerates connected modules on each I²C channel
- Power-on sequence with link verification
- Reset release timing control
- Fault-tolerant discovery (continues on channel errors)
Hardware Details
Line Drivers:
- Type: Long-range I²C repeaters/extenders (specific chip TBD)
- Channels: 4 independent I²C buses
- Distance: Extended beyond standard I²C limits (typically 10m+ vs. <1m standard)
- Features:
- Active buffering
- Rise-time acceleration
- Bidirectional communication
- Link status reporting
GPIO Expander:
- Chip: NXP PI4IOE5V6416
- I²C Address: 0x20
- Source Bus: "OWN" (module's own I²C bus, not routed through parent)
- Purpose: Power control, reset control, link monitoring, LED control
Power Distribution:
- Downstream power switching per channel
- Controlled via PWREN1-4 outputs
- Protection features (fault detection)
Channel Naming Convention
All channels follow the naming pattern: {ModuleIndex}.ESH10000239.{ChannelName}
Where:
{ModuleIndex}is the position of the module in the system (e.g., 0, 1, 2...)ESH10000239is the module type identifier{ChannelName}is the specific channel name from the table below
Example: Module at position 0, power enable for channel 1 would be: 0.ESH10000239.PWREN1
User-Accessible Channels
| Channel Name | Type | Direction | Usage | Description |
|---|---|---|---|---|
| PWREN1 | Digital | OUT | UserAllocatable | Power enable for I²C channel 1 (true=on, false=off) |
| PWREN2 | Digital | OUT | UserAllocatable | Power enable for I²C channel 2 (true=on, false=off) |
| PWREN3 | Digital | OUT | UserAllocatable | Power enable for I²C channel 3 (true=on, false=off) |
| PWREN4 | Digital | OUT | UserAllocatable | Power enable for I²C channel 4 (true=on, false=off) |
| LINK1 | Digital | IN | ReadOnlySystemControl | Link status for channel 1 (false=connected, true=disconnected) |
| LINK2 | Digital | IN | ReadOnlySystemControl | Link status for channel 2 (false=connected, true=disconnected) |
| LINK3 | Digital | IN | ReadOnlySystemControl | Link status for channel 3 (false=connected, true=disconnected) |
| LINK4 | Digital | IN | ReadOnlySystemControl | Link status for channel 4 (false=connected, true=disconnected) |
| FAULTn | Digital | IN | ReadOnlySystemControl | Global fault indicator (active-low, false=fault) |
Total User Channels: 9 (4 power enables + 4 link status + 1 fault indicator)
Note: LINK channels are active-low - a value of false indicates a successful connection.
Internal Channels (Not User-Accessible)
The following channels are used for internal system control and are hidden from users:
- GPIO Expander Signals (all
HiddenSystemControl):- RESET1n-RESET4n: Per-channel reset control (active-low)
- LED_R: Red status LED
- LED_G: Green status LED
- IOCTRL: I/O control signal
Data Bus Integration
The module provides a data bus with 4 I²C channel signals:
- Signal Type: I2C
- NetName Pattern:
{ModuleIndex}.ESH10000239.I2C{00-03} - Purpose: Routes I²C buses to downstream modules
- Usage: Automatic routing during module discovery and communication
Module Discovery Process
The DiscoverModules() method implements an automatic discovery sequence for each of the 4 I²C channels:
Discovery Sequence per Channel:
- Setup GPIO Expander: Initialize control signals (if first run)
- Check Existing Link: Read current LINK status
- Enable Power: Set PWREN = true
- Wait for Power Stabilization: 2ms delay
- Release Reset: Set RESETn = true
- Poll Link Status: Wait up to 100ms for LINK = false (connected)
- Verify Link:
- Success: Proceed to enumerate downstream modules
- Failure: Disable power (PWREN = false), log warning, continue to next channel
- Enumerate Modules: Call
CommonMethods.DiscoverModules()for connected channel - Add to Collection: Add discovered modules to parent's module list
Example Discovery Output:
INFO: LINK1 status: true (disconnected)
INFO: Enabling power on channel 1
INFO: Link established on channel 1
INFO: Discovered 2 modules on channel 1
WARN: No Link on channel 2 found. Disabling power
INFO: Link established on channel 3
Programming Interface
Enable Channel Power:
SetValues(
new[] { "0.ESH10000239.PWREN1", "0.ESH10000239.PWREN2" },
new[] { "true", "true" } // Power on channels 1 and 2
);
Check Link Status:
string[] status = GetValues(new[] {
"0.ESH10000239.LINK1",
"0.ESH10000239.LINK2",
"0.ESH10000239.LINK3",
"0.ESH10000239.LINK4"
});
// status[i] = "false" means link is CONNECTED (active-low)
// status[i] = "true" means link is DISCONNECTED
bool channel1Connected = bool.Parse(status[0]) == false;
bool channel2Connected = bool.Parse(status[1]) == false;
Monitor Fault Status:
string[] fault = GetValues(new[] { "0.ESH10000239.FAULTn" });
bool faultDetected = bool.Parse(fault[0]) == false; // Active-low
if (faultDetected)
{
Console.WriteLine("WARNING: Fault detected on module");
// Take corrective action
}
Power Cycle a Channel:
// Power off
SetValues(
new[] { "0.ESH10000239.PWREN1" },
new[] { "false" }
);
Thread.Sleep(100); // Wait for power-down
// Power on
SetValues(
new[] { "0.ESH10000239.PWREN1" },
new[] { "true" }
);
Thread.Sleep(2); // Wait for power stabilization
// Check link
string[] link = GetValues(new[] { "0.ESH10000239.LINK1" });
bool connected = bool.Parse(link[0]) == false; // Active-low
Configure Channels:
ConfigureChannels(new[] {
new DigitalChannel {
NetName = "0.ESH10000239.PWREN1",
Enabled = true,
Direction = DirectionTypes.OUT,
DefaultValue = false, // Power off by default
Value = false
},
new DigitalChannel {
NetName = "0.ESH10000239.PWREN2",
Enabled = true,
Direction = DirectionTypes.OUT,
DefaultValue = false,
Value = false
}
});
Link Detection Mechanism
The module uses a polling-based link detection with timeout:
private bool PollUntilState(string name, bool state, int timeout = 1000)
{
var start = DateTime.Now;
while (DateTime.Now.Subtract(start).TotalMilliseconds < timeout)
{
gpio.Invalidate(); // Force re-read from hardware
if (bool.Parse(gpio.GetValues([name])[0]).Equals(state))
return true;
System.Threading.Thread.Sleep(10); // Poll every 10ms
}
return false; // Timeout
}
Usage during Discovery:
// Wait for link to become active (false = connected)
if (PollUntilState(GetFullNetName("LINK1"), false, 100))
{
// Link established within 100ms
}
else
{
// Link failed to establish, disable power
}
Error Handling
The module implements fault-tolerant operation:
- Channel-Level Isolation: Failure on one channel does not affect others
- Automatic Power Management: Disables power on link failure
- Graceful Degradation: Discovery continues even if some channels fail
- Comprehensive Logging: Error, warning, and info messages for troubleshooting
Error Scenarios:
No Link Detected:
- Power remains off
- Warning logged: "No Link on channel X found. Disabling power"
- Discovery continues to next channel
Discovery Exception:
- Exception caught and logged
- Power disabled for faulted channel
- Discovery continues to next channel
GPIO Communication Failure:
- Logged as error
- May retry based on I²C layer retry logic
Best Practices
- Check link status before operations: Always verify LINK = false before I²C transactions
- Monitor link during operation: Periodically poll link status for connection health
- Power sequencing: Wait 2ms after enabling power before releasing reset
- Link establishment timeout: Allow up to 100ms for link to stabilize
- Fault monitoring: Check FAULTn periodically for system-level issues
- Power management: Disable power when channel is unused to save energy
- Discovery on reset: Call DiscoverModules() after module reset to enumerate downstream devices
- Active-low signals: Remember LINK and FAULTn are active-low (false = active/connected)
- Graceful handling: Expect some channels may not have devices connected
- Cable length: Test I²C communication reliability at maximum expected cable length
Module Initialization Sequence
On Reset(), the module performs:
- (Empty Reset): Reset() method is currently empty
- Discovery-based Init: Actual initialization occurs in
DiscoverModules()
On DiscoverModules(), the module performs:
- Clear module list
- Setup GPIO expander with control signals:
- RESET1n-RESET4n (active-low reset outputs, default=false)
- PWREN1-4 (power enable outputs, default=false)
- LINK1-4 (link detect inputs, read-only)
- FAULTn (fault indicator input, read-only)
- LED_R, LED_G (status LEDs)
- IOCTRL (I/O control)
- For each of 4 channels (i=1 to 4):
- Read initial LINK status
- Enable power (PWREN = true)
- Wait 2ms for power stabilization
- Release reset (RESETn = true)
- Poll for link (wait up to 100ms for LINK = false)
- If link established:
- Enumerate downstream modules
- Add to module collection
- If link failed:
- Disable power (PWREN = false)
- Log warning
- Continue to next channel
Typical Use Cases
1. Test Fixture Interface:
// Connect to 4 remote test fixtures
module.DiscoverModules();
// Modules on each I²C channel are now available
2. Distributed Sensor Network:
// Enable power to all sensor nodes
SetValues(
new[] { "0.ESH10000239.PWREN1", "0.ESH10000239.PWREN2",
"0.ESH10000239.PWREN3", "0.ESH10000239.PWREN4" },
new[] { "true", "true", "true", "true" }
);
// Monitor link health
while (running)
{
string[] links = GetValues(new[] {
"0.ESH10000239.LINK1", "0.ESH10000239.LINK2",
"0.ESH10000239.LINK3", "0.ESH10000239.LINK4"
});
for (int i = 0; i < 4; i++)
{
if (bool.Parse(links[i]) == true) // Disconnected
{
Console.WriteLine($"WARNING: Channel {i+1} link lost!");
}
}
Thread.Sleep(1000); // Check every second
}
3. Hot-Plug Detection:
// Poll for new device connections
while (true)
{
string[] links = GetValues(new[] { "0.ESH10000239.LINK1" });
bool connected = bool.Parse(links[0]) == false;
if (connected && !wasConnected)
{
// Device just connected
Console.WriteLine("Device detected on channel 1");
module.DiscoverModules(); // Re-enumerate
}
wasConnected = connected;
Thread.Sleep(500);
}
Debugging and Troubleshooting
Problem: Link status always shows disconnected
- Check: Cable connection and length
- Check: Power enable is set to true
- Check: Reset line has been released (RESETn = true)
- Check: Downstream device is powered and functional
- Try: Increase polling timeout beyond 100ms
Problem: Fault indicator is active
- Check: Overcurrent condition on any channel
- Check: Short circuit on downstream devices
- Action: Disable power, investigate hardware issue
Problem: DiscoverModules() finds no modules
- Check: Link status for each channel
- Check: Cable continuity
- Check: Downstream module I²C addresses don't conflict
- Try: Manual power cycle of problematic channels
Problem: Intermittent communication errors
- Check: Cable length and quality
- Check: I²C pull-up resistors on downstream devices
- Check: Ground connection integrity
- Try: Reduce I²C bus speed (if configurable on downstream devices)
Comparison with Standard I²C
| Feature | ESH10000239 (Long Range) | Standard I²C |
|---|---|---|
| Max Distance | 10m+ (typical) | < 1m (reliable) |
| Cable Type | Cat5/Cat6 or similar | Short twisted pair |
| Line Drivers | Active buffering | Passive pull-ups only |
| Power Distribution | Integrated per channel | External required |
| Link Detection | Hardware-supported | Not available |
| Fault Protection | Built-in | Not available |
| Channels | 4 independent | Typically 1 bus |
Revision History
- ESH10000239: Current production version
- 4 long-range I²C channels
- Per-channel power control and reset
- Link status monitoring
- Automatic module discovery
- Fault detection