|
|
@@ -10,8 +10,17 @@
|
|
|
|
|
|
namespace esphome::gxepd2 {
|
|
|
|
|
|
+// GxEPD2's vendor source specifies 20MHz for this panel, but the
|
|
|
+// known-working epaper_spi driver for this exact physical unit/wiring
|
|
|
+// (waveshare-2.13in-bv4) deliberately runs at 10MHz. Busy consistently
|
|
|
+// engaging and clearing at a normal duration while content still comes out
|
|
|
+// wrong (solid black, then solid red, now solid black again) is consistent
|
|
|
+// with signal integrity problems at too aggressive a clock corrupting what
|
|
|
+// actually lands in RAM, even though the controller still completes some
|
|
|
+// waveform. Matching the proven-working clock instead of GxEPD2's generic
|
|
|
+// spec value.
|
|
|
using EpdSPIDevice = spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
|
|
|
- spi::DATA_RATE_20MHZ>;
|
|
|
+ spi::DATA_RATE_10MHZ>;
|
|
|
|
|
|
// Mechanically replicates one GxEPD2 driver's refresh cycle - reset pulse,
|
|
|
// init command table, RAM-window set, per-plane byte burst, refresh
|