|
| 1 | +.. _frdm_mcxc242: |
| 2 | + |
| 3 | +NXP FRDM-MCXC242 |
| 4 | +################ |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +FRDM-MCXC242 is a compact and scalable development board for rapid |
| 10 | +prototyping of MCX C242 MCU. It offers industry standard headers |
| 11 | +for easy access to the MCU’s I/Os, integrated open-standard serial |
| 12 | +interfaces and on-board MCU-Link debugger. |
| 13 | +The MCXC is a general purpose ultra-low-power MCU family, |
| 14 | +providing additional memory, communications and analog peripheral. |
| 15 | + |
| 16 | + |
| 17 | +.. image:: frdm_mcxc242.webp |
| 18 | + :align: center |
| 19 | + :alt: FRDM-MCXC242 |
| 20 | + |
| 21 | +Hardware |
| 22 | +******** |
| 23 | + |
| 24 | +- MCXC242VLH Arm Cortex-M0+ microcontroller running at 48 MHz |
| 25 | +- 64LQFP package |
| 26 | +- 64KB flash |
| 27 | +- 16KB SRAM |
| 28 | +- USB FS 2.0 |
| 29 | +- 2x low-power UART, 1x UART, 2x I2C, 2x SPI |
| 30 | +- FXLS8974CF accelerometer |
| 31 | +- NTC temperature sensor |
| 32 | +- RGB user LED |
| 33 | +- On-board MCU-Link debugger with CMSIS-DAP |
| 34 | +- Arduino Header, mikroBUS, Pmod |
| 35 | + |
| 36 | +For more information about the MCXC242 SoC and FRDM-MCXC242 board, see |
| 37 | +these references: |
| 38 | + |
| 39 | +- `MCX C14x/24x/44x Website`_ |
| 40 | +- `MCX C24x Datasheet`_ |
| 41 | +- `MCX C24x Reference Manual`_ |
| 42 | +- `FRDM-MCXC242 Website`_ |
| 43 | +- `FRDM-MCXC242 User Manual`_ |
| 44 | +- `FRDM-MCXC242 Design Files`_ |
| 45 | + |
| 46 | +Supported Features |
| 47 | +================== |
| 48 | + |
| 49 | +The ``frdm_mcxc242`` board target supports the following hardware features: |
| 50 | + |
| 51 | ++-----------+------------+-------------------------------------+ |
| 52 | +| Interface | Controller | Driver/Component | |
| 53 | ++===========+============+=====================================+ |
| 54 | +| NVIC | on-chip | nested vector interrupt controller | |
| 55 | ++-----------+------------+-------------------------------------+ |
| 56 | +| SYSTICK | on-chip | systick | |
| 57 | ++-----------+------------+-------------------------------------+ |
| 58 | +| PINMUX | on-chip | pinmux | |
| 59 | ++-----------+------------+-------------------------------------+ |
| 60 | +| GPIO | on-chip | gpio | |
| 61 | ++-----------+------------+-------------------------------------+ |
| 62 | +| UART | on-chip | serial port-polling | |
| 63 | +| | | serial port-interrupt | |
| 64 | ++-----------+------------+-------------------------------------+ |
| 65 | +| FLASH | on-chip | soc flash | |
| 66 | ++-----------+------------+-------------------------------------+ |
| 67 | + |
| 68 | + |
| 69 | +Targets available |
| 70 | +================== |
| 71 | + |
| 72 | +The default configuration can be found in |
| 73 | +:zephyr_file:`boards/nxp/frdm_mcxc242/frdm_mcxc242_defconfig` |
| 74 | + |
| 75 | +Other hardware features are not currently supported by the port. |
| 76 | + |
| 77 | +Connections and IOs |
| 78 | +=================== |
| 79 | + |
| 80 | +The MCXC242 SoC has five pairs of pinmux/gpio controllers (PORTA/GPIOA, |
| 81 | +PORTB/GPIOB, PORTC/GPIOC, PORTD/GPIOD, and PORTE/GPIOE) for the FRDM-MCXC242 board. |
| 82 | + |
| 83 | ++-------+-------------+---------------------------+ |
| 84 | +| Name | Function | Usage | |
| 85 | ++=======+=============+===========================+ |
| 86 | +| PTE16 | ADC | ADC0 channel 1 | |
| 87 | ++-------+-------------+---------------------------+ |
| 88 | +| PTB18 | GPIO | Red LED | |
| 89 | ++-------+-------------+---------------------------+ |
| 90 | +| PTB19 | GPIO | Green LED | |
| 91 | ++-------+-------------+---------------------------+ |
| 92 | +| PTA13 | GPIO | Blue LED | |
| 93 | ++-------+-------------+---------------------------+ |
| 94 | +| PTA1 | LPUART0_RX | UART Console | |
| 95 | ++-------+-------------+---------------------------+ |
| 96 | +| PTA2 | LPUART0_TX | UART Console | |
| 97 | ++-------+-------------+---------------------------+ |
| 98 | +| PTA20 | RESET | RESET Button SW1 | |
| 99 | ++-------+-------------+---------------------------+ |
| 100 | +| PTC1 | GPIO | User button SW2 | |
| 101 | ++-------+-------------+---------------------------+ |
| 102 | +| PTA4 | GPIO | User button SW3 | |
| 103 | ++-------+-------------+---------------------------+ |
| 104 | +| PTD6 | I2C1_SDA | I2C accelerometer | |
| 105 | ++-------+-------------+---------------------------+ |
| 106 | +| PTD7 | I2C1_SCL | I2C accelerometer | |
| 107 | ++-------+-------------+---------------------------+ |
| 108 | + |
| 109 | +System Clock |
| 110 | +============ |
| 111 | + |
| 112 | +The MCXC242 SoC is configured to use HIRC running at 48 MHz as a system clock source. |
| 113 | + |
| 114 | +Serial Port |
| 115 | +=========== |
| 116 | + |
| 117 | +The MCXC242 LPUART0 is used for the console. |
| 118 | + |
| 119 | +Programming and Debugging |
| 120 | +************************* |
| 121 | + |
| 122 | +Build and flash applications as usual (see :ref:`build_an_application` and |
| 123 | +:ref:`application_run` for more details). |
| 124 | + |
| 125 | +Configuring a Debug Probe |
| 126 | +========================= |
| 127 | + |
| 128 | +A debug probe is used for both flashing and debugging the board. This board is |
| 129 | +configured by default to use the MCU-Link CMSIS-DAP Onboard Debug Probe. |
| 130 | + |
| 131 | +Using LinkServer |
| 132 | +---------------- |
| 133 | + |
| 134 | +Linkserver is the default runner for this board, and supports the factory |
| 135 | +default MCU-Link firmware. Follow the instructions in |
| 136 | +:ref:`mcu-link-cmsis-onboard-debug-probe` to reprogram the default MCU-Link |
| 137 | +firmware. This only needs to be done if the default onboard debug circuit |
| 138 | +firmware was changed. To put the board in ``DFU mode`` to program the firmware, |
| 139 | +short jumper JP1. |
| 140 | + |
| 141 | +Using J-Link |
| 142 | +------------ |
| 143 | + |
| 144 | +There are two options. The onboard debug circuit can be updated with Segger |
| 145 | +J-Link firmware by following the instructions in |
| 146 | +:ref:`mcu-link-jlink-onboard-debug-probe`. |
| 147 | +To be able to program the firmware, you need to put the board in ``DFU mode`` |
| 148 | +by shortening the jumper JP1. |
| 149 | +The second option is to attach a :ref:`jlink-external-debug-probe` to the |
| 150 | +10-pin SWD connector (J10) of the board. Additionally, the jumper JP3 must |
| 151 | +be shortened. |
| 152 | +For both options use the ``-r jlink`` option with west to use the jlink runner. |
| 153 | + |
| 154 | +.. code-block:: console |
| 155 | +
|
| 156 | + west flash -r jlink |
| 157 | +
|
| 158 | +Configuring a Console |
| 159 | +===================== |
| 160 | + |
| 161 | +Connect a USB cable from your PC to J9, and use the serial terminal of your choice |
| 162 | +(minicom, putty, etc.) with the following settings: |
| 163 | + |
| 164 | +- Speed: 115200 |
| 165 | +- Data: 8 bits |
| 166 | +- Parity: None |
| 167 | +- Stop bits: 1 |
| 168 | + |
| 169 | +Flashing |
| 170 | +======== |
| 171 | + |
| 172 | +Here is an example for the :ref:`hello_world` application. |
| 173 | + |
| 174 | +.. zephyr-app-commands:: |
| 175 | + :zephyr-app: samples/hello_world |
| 176 | + :board: frdm_mcxc242 |
| 177 | + :goals: flash |
| 178 | + |
| 179 | +Open a serial terminal, reset the board (press the SW1 button), and you should |
| 180 | +see the following message in the terminal: |
| 181 | + |
| 182 | +.. code-block:: console |
| 183 | +
|
| 184 | + *** Booting Zephyr OS build v3.6.0-4475-gfa5bd8bb098e *** |
| 185 | + Hello World! frdm_mcxc242/mcxc242 |
| 186 | +
|
| 187 | +Debugging |
| 188 | +========= |
| 189 | + |
| 190 | +Here is an example for the :ref:`hello_world` application. |
| 191 | + |
| 192 | +.. zephyr-app-commands:: |
| 193 | + :zephyr-app: samples/hello_world |
| 194 | + :board: frdm_mcxc242 |
| 195 | + :goals: debug |
| 196 | + |
| 197 | +Open a serial terminal, step through the application in your debugger, and you |
| 198 | +should see the following message in the terminal: |
| 199 | + |
| 200 | +.. code-block:: console |
| 201 | +
|
| 202 | + *** Booting Zephyr OS build v3.6.0-4475-gfa5bd8bb098e *** |
| 203 | + Hello World! frdm_mcxc242/mcxc242 |
| 204 | +
|
| 205 | +.. _MCX C14x/24x/44x Website: |
| 206 | + https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/mcx-arm-cortex-m/mcx-c-series-microcontrollers/mcx-c14x-24x-44x-mcus-with-arm-cortex-m0-plus-entry-level-mcus-with-usb-segment-lcd-and-classical-peripherals:MCX-C14x-24x-44x |
| 207 | + |
| 208 | +.. _MCX C24x Datasheet: |
| 209 | + https://www.nxp.com/docs/en/data-sheet/MCXC24XP64M48SF2.pdf |
| 210 | + |
| 211 | +.. _MCX C24x Reference Manual: |
| 212 | + https://www.nxp.com/webapp/Download?colCode=MCXC24XP64M48RM |
| 213 | + |
| 214 | +.. _FRDM-MCXC242 Website: |
| 215 | + https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/frdm-development-board-for-mcx-c242-mcus:FRDM-MCXC242 |
| 216 | + |
| 217 | +.. _FRDM-MCXC242 User Manual: |
| 218 | + https://www.nxp.com/webapp/Download?colCode=UM12119 |
| 219 | + |
| 220 | +.. _FRDM-MCXC242 Design Files: |
| 221 | + https://www.nxp.com/webapp/Download?colCode=FRDM-MCXC242-DESIGN-FILES |
0 commit comments