M1 complete: XIAO M0 drives LP5562 LEDs over I2C

Add error-resilient firmware with diagnostic LED blink patterns
(3 slow = alive, solid = I2C OK, fast burst = I2C error). Document
EVM external MCU wiring: disconnect P6 EN jumper, power VDD from
XIAO 5V, leave SCL/SDA jumpers in place with MSP430 unpowered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
michael
2026-03-05 12:03:31 -08:00
parent 5970a21b54
commit e45273bc71
3 changed files with 67 additions and 31 deletions

View File

@@ -1,6 +1,6 @@
# xblink Project Status
**Current Milestone**: M1LED Smoke Test (I2C verified via EVM USB bridge, XIAO M0 flash pending)
**Current Milestone**: M2Engine Patterns
**Last Updated**: 2026-03-05
---
@@ -24,7 +24,7 @@
- [x] Update `main.rs` with I2C init + GPIO EN + LP5562 direct PWM test
- [x] Verify `cargo build --release` compiles
- [x] Verify LP5562 I2C control via EVM USB-to-I2C bridge (`tools/lp5562_evm.py`)
- [ ] Flash XIAO M0 and verify RGBW LED channels with Rust firmware
- [x] Flash XIAO M0 and verify RGBW LED channels with Rust firmware
### M2: Engine Patterns
@@ -142,7 +142,7 @@
|------|--------|-------|
| Seeed XIAO M0 | Available | Dev board MCU (SAMD21G18A) |
| LP5562EVM | Available | TI eval module, RGBW LEDs, I2C addr 0x30 |
| Mini-USB cable | Not on hand | Needed to flash XIAO M0 |
| Mini-USB cable | Available | USB-C, used for flashing XIAO M0 |
| NTAG5 Link Click | Available, partially wired | Missing I2C jumper to XIAO |
| Hall effect sensor | Not available | Need to source — TI DRV5032FB (SOT-23) for prototype |
| ACR1552 PCSC reader | Available | For ntag5sensor Python tooling |

View File

@@ -88,3 +88,14 @@ The LP5562 EN pin is controlled by the MSP430's GPIO (EN-UC), connected through
**Workaround**: Jumper EN directly to VDD (3.3V) on P1 or P6 header. This is acceptable because in the final xblink design, EN is controlled by a wired-AND circuit (MCU GPIO + hall sensor), not the EVM's MSP430.
Without EN high, all I2C reads return status `02` (NAK) with data `00`.
## Using EVM with External MCU (XIAO M0)
When driving the LP5562 from an external MCU instead of the MSP430:
1. **Disconnect EVM from USB** — the MSP430 must be unpowered to avoid I2C bus contention.
2. **P6 header**: Remove the **EN jumper** to disconnect EN-UC (MSP430's EN output). Leave SCL/SDA jumpers in place — the unpowered MSP430's I/O pins go high-impedance.
3. **P4 header**: Feed external VDD (e.g., XIAO 5V pin → P4 VDD). The on-board LP2985 3.3V LDO only runs from USB power.
4. **Wiring**: XIAO A0 → P6 EN (LP5562 side), A4 → SDA, A5 → SCL, GND → GND, 5V → VDD.
The LP5562 VDD range is 2.75.5V. Using 5V ensures headroom for white LED forward voltage (~3.0V) plus LP5562 current sink saturation (~0.4V).