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