1.. zephyr:board:: frdm_mcxa156
2
3Overview
4********
5
6FRDM-MCXA156 are compact and scalable development boards for rapid prototyping of
7MCX A144/5/6 A154/5/6 MCUs. They offer industry standard headers for easy access
8to the MCU's I/Os, integrated open-standard serial interfaces, external flash
9memory and an on-board MCU-Link debugger. Additional tools like our Expansion
10Board Hub for add-on boards and the Application Code Hub for software examples
11are available through the MCUXpresso Developer Experience.
12
13Hardware
14********
15
16- MCX-A156 Arm Cortex-M33 microcontroller running at 96 MHz
17- 1MB dual-bank on chip Flash
18- 128 KB RAM
19- USB full-speed with on-chip FS PHY. USB Type-C connectors
20- 1x FlexCAN with FD, 1x I3Cs
21- On-board MCU-Link debugger with CMSIS-DAP
22- Arduino Header, FlexIO/LCD Header, SmartDMA/Camera Header, mikroBUS
23
24For more information about the MCX-A156 SoC and FRDM-MCXA156 board, see:
25
26- `MCX-A156 SoC Website`_
27- `MCX-A156 Datasheet`_
28- `MCX-A156 Reference Manual`_
29- `FRDM-MCXA156 Website`_
30- `FRDM-MCXA156 User Guide`_
31- `FRDM-MCXA156 Board User Manual`_
32- `FRDM-MCXA156 Schematics`_
33
34Supported Features
35==================
36
37The FRDM-MCXA156 board configuration supports the following hardware features:
38
39+-----------+------------+-------------------------------------+
40| Interface | Controller | Driver/Component                    |
41+===========+============+=====================================+
42| NVIC      | on-chip    | nested vector interrupt controller  |
43+-----------+------------+-------------------------------------+
44| SYSTICK   | on-chip    | systick                             |
45+-----------+------------+-------------------------------------+
46| PINMUX    | on-chip    | pinmux                              |
47+-----------+------------+-------------------------------------+
48| GPIO      | on-chip    | gpio                                |
49+-----------+------------+-------------------------------------+
50| UART      | on-chip    | serial port-polling;                |
51|           |            | serial port-interrupt               |
52+-----------+------------+-------------------------------------+
53| CLOCK     | on-chip    | clock_control                       |
54+-----------+------------+-------------------------------------+
55| FLASH     | on-chip    | soc flash                           |
56+-----------+------------+-------------------------------------+
57| ADC       | on-chip    | adc                                 |
58+-----------+------------+-------------------------------------+
59| CTIMER    | on-chip    | counter                             |
60+-----------+------------+-------------------------------------+
61| DAC       | on-chip    | dac                                 |
62+-----------+------------+-------------------------------------+
63| I2C       | on-chip    | i2c                                 |
64+-----------+------------+-------------------------------------+
65| LPCMP     | on-chip    | sensor(comparator)                  |
66+-----------+------------+-------------------------------------+
67| LPTMR     | on-chip    | counter                             |
68+-----------+------------+-------------------------------------+
69| PWM       | on-chip    | pwm                                 |
70+-----------+------------+-------------------------------------+
71| USB       | on-chip    | USB device                          |
72+-----------+------------+-------------------------------------+
73
74Targets available
75==================
76
77The default configuration file
78:zephyr_file:`boards/nxp/frdm_mcxa156/frdm_mcxa156_defconfig`
79
80Other hardware features are not currently supported by the port.
81
82Connections and IOs
83===================
84
85The MCX-A156 SoC has 5 gpio controllers and has pinmux registers which
86can be used to configure the functionality of a pin.
87
88+------------+-----------------+----------------------------+
89| Name       | Function        | Usage                      |
90+============+=================+============================+
91| PIO0_2     | UART            | UART RX                    |
92+------------+-----------------+----------------------------+
93| PIO0_3     | UART            | UART TX                    |
94+------------+-----------------+----------------------------+
95
96System Clock
97============
98
99The MCX-A156 SoC is configured to use FRO running at 96MHz as a source for
100the system clock.
101
102Serial Port
103===========
104
105The FRDM-MCXA156 SoC has 5 LPUART  interfaces for serial communication.
106LPUART 0 is configured as UART for the console.
107
108Programming and Debugging
109*************************
110
111Build and flash applications as usual (see :ref:`build_an_application` and
112:ref:`application_run` for more details).
113
114Configuring a Debug Probe
115=========================
116
117A debug probe is used for both flashing and debugging the board. This board is
118configured by default to use the MCU-Link CMSIS-DAP Onboard Debug Probe.
119
120Using LinkServer
121----------------
122
123Linkserver is the default runner for this board, and supports the factory
124default MCU-Link firmware. Follow the instructions in
125:ref:`mcu-link-cmsis-onboard-debug-probe` to reprogram the default MCU-Link
126firmware. This only needs to be done if the default onboard debug circuit
127firmware was changed. To put the board in ``DFU mode`` to program the firmware,
128short jumper JP5.
129
130Using J-Link
131------------
132
133There are two options. The onboard debug circuit can be updated with Segger
134J-Link firmware by following the instructions in
135:ref:`mcu-link-jlink-onboard-debug-probe`.
136To be able to program the firmware, you need to put the board in ``DFU mode``
137by shortening the jumper JP5.
138The second option is to attach a :ref:`jlink-external-debug-probe` to the
13910-pin SWD connector (J24) of the board. Additionally, the jumper JP7 must
140be shortened.
141For both options use the ``-r jlink`` option with west to use the jlink runner.
142
143.. code-block:: console
144
145   west flash -r jlink
146
147Configuring a Console
148=====================
149
150Connect a USB cable from your PC to J21, and use the serial terminal of your choice
151(minicom, putty, etc.) with the following settings:
152
153- Speed: 115200
154- Data: 8 bits
155- Parity: None
156- Stop bits: 1
157
158Flashing
159========
160
161Here is an example for the :zephyr:code-sample:`hello_world` application.
162
163.. zephyr-app-commands::
164   :zephyr-app: samples/hello_world
165   :board: frdm_mcxa156
166   :goals: flash
167
168Open a serial terminal, reset the board (press the RESET button), and you should
169see the following message in the terminal:
170
171.. code-block:: console
172
173   *** Booting Zephyr OS build v3.6.0-4478-ge6c3a42f5f52 ***
174   Hello World! frdm_mcxa156/mcxa156
175
176Debugging
177=========
178
179Here is an example for the :zephyr:code-sample:`hello_world` application.
180
181.. zephyr-app-commands::
182   :zephyr-app: samples/hello_world
183   :board: frdm_mcxa156/mcxa156
184   :goals: debug
185
186Open a serial terminal, step through the application in your debugger, and you
187should see the following message in the terminal:
188
189.. code-block:: console
190
191   *** Booting Zephyr OS build v3.6.0-4478-ge6c3a42f5f52 ***
192   Hello World! frdm_mcxa156/mcxa156
193
194Troubleshooting
195===============
196
197.. include:: ../../common/segger-ecc-systemview.rst
198   :start-after: segger-ecc-systemview
199
200.. _MCX-A156 SoC Website:
201   https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/mcx-arm-cortex-m/mcx-a-series-microcontrollers/mcx-a13x-14x-15x-mcus-with-arm-cortex-m33-scalable-device-options-low-power-and-intelligent-peripherals:MCX-A13X-A14X-A15X
202
203.. _MCX-A156 Datasheet:
204   https://www.nxp.com/docs/en/data-sheet/MCXAP100M96FS6.pdf
205
206.. _MCX-A156 Reference Manual:
207   https://www.nxp.com/webapp/Download?colCode=MCXAP100M96FS6RM
208
209.. _FRDM-MCXA156 Website:
210   https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/frdm-development-board-for-mcx-a144-5-6-a154-5-6-mcus:FRDM-MCXA156
211
212.. _FRDM-MCXA156 User Guide:
213   https://www.nxp.com/document/guide/getting-started-with-frdm-mcxa156:GS-FRDM-MCXA156
214
215.. _FRDM-MCXA156 Board User Manual:
216   https://www.nxp.com/docs/en/user-manual/UM12121.pdf
217
218.. _FRDM-MCXA156 Schematics:
219   https://www.nxp.com/webapp/Download?colCode=SPF-90841
220