1.. _mec1501modular_assy6885: 2 3MEC1501 Modular card ASSY6885 4############################# 5 6Overview 7******** 8 9The MEC1501 Modular card ASSY6885 is a development board to evaluate the Microchip 10MEC152X series microcontrollers. This board can work standalone or be mated with 11any platform that complies with MECC specification. 12 13.. image:: ./mec1501modular_assy6885.png 14 :width: 600px 15 :align: center 16 :alt: MEC1501 Modular ASSY 6885 17 18Hardware 19******** 20 21- MEC1521HA0SZ ARM Cortex-M4 Processor 22- 256 KB RAM and 64 KB boot ROM 23- GPIO headers 24- UART1 using microUSB 25- PECI interface 3.0 26- 10 SMBUS instances 27- FAN, PMW and TACHO pins 28- VCI interface 29- Independent Hardware Driven PS/2 Ports 30 31At difference from MEC15xx evaluation board, modular MEC1521 exposes the pins 32in 2 different ways: 33 341) Standalone mode via headers 35 36 - GPIOs 37 - PWM5 38 - JTAG/SWD, ETM and MCHP Trace ports 39 - eSPI bus 40 - SMB0 41 422) Mated mode with another platform that has a high density MECC connector. 43 44 - FAN0, PWM0, SMB0, SMB1, SMB4 and SMB5 45 - eSPI bus 46 - Breathing/Blinking LEDs 47 48The board is powered through the +5V USB Micro A connector or from the MECC connector. 49 50 51For more information about the SOC please see the `MEC152x Reference Manual`_ 52 53Supported Features 54================== 55 56The mec1501modular_assy6885 board configuration supports the following hardware 57features: 58 59+-----------+------------+-------------------------------------+ 60| Interface | Controller | Driver/Component | 61+===========+============+=====================================+ 62| NVIC | on-chip | nested vector interrupt controller | 63+-----------+------------+-------------------------------------+ 64| SYSTICK | on-chip | systick | 65+-----------+------------+-------------------------------------+ 66| UART | on-chip | serial port | 67+-----------+------------+-------------------------------------+ 68| GPIO | on-chip | gpio | 69+-----------+------------+-------------------------------------+ 70| ESPI | on-chip | espi | 71+-----------+------------+-------------------------------------+ 72| I2C | on-chip | i2c | 73+-----------+------------+-------------------------------------+ 74| PINMUX | on-chip | pinmux | 75+-----------+------------+-------------------------------------+ 76| RTOS | on-chip | timer | 77+-----------+------------+-------------------------------------+ 78| TIMER | on-chip | counter | 79+-----------+------------+-------------------------------------+ 80| PWM | on-chip | pwm | 81+-----------+------------+-------------------------------------+ 82| ADC | on-chip | adc | 83+-----------+------------+-------------------------------------+ 84| WATCHDOG | on-chip | watchdog | 85+-----------+------------+-------------------------------------+ 86| PS2 | on-chip | ps2 | 87+-----------+------------+-------------------------------------+ 88 89Other hardware features are not currently supported by Zephyr (at the moment) 90 91The default configuration can be found in the 92:zephyr_file:`boards/arm/mec1501modular_assy6885/mec1501modular_assy6885_defconfig` 93Kconfig file. 94 95Connections and IOs 96=================== 97 98This evaluation board kit is comprised of the following HW blocks: 99 100- MEC1501 Modular Card ASSY 6885 Rev A0 `MEC1501 Modular EC Card - Assy_6885 Rev A0p1`_ 101 102System Clock 103============ 104 105The MEC1501 MCU is configured to use the 48Mhz internal oscillator with the 106on-chip PLL to generate a resulting EC clock rate of 12 MHz. See Processor clock 107control register in chapter 4 "4.0 POWER, CLOCKS, and RESETS" of the data sheet in 108the references at the end of this document. 109 110Serial Port 111=========== 112UART1 is configured for serial logs. 113 114Jumper settings 115*************** 116 117Please follow the jumper settings below to properly demo this 118board. Advanced users may deviate from this recommendation. 119 120Jumper setting for MEC1501 Modular Assy 6885 Rev A1p0 121===================================================== 122 123Power-related jumpers 124--------------------- 125 126If you wish to power from type A/B connector ``P10`` set the jumper ``JP35 1-2``. 127 128If you wish to power through MECC connector ``P1`` and mate to external platform, 129set the jumper to ``JP35 3-4``. 130 131.. note:: A single jumper is required in JP35. 132 133+------+---------+---------+------+------+------+----------+ 134| JP30 | JP31 | JP32 | JP33 | JP34 | JP40 | JP21 | 135| VTR3 | VTR_PLL | VTR_REG | VTR1 | VTR2 | 3.3V | VREF_ADC | 136+======+=========+=========+======+======+======+==========+ 137| 1-2 | 1-2 | 1-2 | 1-2 | 1-2 | 1-2 | 1-2 | 138+------+---------+---------+------+------+------+----------+ 139 140 141+------+------------+------+----------+ 142| JP6 | JP36 | JP27 | JP4 | 143| VBAT | VTR_ANALOG | PECI | VREF_VTT | 144+======+============+======+==========+ 145| 2-3 | 1-2 | 2-3 | open | 146+------+------------+------+----------+ 147 148These jumpers configure nRESETI and JTAG_STRAP respectively. 149 150+-----------+---------------+ 151| JP22 | JP29 | 152| (nRESETI) | (JTAG_STRAP) | 153+===========+===============+ 154| 11-12 | 1-2 | 155+-----------+---------------+ 156 157Boot-ROM Straps 158--------------- 159 160These jumpers configure MEC1501 Boot-ROM straps. 161 162+-------------+------------+--------------+-------------+ 163| JP37 | J6 | JP41 | JP23 | 164| (CMP_STRAP) | (CR_STRAP) | (VTR2_STRAP) | (BSS_STRAP) | 165+=============+============+==============+=============+ 166| 1-2 | 1-2 | 1-2 | 3-4 | 167+-------------+------------+--------------+-------------+ 168 169 170``JP23 3-4`` pulls SHD SPI CS0# up to VTR2. MEC1501 Boot-ROM samples 171SHD SPI CS0# and if high, it loads code from SHD SPI. 172This is the recommended setup. 173 174+-------------+------------+----------------------------+ 175| CR_STRAP | BSS_STRAP | SOURCE | 176+-------------+------------+----------------------------+ 177| 0 | X | Use 3.3V Private SPI | 178+-------------+------------+----------------------------+ 179| 1 | 0 | Use eSPI Flash channel | 180+-------------+------------+----------------------------+ 181| | 1 | Use 3.3V Shared channel(R)| 182+-------------+------------+----------------------------+ 183 184Power management 185---------------- 186``JP20 2-3`` is required so all GPIOs powered by VTR3 rail worked at 1.8V. 187 188.. note:: External 1.8V needs to be connected to JP13.1 189 190+-------------------+-----------------+ 191| JP20 | JP13 | 192| (VTR3 selection) | (1.8V source) | 193+===================+=================+ 194| 2-3 | 1.8V to pin 1 | 195+-------------------+-----------------+ 196 197 198Jumper location map 199------------------- 200 201.. code-block:: none 202 203 +--------------------------------------------------------------------------------------+ 204 | |------------| +----------+ J10 || | 205 | [BT1] + +------------+ J50 ++ ++ || | 206 | | JP38 JP43 ++ || || | 207 | + + + +-+ JP4 + + JP26 || || | 208 | JP6 + + + + + + + + || || | 209 | JP31 ++ JP32 JP36 +-+ JP27 + + + + J6 || | 210 | JP18 JP37 JP41 JP42 ++ | 211 | ++ + + +--------+ J48 | 212 | || JP21 + + +--------+ JP22 +----------+ | 213 | J2 || + JP34 JP30 J11 ++ | 214 | ++ + J44 || | 215 | ++ +----------------+ || | 216 | +---------------+ || + JP24 |----------------| ++ | 217 | |---------------| ++ + +----------+ +----------------+ J47 | 218 | JP20 +---------------+ JP23 JP40 +----------+ ++ | 219 | + ++ JP29 || | 220 | + + +----------+ + || | 221 | J52+---------------+ + + +----------+ J5 +-------------+ ++ | 222 | J45+---------------+ JP33 TP57 JP25 +-------------+ J4 J49 | 223 | | 224 | ++ TP4 +----------+ ++ | 225 | ++ + + + + + + TP61 +----------+ ++ | 226 | JP28 + + + + + TP65 + TP60 J51 JP35 | 227 | TP58 JP16 JP11 JP13 JP15 JP10 | 228 | TP5 | 229 | TP6 TP1 | 230 +--------------------------------------------------------------------------------------+ 231 232 233Programming and Debugging 234************************* 235 236Setup 237===== 238 239#. Clone the `MEC152x SPI Image Gen`_ repository or download the files within 240 that directory. For the pre-production MEC150x use the `MEC150x SPI Image Gen`_ 241 repository. 242 243#. Make the image generation available for Zephyr, by making the tool 244 searchable by path, or by setting an environment variable 245 ``EVERGLADES_SPI_GEN``, for example: 246 247 .. code-block:: console 248 249 export EVERGLADES_SPI_GEN=<path to tool>/everglades_spi_gen_RomE 250 251 Note that the tools for Linux and Windows have different file names. 252 For the pre-production MEC1501 SOC use everglades_spi_gen_lin64. 253 254#. If needed, a custom SPI image configuration file can be specified 255 to override the default one. 256 257 .. code-block:: console 258 259 export EVERGLADES_SPI_CFG=custom_spi_cfg.txt 260 261 262Building 263========== 264#. Build :ref:`hello_world` application as you would normally do. 265 266#. Once you have ``zephyr.bin``, use the `MEC152x SPI Image Gen`_ microchip tool 267 to create the final binary. You need the output from this tool to flash 268 in the SHD SPI memory. 269 270Flashing 271======== 272 273#. Connect Dediprog into header ``J2``. 274 275#. Flash the SPI NOR ``U3`` at offset 0x0 using Dediprog SF100 276 or a similar tool for flashing SPI chips. 277 278#. Run your favorite terminal program to listen for output. Under Linux the 279 terminal should be :code:`/dev/ttyACM0`. For example: 280 281 .. code-block:: console 282 283 $ minicom -D /dev/ttyACM0 -o 284 285 The -o option tells minicom not to send the modem initialization 286 string. Connection should be configured as follows: 287 288 - Speed: 115200 289 - Data: 8 bits 290 - Parity: None 291 - Stop bits: 1 292 293#. Connect the MEC1501MODULAR_ASSY6885 board to your host computer using the 294 UART1 port and apply power. 295 296 You should see ``"Hello World! mec1501modular_assy6885"`` in your terminal. 297 298Debugging 299========= 300This board comes with a Cortex ETM port which facilitates tracing and debugging 301using a single physical connection. In addition, it comes with sockets for 302JTAG only sessions. 303 304HW Issues 305========= 306In case you don't see your application running, please make sure ``LED1`` is lit. 307If is off, then check the power related jumpers again. 308 309References 310********** 311.. target-notes:: 312 313.. _MEC152x Preliminary Data Sheet: 314 https://github.com/MicrochipTech/CPGZephyrDocs/blob/master/MEC152x/MEC152x_Datasheet.pdf 315.. _MEC152x Reference Manual: 316 https://github.com/MicrochipTech/CPGZephyrDocs/blob/master/MEC152x/MEC152x_Datasheet.pdf 317.. _MEC1501 Modular EC Card - Assy_6885 Rev A0p1: 318 https://github.com/MicrochipTech/CPGZephyrDocs/blob/master/MEC1501/MEC1501%20Modular%20EC%20Card%20-%20Assy_6885%20Rev%20A0p1%20-%20SCH.pdf 319.. _MEC152x SPI Image Gen: 320 https://github.com/MicrochipTech/CPGZephyrDocs/tree/master/MEC152x/SPI_image_gen 321.. _MEC150x SPI Image Gen: 322 https://github.com/MicrochipTech/CPGZephyrDocs/tree/master/MEC1501/SPI_image_gen 323