|
| 1 | +.. zephyr:board:: frdm_mcxe31b |
| 2 | +
|
| 3 | +Overview |
| 4 | +******** |
| 5 | +The FRDM-MCXE31B board is a design and evaluation platform based on the NXP MCXE31B |
| 6 | +microcontroller (MCU). NXP MCXE31B MCU based on an Arm Cortex-M7 core, running at |
| 7 | +speeds of up to 160 MHz with a 2.97 to 5.5V supply. |
| 8 | + |
| 9 | +Hardware |
| 10 | +******** |
| 11 | + |
| 12 | +- MCXE31B Arm Cortex-M7 microcontroller running up to 160 MHz |
| 13 | +- 4MB dual-bank on chip Flash |
| 14 | +- 320KB SRAM + 192KB TCM |
| 15 | +- 2x I2C |
| 16 | +- 6x SPI |
| 17 | +- 16x UART |
| 18 | +- On-board MCU-Link debugger with CMSIS-DAP |
| 19 | +- Arduino Header, mikroBUS |
| 20 | + |
| 21 | +For more information about the MCXE31B SoC and FRDM-MCXE31B board, see: |
| 22 | + |
| 23 | +- `MCXE31X Datasheet`_ |
| 24 | +- `MCXE31X Reference Manual`_ |
| 25 | +- `FRDM-MCXE31B Board User Manual`_ |
| 26 | + |
| 27 | +Supported Features |
| 28 | +================== |
| 29 | + |
| 30 | +.. zephyr:board-supported-hw:: |
| 31 | +
|
| 32 | +Connections and IOs |
| 33 | +=================== |
| 34 | + |
| 35 | +Each GPIO port is divided into two banks: low bank, from pin 0 to 15, and high |
| 36 | +bank, from pin 16 to 31. For example, ``PTA2`` is the pin 2 of ``gpioa_l`` (low |
| 37 | +bank), and ``PTA20`` is the pin 4 of ``gpioa_h`` (high bank). |
| 38 | + |
| 39 | +The GPIO controller provides the option to route external input pad interrupts |
| 40 | +to either the SIUL2 EIRQ or WKPU interrupt controllers, as supported by the SoC. |
| 41 | +By default, GPIO interrupts are routed to SIUL2 EIRQ interrupt controller, |
| 42 | +unless they are explicity configured to be directed to the WKPU interrupt |
| 43 | +controller, as outlined in :zephyr_file:`dts/bindings/gpio/nxp,siul2-gpio.yaml`. |
| 44 | + |
| 45 | +To find information about which GPIOs are compatible with each interrupt |
| 46 | +controller, refer to the device reference manual. |
| 47 | + |
| 48 | ++-------+-------------+---------------------------+ |
| 49 | +| Name | Function | Usage | |
| 50 | ++=======+=============+===========================+ |
| 51 | +| PTC16 | GPIO | Red LED | |
| 52 | ++-------+-------------+---------------------------+ |
| 53 | +| PTB22 | GPIO | Green LED | |
| 54 | ++-------+-------------+---------------------------+ |
| 55 | +| PTC14 | GPIO | Blue LED | |
| 56 | ++-------+-------------+---------------------------+ |
| 57 | +| PTE3 | LPUART5_RX | UART Console | |
| 58 | ++-------+-------------+---------------------------+ |
| 59 | +| PTE14 | LPUART5_TX | UART Console | |
| 60 | ++-------+-------------+---------------------------+ |
| 61 | + |
| 62 | +System Clock |
| 63 | +============ |
| 64 | + |
| 65 | +The MCXE31B SoC is configured to use PLL running at 160MHz as a source for |
| 66 | +the system clock. |
| 67 | + |
| 68 | +Serial Port |
| 69 | +=========== |
| 70 | + |
| 71 | +The MCXE31B LPUART5 is used for the console. |
| 72 | + |
| 73 | +Programming and Debugging |
| 74 | +************************* |
| 75 | + |
| 76 | +.. zephyr:board-supported-runners:: |
| 77 | +
|
| 78 | +Build and flash applications as usual (see :ref:`build_an_application` and |
| 79 | +:ref:`application_run` for more details). |
| 80 | + |
| 81 | +Configuring a Debug Probe |
| 82 | +========================= |
| 83 | + |
| 84 | +A debug probe is used for both flashing and debugging the board. This board is |
| 85 | +configured by default to use the MCU-Link CMSIS-DAP Onboard Debug Probe. |
| 86 | + |
| 87 | +Using LinkServer |
| 88 | +---------------- |
| 89 | + |
| 90 | +Linkserver is the default runner for this board, and supports the factory |
| 91 | +default MCU-Link firmware. Follow the instructions in |
| 92 | +:ref:`mcu-link-cmsis-onboard-debug-probe` to reprogram the default MCU-Link |
| 93 | +firmware. This only needs to be done if the default onboard debug circuit |
| 94 | +firmware was changed. To put the board in ``ISP mode`` to program the firmware, |
| 95 | +short jumper JP3. |
| 96 | + |
| 97 | +Using J-Link |
| 98 | +------------ |
| 99 | + |
| 100 | +There are two options. The onboard debug circuit can be updated with Segger |
| 101 | +J-Link firmware by following the instructions in |
| 102 | +:ref:`mcu-link-jlink-onboard-debug-probe`. |
| 103 | +To be able to program the firmware, you need to put the board in ``ISP mode`` |
| 104 | +by shorting the jumper JP3. |
| 105 | +The second option is to attach a :ref:`jlink-external-debug-probe` to the |
| 106 | +10-pin SWD connector (J14) of the board. |
| 107 | +For both options use the ``-r jlink`` option with west to use the jlink runner. |
| 108 | + |
| 109 | +.. code-block:: console |
| 110 | +
|
| 111 | + west flash -r jlink |
| 112 | +
|
| 113 | +Configuring a Console |
| 114 | +===================== |
| 115 | + |
| 116 | +Connect a USB cable from your PC to J13, and use the serial terminal of your choice |
| 117 | +(minicom, putty, etc.) with the following settings: |
| 118 | + |
| 119 | +- Speed: 115200 |
| 120 | +- Data: 8 bits |
| 121 | +- Parity: None |
| 122 | +- Stop bits: 1 |
| 123 | + |
| 124 | +Flashing |
| 125 | +======== |
| 126 | + |
| 127 | +Here is an example for the :zephyr:code-sample:`hello_world` application. |
| 128 | + |
| 129 | +.. zephyr-app-commands:: |
| 130 | + :zephyr-app: samples/hello_world |
| 131 | + :board: frdm_mcxe31b |
| 132 | + :goals: flash |
| 133 | + |
| 134 | +Open a serial terminal, reset the board (press the RESET button), and you should |
| 135 | +see the following message in the terminal: |
| 136 | + |
| 137 | +.. code-block:: console |
| 138 | +
|
| 139 | + *** Booting Zephyr OS build v4.2.0-2092-g17e93a718422 *** |
| 140 | + Hello World! frdm_mcxe31b/mcxe31b |
| 141 | +
|
| 142 | +Debugging |
| 143 | +========= |
| 144 | + |
| 145 | +Here is an example for the :zephyr:code-sample:`hello_world` application. |
| 146 | + |
| 147 | +.. zephyr-app-commands:: |
| 148 | + :zephyr-app: samples/hello_world |
| 149 | + :board: frdm_mcxe31b |
| 150 | + :goals: debug |
| 151 | + |
| 152 | +Open a serial terminal, step through the application in your debugger, and you |
| 153 | +should see the following message in the terminal: |
| 154 | + |
| 155 | +.. code-block:: console |
| 156 | +
|
| 157 | + *** Booting Zephyr OS build v4.2.0-2092-g17e93a718422 *** |
| 158 | + Hello World! frdm_mcxe31b/mcxe31b |
| 159 | +
|
| 160 | +Troubleshooting |
| 161 | +=============== |
| 162 | + |
| 163 | +.. include:: ../../common/segger-ecc-systemview.rst.inc |
| 164 | + |
| 165 | +.. include:: ../../common/board-footer.rst.inc |
| 166 | + |
| 167 | +.. _MCXE31X Datasheet: |
| 168 | + https://www.nxp.com/docs/en/data-sheet/MCXEP172M160FB0.pdf |
| 169 | + |
| 170 | +.. _MCXE31X Reference Manual: |
| 171 | + https://www.nxp.com/webapp/Download?colCode=MCXE31XRM&location=null |
| 172 | + |
| 173 | +.. _FRDM-MCXE31B Board User Manual: |
| 174 | + https://www.nxp.com/webapp/Download?colCode=UM12330&location=null&isHTMLorPDF=HTML |
0 commit comments