Optical, Color & ToF
Vishay VCNL4040 digital twin
Integrated 200 mm proximity and ambient light I2C sensor.
VendorVishayOptical, Color & ToF
InterfaceI2C0x60 (fixed)
Record Status2026-11-19rev c3f5f9950 (clean tree)
Driver oracle & capability record
Part of the 27-part, 44-case twin-factory oracle suite (44/44 passed, generator 0.1.0+policy.12).
| Driver reference | Twin-factory vendor-driver oracle (0.1.0+policy.12) |
|---|---|
| Evidence standing | provisional (register and bus behavior derived from vendor datasheet or driver oracle; not yet hardware-unit verified on two physical samples). |
| Published record | accuracy/twin-factory-oracles-2026-11-19b.json (SHA-256 caa6e32e53c5) |
Key registers & reset values
| Address / Field | Register | Reset / Expected | Purpose |
|---|---|---|---|
0x0C | ID | 0x0186 | Vishay VCNL4040 16-bit device ID |
0x08 / 0x09 | PS_DATA / ALS_DATA | 16-bit LE | Proximity and ambient light output words |
Attach with ct CLI
Shell - run firmware with VCNL4040
# Run compiled firmware with VCNL4040 attached on esp32c6-devkitc
ct run --json --board esp32c6-devkitc --device vcnl4040 build/app.elf
# Run fault-injection suite and emit JUnit XML
ct test run --json --junit results/vcnl4040.xml tests/vcnl4040-fault.suite.yamlFault-injection test snippet (suite.yaml)
tests/vcnl4040-fault.suite.yaml
version: 1
board: esp32c6-devkitc
firmware: build/app.elf
tests:
- name: vcnl4040-i2c-nack-and-bad-id
faults:
- at_ms: 30
bus: I2C1
kind: nack
address: 0x60
count: 2
- at_ms: 150
part: vcnl4040
kind: register_override
register: 0x0C
value: 0xFF
expect:
console_contains: "DRIVER_FAULT_DETECTED"
exit_code: 0