Skip to content

Commit 38ed830

Browse files
Martin Kiepferfabiobaltieri
authored andcommitted
boards: m5stack_atoms3_lite: add support for M5Stack AtomS3 Lite
Add support for M5Stack AtomS3 Lite development board. The AtomS3 Lite is a smaller version of the AtomS3 that features only a StatusLED and no LCD display. Signed-off-by: Martin Kiepfer <[email protected]>
1 parent a21076b commit 38ed830

12 files changed

+465
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# M5Stack AtomS3 Lite board configuration
2+
# Copyright (c) 2023 Martin Kiepfer <[email protected]>
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# M5Stack AtomS3 Lite
6+
config BOARD_M5STACK_ATOMS3_LITE
7+
bool "M5Stack AtomS3 Lite Development Board"
8+
depends on SOC_SERIES_ESP32S3
9+
10+
choice SOC_PART_NUMBER
11+
default SOC_ESP32S3_FN8
12+
endchoice
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# M5Stack AtomS3 Lite board configuration
2+
# Copyright (c) 2023 Martin Kiepfer <[email protected]>
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
if BOARD_M5STACK_ATOMS3_LITE
6+
7+
config BOARD
8+
default "m5stack_atoms3_lite"
9+
depends on BOARD_M5STACK_ATOMS3_LITE
10+
11+
config ENTROPY_GENERATOR
12+
default y
13+
14+
config HEAP_MEM_POOL_ADD_SIZE_BOARD
15+
int
16+
default 98304 if WIFI
17+
default 65536 if BT
18+
default 4096
19+
20+
config KERNEL_MEM_POOL
21+
default y
22+
23+
choice BT_HCI_BUS_TYPE
24+
default BT_ESP32 if BT
25+
endchoice
26+
endif # BOARD_M5STACK_ATOMS3_LITE
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
choice BOOTLOADER
5+
default BOOTLOADER_MCUBOOT
6+
endchoice
7+
8+
choice BOOT_SIGNATURE_TYPE
9+
default BOOT_SIGNATURE_TYPE_NONE
10+
endchoice
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*")
4+
set(OPENOCD OPENOCD-NOTFOUND)
5+
endif()
6+
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH)
7+
8+
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake)
9+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
Binary file not shown.
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
.. _m5stack_atoms3_lite:
2+
3+
M5Stack AtomS3 Lite
4+
###################
5+
6+
Overview
7+
********
8+
9+
M5Stack AtomS3 Lite is an ESP32-based development board from M5Stack.
10+
11+
It features the following integrated components:
12+
13+
- ESP32-S3FN8 chip (240MHz dual core, Wi-Fi/BLE 5.0)
14+
- 512KB of SRAM
15+
- 384KB of ROM
16+
- 8MB of Flash
17+
- RGB Status-LED
18+
19+
20+
.. figure:: img/m5stack_atoms3_lite.webp
21+
:align: center
22+
:alt: M5Stack AtomS3 Lite
23+
24+
M5Stack AtomS3 Lite
25+
26+
27+
Supported Features
28+
==================
29+
30+
The Zephyr m5stack_atoms3_lite board configuration supports the following hardware features:
31+
32+
+-----------+------------+-------------------------------------+
33+
| Interface | Controller | Driver/Component |
34+
+===========+============+=====================================+
35+
| NVIC | on-chip | nested vector interrupt controller |
36+
+-----------+------------+-------------------------------------+
37+
| UART | on-chip | serial port-polling; |
38+
| | | serial port-interrupt |
39+
+-----------+------------+-------------------------------------+
40+
| PINMUX | on-chip | pinmux |
41+
+-----------+------------+-------------------------------------+
42+
| GPIO | on-chip | gpio |
43+
+-----------+------------+-------------------------------------+
44+
| I2C | on-chip | i2c |
45+
+-----------+------------+-------------------------------------+
46+
| SPI | on-chip | spi |
47+
+-----------+------------+-------------------------------------+
48+
| CLOCK | on-chip | reset and clock control |
49+
+-----------+------------+-------------------------------------+
50+
| COUNTER | on-chip | rtc |
51+
+-----------+------------+-------------------------------------+
52+
| WATCHDOG | on-chip | independent watchdog |
53+
+-----------+------------+-------------------------------------+
54+
| PWM | on-chip | pwm |
55+
+-----------+------------+-------------------------------------+
56+
| ADC | on-chip | adc |
57+
+-----------+------------+-------------------------------------+
58+
| DAC | on-chip | dac |
59+
+-----------+------------+-------------------------------------+
60+
| die-temp | on-chip | die temperature sensor |
61+
+-----------+------------+-------------------------------------+
62+
63+
64+
Start Application Development
65+
*****************************
66+
67+
Before powering up your M5Stack AtomS3 Lite, please make sure that the board is in good
68+
condition with no obvious signs of damage.
69+
70+
System requirements
71+
===================
72+
73+
Prerequisites
74+
-------------
75+
76+
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command
77+
below to retrieve those files.
78+
79+
.. code-block:: shell
80+
81+
west blobs fetch hal_espressif
82+
83+
.. note::
84+
85+
It is recommended running the command above after :file:`west update`.
86+
87+
Building & Flashing
88+
-------------------
89+
90+
Build and flash applications as usual (see :ref:`build_an_application` and
91+
:ref:`application_run` for more details).
92+
93+
.. zephyr-app-commands::
94+
:zephyr-app: samples/hello_world
95+
:board: m5stack_atoms3_lite
96+
:goals: build
97+
98+
The usual ``flash`` target will work with the ``m5stack_atoms3_lite`` board
99+
configuration. Here is an example for the :ref:`hello_world`
100+
application.
101+
102+
.. zephyr-app-commands::
103+
:zephyr-app: samples/hello_world
104+
:board: m5stack_atoms3_lite
105+
:goals: flash
106+
107+
The baud rate of 921600bps is set by default. If experiencing issues when flashing,
108+
try using different values by using ``--esp-baud-rate <BAUD>`` option during
109+
``west flash`` (e.g. ``west flash --esp-baud-rate 115200``).
110+
111+
You can also open the serial monitor using the following command:
112+
113+
.. code-block:: shell
114+
115+
west espressif monitor
116+
117+
After the board has automatically reset and booted, you should see the following
118+
message in the monitor:
119+
120+
.. code-block:: console
121+
122+
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
123+
Hello World! m5stack_atoms3_lite
124+
125+
Debugging
126+
---------
127+
128+
M5Stack AtomS3 Lite debugging is not supported due to pinout limitations.
129+
130+
Related Documents
131+
*****************
132+
133+
- `M5Stack AtomS3 Lite schematic <https://static-cdn.m5stack.com/resource/docs/products/core/AtomS3%20Lite/img-4061fdd4-6954-4709-a7e7-b0f50e5ba52e.webp>`_
134+
- `ESP32S3 Datasheet <https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf>`_
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2023 Benjamin Cabé <[email protected]>
3+
* Copyright (c) 2023 Martin Kiepfer <[email protected]>
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
grove_header: grove_header {
9+
compatible = "grove-header";
10+
#gpio-cells = <2>;
11+
gpio-map-mask = <0xffffffff 0xffffffc0>;
12+
gpio-map-pass-thru = <0 0x3f>;
13+
gpio-map = <0 0 &gpio0 1 0>,
14+
<1 0 &gpio0 2 0>;
15+
};
16+
};
17+
18+
grove_i2c1: &i2c1 {};
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/*
2+
* Copyright (c) 2023 Benjamin Cabé <[email protected]>
3+
* Copyright (c) 2023 Martin Kiepfer <[email protected]>
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
8+
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
9+
#include <zephyr/dt-bindings/pinctrl/esp32s3-gpio-sigmap.h>
10+
11+
&pinctrl {
12+
uart0_default: uart0_default {
13+
group1 {
14+
pinmux = <UART0_TX_GPIO43>;
15+
output-high;
16+
};
17+
group2 {
18+
pinmux = <UART0_RX_GPIO44>;
19+
bias-pull-up;
20+
};
21+
};
22+
23+
i2c0_default: i2c0_default {
24+
group1 {
25+
pinmux = <I2C0_SDA_GPIO38>,
26+
<I2C0_SCL_GPIO39>;
27+
bias-pull-up;
28+
drive-open-drain;
29+
output-high;
30+
};
31+
};
32+
33+
i2c1_default: i2c1_default {
34+
group1 {
35+
pinmux = <I2C1_SDA_GPIO2>,
36+
<I2C1_SCL_GPIO1>;
37+
bias-pull-up;
38+
drive-open-drain;
39+
output-high;
40+
};
41+
};
42+
43+
spim3_ws2812_led: spim3_ws2812_led {
44+
group1 {
45+
pinmux = <SPIM3_MOSI_GPIO35>;
46+
output-low;
47+
};
48+
};
49+
};

0 commit comments

Comments
 (0)