|
| 1 | +.. _m5stack_m5dial: |
| 2 | + |
| 3 | +M5Stack M5Dial |
| 4 | +############## |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +M5Dial is an ESP32-based development board from M5Stack. |
| 10 | +The device features an embedded ``m5stack_stamps3`` module that runs |
| 11 | +the ESP32-S3 microcontroller. |
| 12 | + |
| 13 | +.. figure:: img/m5stack_m5dial.webp |
| 14 | + :align: center |
| 15 | + :alt: M5Stack M5Dial |
| 16 | + |
| 17 | + M5Stack M5Dial |
| 18 | + |
| 19 | +Key components |
| 20 | +============== |
| 21 | + |
| 22 | +The Zephyr ``m5stack_m5dial`` shield configuration supports the following key components: |
| 23 | + |
| 24 | ++------------------------+-----------------------------------------------------------------------+------------+ |
| 25 | +| Key Component | Description | Status | |
| 26 | ++========================+=======================================================================+============+ |
| 27 | +| LCD IPS round display | 240x240 pixel display features GC9A01A display controller interfaced | supported | |
| 28 | +| (240x240 pixel) | via SPI | | |
| 29 | ++------------------------+-----------------------------------------------------------------------+------------+ |
| 30 | +| WS1850S NFC | Wisesun NFC reader IC interfaced via I2C. | todo | |
| 31 | ++------------------------+-----------------------------------------------------------------------+------------+ |
| 32 | +| RTC8563 RTC | Real-Time clock interfaced via I2C. | supported | |
| 33 | ++------------------------+-----------------------------------------------------------------------+------------+ |
| 34 | +| Rotary encoder | Round rotary button (``INPUT_KEY_LEFT`` and ``INPUT_KEY_RIGHT`` | supported | |
| 35 | +| | events). | | |
| 36 | ++------------------------+-----------------------------------------------------------------------+------------+ |
| 37 | +| Reset button | Directly interconnected to EN signal of StampS3 module. | supported | |
| 38 | ++------------------------+-----------------------------------------------------------------------+------------+ |
| 39 | +| User-button | Custom user button. | supported | |
| 40 | ++------------------------+-----------------------------------------------------------------------+------------+ |
| 41 | +| Builtin Beeper/Buzzer | PWM controller beeper, properly operating between 200Hz and 2kHz | supported | |
| 42 | ++------------------------+-----------------------------------------------------------------------+------------+ |
| 43 | + |
| 44 | +M5Stack M5Dial features 2 external grove ports (A and B) |
| 45 | + |
| 46 | +Grove header A |
| 47 | +--------------- |
| 48 | + |
| 49 | +Functionality is accessible via ``grove_headerA`` |
| 50 | + |
| 51 | ++-----+----------------------------+---------------------------+ |
| 52 | +| Pin | ``m5stack_stamps3_header`` | Function | |
| 53 | ++=====+============================+===========================+ |
| 54 | +| 1 | 16 | I2C-SCL (``groveA_i2c```) | |
| 55 | ++-----+----------------------------+---------------------------+ |
| 56 | +| 2 | 14 | I2C-SDL (``groveA_i2c``) | |
| 57 | ++-----+----------------------------+---------------------------+ |
| 58 | +| 3 | | 5V-Output | |
| 59 | ++-----+----------------------------+---------------------------+ |
| 60 | +| 4 | | GND | |
| 61 | ++-----+----------------------------+---------------------------+ |
| 62 | + |
| 63 | + |
| 64 | +Grove header B |
| 65 | +--------------- |
| 66 | + |
| 67 | +Functionality is accessible via ``grove_headerB`` |
| 68 | + |
| 69 | ++-----+----------------------------+-----------+ |
| 70 | +| Pin | ``m5stack_stamps3_header`` | Function | |
| 71 | ++=====+============================+===========+ |
| 72 | +| 1 | 0 | In | |
| 73 | ++-----+----------------------------+-----------+ |
| 74 | +| 2 | 1 | Out | |
| 75 | ++-----+----------------------------+-----------+ |
| 76 | +| 3 | | 5V-Output | |
| 77 | ++-----+----------------------------+-----------+ |
| 78 | +| 4 | | GND | |
| 79 | ++-----+----------------------------+-----------+ |
| 80 | + |
| 81 | + |
| 82 | +Battery-Support |
| 83 | +--------------- |
| 84 | + |
| 85 | +Although ``m5stack_m5dial`` does not natively come with a battery, it features |
| 86 | +support for connecting a battery to it. The battery connector is underneath the |
| 87 | +StampS3 module. |
| 88 | + |
| 89 | +To keep the module running on the battery only, without an external supply, an |
| 90 | +internal power-hold signal must be activated. This can be controlled via regulator |
| 91 | +``battery_hold``, which is activated by default. |
| 92 | + |
| 93 | +Pin Mapping |
| 94 | +=========== |
| 95 | + |
| 96 | +M5Dial is utilizing the :dtcompatible:`m5stack,stamps3-header` header. |
| 97 | +Following table shows the pin mapping, the interconnection to the |
| 98 | +M5Stack-StampS3 module and its according function. |
| 99 | + |
| 100 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 101 | +| StampS3 | stamps3-header | M5Dial | M5Dial | Description | |
| 102 | +| pin | | pin | signal | | |
| 103 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 104 | +| M1-1 | ``m5stack_stamps3_header:0`` | J2.1 | GI | Grove-B In | |
| 105 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 106 | +| M1-2 | ``m5stack_stamps3_header:1`` | J2-2 | GO | Grove-B Out | |
| 107 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 108 | +| M1-3 | ``m5stack_stamps3_clkout0:2`` | | Beep | Beeper | |
| 109 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 110 | +| M1-4 | ``m5stack_stamps3_header:3`` | | LCD_RS | LCD Cmd/Data | |
| 111 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 112 | +| M1-5 | ``m5stack_stamps3_spilcd`` | | LCD_MOSI | LCD SPI-MOSI | |
| 113 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 114 | +| M1-6 | ``m5stack_stamps3_spilcd`` | | LCD_SCK | LCD SPI-CLK | |
| 115 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 116 | +| M1-7 | ``m5stack_stamps3_spilcd`` | | LCD_CS | LCD SPI-CS | |
| 117 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 118 | +| M1-8 | ``m5stack_stamps3_header:7`` | | LCD_RESET | LCD Reset (active-low) | |
| 119 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 120 | +| M1-9 | ``m5stack_stamps3_clkout0:0`` | | LCD_BL | LCD Backlight | |
| 121 | +| | | | | (PWM controlled MOSFET) | |
| 122 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 123 | +| M1-10 | ``m5stack_stamps3_header:9`` | | RC522_INT | NFC Interrupt | |
| 124 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 125 | +| M1-11 | **GND** | Ground | |
| 126 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 127 | +| M1-12 | ``m5stack_stamps3_i2c1`` | | TP_SDA | Internal I2C-SDA | |
| 128 | +| | | | | (Touch, NFC and RTC) | |
| 129 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 130 | +| M1-13 | **VIN_5V** | 5V Input voltage | |
| 131 | +| | | (via USB-C connector of StampS3) | |
| 132 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 133 | +| M1-14 | ``m5stack_stamps3_i2c1`` | | TP_SCL | Internal I2C-SCL | |
| 134 | +| | | | | (Touch, NFC and RTC) | |
| 135 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 136 | +| M1-15 | ``m5stack_stamps3_i2c0`` | J3-2 | SDA | Grove-A I2C-SDA | |
| 137 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 138 | +| M1-16 | ``m5stack_stamps3_header:15`` | | TP_INT | Touch Interrupt | |
| 139 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 140 | +| M1-17 | ``m5stack_stamps3_i2c0`` | J3-1 | SCL | Grove-A I2C-SCL | |
| 141 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 142 | +| M1-18 | **GND** | Ground | |
| 143 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 144 | +| M1-19 | | | MTCK | | |
| 145 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 146 | +| M1-20 | | | Boot | | |
| 147 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 148 | +| M1-21 | ``m5stack_stamps3_header:20`` | | B | Rotary left key | |
| 149 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 150 | +| M1-22 | | | EN | Enable signal for 3V3 | |
| 151 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 152 | +| M1-23 | ``m5stack_stamps3_header:22`` | | A | Rotary right key | |
| 153 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 154 | +| M1-24 | | | RX | | |
| 155 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 156 | +| M1-25 | ``m5stack_stamps3_header:24`` | | WAKE | User-Button | |
| 157 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 158 | +| M1-26 | | | TX | | |
| 159 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 160 | +| M1-27 | ``m5stack_stamps3_header:26`` | | HOLD | Battery-hold signal | |
| 161 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 162 | +| M1-28 | **3_3V** | 3.3V main output | |
| 163 | +| | | (via StampS3 DCDC) | |
| 164 | ++----------+--------------------------------+---------+-----------+-----------------------------------+ |
| 165 | + |
| 166 | +Start Application Development |
| 167 | +***************************** |
| 168 | + |
| 169 | +Before powering up your M5Stack M5Dial, please make sure that the board is in good |
| 170 | +condition with no obvious signs of damage. |
| 171 | + |
| 172 | +Building & Flashing |
| 173 | +=================== |
| 174 | + |
| 175 | +M5Dial is based on ``m5stack_stamps3``. |
| 176 | +You may build and flash applications for M5Stack StampS3 as usual (see |
| 177 | +:ref:`build_an_application` and :ref:`application_run` for more details), and |
| 178 | +include this shield as an overlay. |
| 179 | + |
| 180 | +A good first example to test is :zephyr:code-sample:`lvgl`: |
| 181 | +.. zephyr-app-commands:: |
| 182 | + :zephyr-app: samples/subsys/display/lvgl |
| 183 | + :board: m5stack_stamps3 |
| 184 | + :shield: m5stack_m5dial |
| 185 | + :goals: build flash |
| 186 | + |
| 187 | +The baud rate of 921600bps is set by default. If experiencing issues when flashing, |
| 188 | +try using different values by using ``--esp-baud-rate <BAUD>`` option during |
| 189 | +``west flash`` (e.g. ``west flash --esp-baud-rate 115200``). |
| 190 | + |
| 191 | +.. note:: |
| 192 | + Because there currently is missing automatic PWM control or an external backlight |
| 193 | + driver, the display backlight be default is disabled. You may need to enable it |
| 194 | + in your application or by using the PWM shell. |
| 195 | + |
| 196 | +Debugging |
| 197 | +--------- |
| 198 | + |
| 199 | +M5Stack M5Dial debugging is not supported due to pinout limitations. |
| 200 | + |
| 201 | +Related Documents |
| 202 | +***************** |
| 203 | + |
| 204 | +- `M5Stack M5Dial schematic <https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/products/core/M5Dial/Sch_M5Dial.pdf>`_ |
| 205 | +- `M5Stack M5Dial documentation <https://docs.m5stack.com/en/core/M5Dial>`_ |
| 206 | +- `ESP32S3 Datasheet <https://www.espressif.com/sites/default/files/documentation/esp32-s3_datasheet_en.pdf>`_ |
0 commit comments