Skip to content

Commit a5ae0a4

Browse files
committed
Add experimental support for LilyGo T-Deck Pro E-Paper
Add new board configuration for the LilyGo T-Deck Pro with E-Paper display (GDEQ031T10, 3.1" 320x240 touchscreen) and 4G LTE modem (A7682E). Hardware features: - ESP32-S3FN16R8 (16MB Flash, 8MB PSRAM) - 3.1" E-Paper display with CST328 capacitive touch - TCA8418 QWERTY keyboard controller - SX1262 LoRa radio - MIA-M10Q GPS module - A7682E 4G LTE modem (optional) - 1400mAh battery with BQ25896/BQ27220 management Known limitations: - E-Paper display has slow refresh rate (1-2s) - Temporary ST7789 driver config (needs GxEPD2 integration) - TCA8418 keyboard driver needs full implementation - Battery management requires BQ driver implementation This is an experimental configuration. Full E-Paper support requires integrating the GxEPD2 library and optimizing the UI for slow refresh rates. See boards/lilygo-t-deck-pro-epaper/README.md for details.
1 parent f371a0b commit a5ae0a4

File tree

5 files changed

+783
-0
lines changed

5 files changed

+783
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "esp32s3_out.ld",
5+
"partitions": "default_16MB.csv",
6+
"memory_type": "qio_opi"
7+
},
8+
"core": "esp32",
9+
"extra_flags": [
10+
"-DT_DECK_PRO_EPAPER",
11+
"-DBOARD_HAS_PSRAM",
12+
"-DARDUINO_USB_MODE=1",
13+
"-DARDUINO_RUNNING_CORE=1",
14+
"-DARDUINO_EVENT_RUNNING_CORE=1",
15+
"-DARDUINO_USB_CDC_ON_BOOT"
16+
],
17+
"f_cpu": "240000000L",
18+
"f_flash": "80000000L",
19+
"flash_mode": "qio",
20+
"hwids": [
21+
[
22+
"0x303A",
23+
"0x1001"
24+
]
25+
],
26+
"mcu": "esp32s3",
27+
"variant": "lilygo-t-deck-pro-epaper"
28+
},
29+
"connectivity": [
30+
"wifi",
31+
"bluetooth",
32+
"lora",
33+
"cellular"
34+
],
35+
"debug": {
36+
"default_tool": "esp-builtin",
37+
"onboard_tools": [
38+
"esp-builtin"
39+
],
40+
"openocd_target": "esp32s3.cfg"
41+
},
42+
"frameworks": [
43+
"arduino",
44+
"espidf"
45+
],
46+
"name": "LilyGo T-Deck Pro E-Paper (16M Flash 8M PSRAM)",
47+
"upload": {
48+
"flash_size": "16MB",
49+
"maximum_ram_size": 327680,
50+
"maximum_size": 16777216,
51+
"require_upload_port": true,
52+
"speed": 921600
53+
},
54+
"url": "https://www.lilygo.cc",
55+
"vendor": "LilyGo"
56+
}
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# LilyGo T-Deck Pro E-Paper - Bruce Firmware
2+
3+
⚠️ **EXPERIMENTAL SUPPORT** ⚠️
4+
5+
This board configuration is experimental and has significant limitations due to the E-Paper display.
6+
7+
## Hardware Specifications
8+
9+
- **MCU**: ESP32-S3FN16R8 (16MB Flash, 8MB PSRAM)
10+
- **Display**: GDEQ031T10 (3.1" E-Paper, 320x240, UC8253 controller)
11+
- **Touch**: CST328 capacitive touch controller (I2C 0x1A)
12+
- **Keyboard**: TCA8418 QWERTY keyboard controller (I2C 0x34)
13+
- **LoRa**: SX1262 (915/868 MHz)
14+
- **GPS**: MIA-M10Q (UART)
15+
- **4G Modem**: A7682E LTE Cat 1 (optional)
16+
- **Battery**: 1400mAh LiPo with BQ25896 charger and BQ27220 fuel gauge
17+
- **Gyroscope**: BHI260AP (I2C 0x28)
18+
- **SD Card**: MicroSD slot (SPI)
19+
20+
## Pin Configuration
21+
22+
### Display (E-Paper)
23+
- **MOSI**: GPIO 33
24+
- **SCK**: GPIO 36
25+
- **CS**: GPIO 34
26+
- **DC**: GPIO 35
27+
- **BUSY**: GPIO 37
28+
- **RST**: Not connected (-1)
29+
30+
### Touch (CST328)
31+
- **SDA**: GPIO 13
32+
- **SCL**: GPIO 14
33+
- **INT**: GPIO 12
34+
- **RST**: GPIO 45
35+
36+
### Keyboard (TCA8418)
37+
- **SDA**: GPIO 13
38+
- **SCL**: GPIO 14
39+
- **INT**: GPIO 15
40+
- **LED**: GPIO 42
41+
42+
### LoRa (SX1262)
43+
- **MOSI**: GPIO 33
44+
- **MISO**: Not used
45+
- **SCK**: GPIO 36
46+
- **CS**: GPIO 3
47+
- **RST**: GPIO 4
48+
- **DIO1**: GPIO 5
49+
- **BUSY**: GPIO 6
50+
51+
### SD Card
52+
- **MOSI**: GPIO 33
53+
- **SCK**: GPIO 36
54+
- **CS**: GPIO 48
55+
56+
### GPS (MIA-M10Q)
57+
- **TX**: GPIO 16
58+
- **RX**: GPIO 17
59+
- **Baud Rate**: 9600
60+
61+
### Power
62+
- **Power Control**: GPIO 10
63+
- **Battery ADC**: GPIO 4
64+
65+
## Known Limitations
66+
67+
### E-Paper Display Limitations
68+
69+
1. **Slow Refresh Rate**: E-Paper displays take 1-2 seconds to fully refresh
70+
- Bruce's UI expects fast TFT refresh rates
71+
- Menus and animations will be very slow and choppy
72+
- Not suitable for real-time operations
73+
74+
2. **Ghosting**: E-Paper displays show ghosting effects
75+
- Previous images may remain faintly visible
76+
- Full screen refreshes needed periodically
77+
78+
3. **Monochrome Only**: E-Paper is black and white
79+
- No color support (Bruce UI uses colors extensively)
80+
- Reduced visual feedback
81+
82+
4. **No Backlight**: E-Paper has no backlight
83+
- Needs external light to be readable
84+
- Brightness controls do nothing
85+
86+
### Current Implementation Status
87+
88+
**Working:**
89+
- Touch input (CST328)
90+
- Basic GPIO setup
91+
- Power management
92+
- SD Card support
93+
- LoRa module support
94+
95+
⚠️ **Partially Working:**
96+
- Display output (using TFT_eSPI with ST7789 driver as placeholder)
97+
- **CRITICAL**: E-Paper requires GxEPD2 library, not TFT_eSPI
98+
- Current config will NOT work correctly with E-Paper
99+
- This is a temporary workaround for compilation
100+
101+
**Not Implemented:**
102+
- Keyboard input (TCA8418 needs proper driver library)
103+
- 4G Modem (A7682E not supported in Bruce)
104+
- Gyroscope (BHI260AP not used in Bruce)
105+
- Battery fuel gauge (BQ27220 reading)
106+
- Charger status (BQ25896 reading)
107+
108+
## Required Changes for Full E-Paper Support
109+
110+
To properly support the E-Paper display, the following major changes are needed:
111+
112+
1. **Replace TFT_eSPI with GxEPD2**
113+
- Add `zinggjm/GxEPD2` library dependency
114+
- Create wrapper layer to adapt GxEPD2 API to Bruce's display API
115+
- Implement partial refresh strategies to improve performance
116+
117+
2. **Optimize UI for E-Paper**
118+
- Reduce refresh frequency
119+
- Simplify animations
120+
- Use partial refreshes where possible
121+
- Convert color schemes to high-contrast B&W
122+
123+
3. **Add TCA8418 Keyboard Driver**
124+
- Implement full TCA8418 driver or add library dependency
125+
- Map keyboard matrix to ASCII codes
126+
- Handle function keys and modifiers
127+
128+
4. **Add Battery Management**
129+
- Implement BQ27220 fuel gauge reading
130+
- Implement BQ25896 charger status
131+
- Proper battery percentage calculation
132+
133+
## Building
134+
135+
```bash
136+
pio run -e lilygo-t-deck-pro-epaper
137+
```
138+
139+
## Flashing
140+
141+
```bash
142+
pio run -e lilygo-t-deck-pro-epaper -t upload
143+
```
144+
145+
## Recommendations
146+
147+
**For Production Use:**
148+
- Consider using the regular T-Deck or T-Deck Plus with TFT display
149+
- Bruce is optimized for fast TFT displays, not E-Paper
150+
- E-Paper support would require significant UI redesign
151+
152+
**For Testing:**
153+
- This configuration can be used to test non-display features
154+
- Keyboard, LoRa, GPS, and other peripherals should work
155+
- Display will be slow but functional for basic menu navigation
156+
157+
## References
158+
159+
- [LilyGo T-Deck Pro GitHub](https://github.com/Xinyuan-LilyGO/T-Deck-Pro)
160+
- [LilyGo T-Deck Pro Wiki](https://wiki.lilygo.cc/get_started/en/Wearable/T-Deck-Pro/T-Deck-Pro.html)
161+
- [GxEPD2 Library](https://github.com/ZinggJM/GxEPD2)
162+
- [Bruce Firmware](https://github.com/pr3y/Bruce)
163+
164+
## Contributing
165+
166+
If you want to improve E-Paper support:
167+
1. Implement GxEPD2 wrapper layer
168+
2. Add TCA8418 keyboard library
169+
3. Optimize UI for E-Paper refresh rates
170+
4. Test and submit pull request
171+
172+
---
173+
174+
**Note**: This is an experimental configuration. Use at your own risk.

0 commit comments

Comments
 (0)