Skip to content

Commit 9863312

Browse files
lboueCopilot
andauthored
Add M5Stack CoreS3 (#1364)
* Update M5Stack Core2 V1.1 documentation Updated the date published and modified display configuration. Switch to mipi_spi platform * Add framework type for ESP32 configuration Arduino framework is required because of axp2101 componant * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Remove transform settings from M5Stack-Core2 config mirror_x is not required * Remove unnecessary settings from M5Stack config Removed auto_clear_enabled and update_interval settings. * Update bottom notes * Update display configuration with transform settings Added transform settings for display configuration. * Enable show_test_card * Typical conventions (width × height) * Add documentation for M5Stack CoreS3 device including GPIO pinout and example configuration * Add product image for M5Stack CoreS3 device * Update M5Stack CoreS3 configuration for ESP-IDF with flash size and cache settings * Add AXP2101 and AW9523B configurations for M5Stack CoreS3 device * Refactor SPI configuration for M5Stack CoreS3 device * Update M5Stack CoreS3 configuration for touchscreen and IO expander * Update M5Stack CoreS3 configuration: set logger level to DEBUG, adjust SPI and I2C settings, and add LCD backlight control * Reorganize M5Stack CoreS3 configuration: move touchscreen and light settings, and update display section * Revert M5Stack Core2 to current * Update src/docs/devices/M5Stack-CoreS3/index.md Co-authored-by: Copilot <[email protected]> * Replace M5Stack CoreS3 image with PNG format and remove outdated WEBP file * Improve M5Stack CoreS3 documentation: enhance touchscreen and IO expander descriptions for clarity * Add note about BMI270 IMU support status in M5Stack CoreS3 documentation * Update M5Stack CoreS3 documentation: clarify BMI270 IMU support status --------- Co-authored-by: Copilot <[email protected]>
1 parent c12e081 commit 9863312

File tree

2 files changed

+205
-0
lines changed

2 files changed

+205
-0
lines changed
364 KB
Loading
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
---
2+
title: M5Stack CoreS3
3+
date-published: 2025-12-05
4+
type: misc
5+
standard: global
6+
board: esp32
7+
project-url: https://docs.m5stack.com/en/core/CoreS3
8+
made-for-esphome: false
9+
difficulty: 2
10+
---
11+
12+
ESP32-S3 based Core series device with 2.0" 320x240 IPS display, capacitive touch, AXP2101 PMU, AW9523 I/O
13+
expander, internal BMI270 IMU, ES7210 microphone codec, speaker amp, microSD slot, and multiple Grove/M-Bus ports.
14+
15+
## Product Images
16+
17+
![M5Stack CoreS3](./M5Stack-CoreS3.png "M5Stack CoreS3")
18+
19+
## GPIO Pinout
20+
21+
| Pin | Function |
22+
| ------ | ----------------------------------------- |
23+
| GPIO3 | Display CS |
24+
| GPIO35 | Display MISO / D-C (3-wire) |
25+
| GPIO36 | Display/SPI SCLK |
26+
| GPIO37 | Display/SPI MOSI |
27+
| GPIO4 | microSD CS (shares SPI bus) |
28+
| GPIO21 | Touchscreen IRQ |
29+
| GPIO12 | Internal I2C SDA (PMU, touch, IMU, AW9523) |
30+
| GPIO11 | Internal I2C SCL |
31+
| GPIO2 | Grove Port A SDA |
32+
| GPIO1 | Grove Port A SCL |
33+
| GPIO9 | Port B |
34+
| GPIO8 | Port B |
35+
| GPIO18 | Port C |
36+
| GPIO17 | Port C |
37+
| GPIO0 | I2S MCLK (microphone codec) |
38+
| GPIO14 | I2S DATA IN (microphone codec) |
39+
| GPIO13 | I2S DATA OUT (speaker) |
40+
| GPIO33 | I2S LRCK (mic + speaker) |
41+
| GPIO34 | I2S BCLK (mic + speaker) |
42+
43+
Notes: LCD reset and backlight are driven by the AW9523 I/O expander, so no direct GPIO is exposed. Power rails and
44+
battery telemetry are handled by the AXP2101 PMU on the internal I2C bus.
45+
46+
## External Components
47+
48+
[ESPHome AXP2101 Component by stefanthoss](https://github.com/stefanthoss/esphome-axp2101)
49+
50+
This component exposes battery voltage/level/charging state and lets you manage the CoreS3 power rails controlled by
51+
the AXP2101 PMU.
52+
53+
## Example Configuration
54+
55+
Hardware-only starter configuration for the CoreS3 display, touch panel, and buses. Backlight and reset are managed by
56+
the AXP2101/AW9523, so the display uses `-1` pins for those signals.
57+
58+
```yaml
59+
substitutions:
60+
devicename: m5cores3
61+
upper_devicename: M5Stack CoreS3
62+
63+
esphome:
64+
name: ${devicename}
65+
friendly_name: ${upper_devicename}
66+
67+
esp32:
68+
board: esp32-s3-devkitc-1
69+
flash_size: 16MB
70+
framework:
71+
type: esp-idf
72+
## Note: Disable these configurations if you face the boot loop issue.
73+
sdkconfig_options:
74+
CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
75+
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
76+
CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB: "y"
77+
# Moves instructions and read only data from flash into PSRAM on boot.
78+
# Both enabled allows instructions to execute while a flash operation is in progress without needing to be placed in IRAM.
79+
# Considerably speeds up mWW at the cost of using more PSRAM.
80+
CONFIG_SPIRAM_RODATA: "y"
81+
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: "y"
82+
83+
psram:
84+
mode: quad
85+
speed: 80MHz
86+
87+
logger:
88+
level: DEBUG
89+
90+
wifi:
91+
ssid: !secret wifi_ssid
92+
password: !secret wifi_password
93+
94+
ap:
95+
ssid: ${upper_devicename} Fallback
96+
password: !secret wifi_password
97+
98+
captive_portal:
99+
100+
api:
101+
102+
ota:
103+
- platform: esphome
104+
105+
external_components:
106+
- source: github://m5stack/esphome-yaml/components
107+
components: [axp2101, aw88298, aw9523b ]
108+
109+
i2c:
110+
- id: bus_internal
111+
sda: GPIO12
112+
scl: GPIO11
113+
114+
spi:
115+
- id: spi_bus
116+
clk_pin: GPIO36
117+
mosi_pin: GPIO37
118+
119+
axp2101:
120+
id: axp2101_pmu
121+
i2c_id: bus_internal
122+
123+
# IO Expander
124+
aw9523b:
125+
- id: aw9523b_hub
126+
i2c_id: bus_internal
127+
128+
output:
129+
- platform: axp2101
130+
type: range
131+
channel: DLDO1
132+
id: lcd_backlight_output
133+
min_voltage: 2600
134+
max_voltage: 3300
135+
136+
- platform: axp2101
137+
channel: ALDO1
138+
voltage: 1800
139+
140+
- platform: axp2101
141+
channel: ALDO2
142+
voltage: 3300
143+
144+
- platform: axp2101
145+
channel: BLDO1
146+
voltage: 2800
147+
148+
- platform: axp2101
149+
channel: BLDO2
150+
voltage: 1500
151+
```
152+
153+
## Display
154+
155+
```yaml
156+
touchscreen:
157+
- platform: ft63x6
158+
id: touch
159+
reset_pin:
160+
aw9523b: aw9523b_hub
161+
number: 0
162+
calibration:
163+
x_min: 0
164+
x_max: 320
165+
y_min: 0
166+
y_max: 240
167+
168+
display:
169+
- platform: mipi_spi
170+
model: M5CORE
171+
dc_pin: GPIO35
172+
reset_pin:
173+
aw9523b: aw9523b_hub
174+
number: 9
175+
cs_pin: GPIO3
176+
data_rate: 40MHz
177+
invert_colors: true
178+
id: m5cores3_lcd
179+
show_test_card: true
180+
181+
light:
182+
- platform: monochromatic
183+
id: lcd_backlight
184+
name: "LCD Backlight"
185+
icon: "mdi:television"
186+
entity_category: config
187+
output: lcd_backlight_output
188+
restore_mode: RESTORE_DEFAULT_ON
189+
default_transition_length: 250ms
190+
```
191+
192+
## Notes
193+
194+
- **Power**: Use the AXP2101 external component to read battery status and enable rails like LCD/backlight if they are
195+
disabled by default.
196+
- **Audio**: The ES7210 microphone and speaker amp share the I2S bus on GPIO0/13/14/33/34 if you want to add
197+
`i2s_audio` components.
198+
- **Storage**: The microSD slot shares the LCD SPI bus with CS on GPIO4.
199+
- **Expansion**: Grove Port A exposes I2C on GPIO2/1; Ports B (GPIO9/8) and C (GPIO18/17) are free GPIOs on the M-Bus.
200+
- **Touchscreen**: The FT63X6 capacitive touch controller requires a reset pin driven by the AW9523B expander (pin 0).
201+
The calibration values ensure proper coordinate mapping for the 320x240 display.
202+
- **IO Expander (AW9523B)**: This component manages LCD reset (pin 9), touchscreen reset (pin 0),
203+
and other peripheral power switches. It must be properly configured for the display and touch to function.
204+
- **IMU (BMI270)**: The built-in BMI270 6-axis IMU is not yet supported in ESPHome.
205+
It is available on the internal I2C bus at address 0x68.

0 commit comments

Comments
 (0)