CrashOverride85 / zc95

4 channel EStim box inspired by the mk312bt, with Lua scripting support
GNU General Public License v3.0
46 stars 12 forks source link

HW check failure detecting front panel version #107

Closed CrashOverride85 closed 4 months ago

CrashOverride85 commented 4 months ago

Discussed in https://github.com/CrashOverride85/zc95/discussions/106

Originally posted by **electro991** July 1, 2024 I get occasional « Hardware check failed » « Unable to determine front panel version » on boot. A simple off / on resolves it It seems to occur only on first boot after being off. Would you have an idea what could be causing this ?

ZC95 is sometimes failing to detect which version of the front panel (v0.1 or v0.2) is connected.

The current logic looks for the presence of the v0.1 ADC on 0x38, and the v0.2 ADC on 0x48. If both (or neither) are found it errors out.

This sometimes goes wrong because on initial power up the TLC59108 LED driver also appears on an "ALLCALL" address of 0x48, and its reset line is floating (connected to the unconfigured TCA9534 port expander). So usually it doesn't show up on 0x48, but sometimes it does and the hw check fails.

Summary of i2c addresses in use:

v0.1

0x26 I/O expander 0x48 ADC

v0.2

0x38 I/O expander - doesn't show up on i2c scan unless written to first 0x41 LED driver (if reset high) 0x48 LED driver (if reset high and not configured - in addition to 0x41) 0x49 ADC

Firmware fix is probably to identify v0.1 by looking for the presence of 0x26, and v0.2 by looking for 0x49. But ideally a pull up or pull down is needed at some point on the reset line to put the LED driver into a known state right from power up.