|
| 1 | +.. zephyr:board:: s32k148_evb |
| 2 | +
|
| 3 | +Overview |
| 4 | +******** |
| 5 | + |
| 6 | +`NXP S32K148-Q176`_ is a low-cost evaluation and development board for general-purpose industrial |
| 7 | +and automotive applications. |
| 8 | +The S32K148-Q176 is based on the 32-bit Arm Cortex-M4F `NXP S32K148`_ microcontroller. |
| 9 | +The onboard OpenSDA serial and debug adapter, running a mass storage device (MSD) bootloader |
| 10 | +and a collection of OpenSDA Applications, offers options for serial communication, |
| 11 | +flash programming, and run-control debugging. |
| 12 | +It is a bridge between a USB host and the embedded target processor. |
| 13 | + |
| 14 | +Hardware |
| 15 | +******** |
| 16 | + |
| 17 | +- NXP S32K148 |
| 18 | + |
| 19 | + - Arm Cortex-M4F @ up to 112 Mhz |
| 20 | + - 1.5 MB Flash |
| 21 | + - 256 KB SRAM |
| 22 | + - up to 127 I/Os |
| 23 | + - 3x FlexCAN with FD |
| 24 | + - eDMA, 12-bit ADC, MPU, ECC and more. |
| 25 | + |
| 26 | +- Interfaces |
| 27 | + |
| 28 | + - CAN, LIN, UART/SCI |
| 29 | + - Ethernet connector compatible with different ethernet daughter cards |
| 30 | + - 2 touchpads, potentiometer, user RGB LED and 2 buttons. |
| 31 | + |
| 32 | +More information about the hardware and design resources can be found at |
| 33 | +`NXP S32K148-Q176`_ website. |
| 34 | + |
| 35 | +Supported Features |
| 36 | +================== |
| 37 | + |
| 38 | +.. zephyr:board-supported-hw:: |
| 39 | +
|
| 40 | +Connections and IOs |
| 41 | +=================== |
| 42 | + |
| 43 | +This board has 5 GPIO ports named from ``gpioa`` to ``gpioe``. |
| 44 | + |
| 45 | +Pin control can be further configured from your application overlay by adding |
| 46 | +children nodes with the desired pinmux configuration to the singleton node |
| 47 | +``pinctrl``. Supported properties are described in |
| 48 | +:zephyr_file:`dts/bindings/pinctrl/nxp,port-pinctrl.yaml`. |
| 49 | + |
| 50 | +LEDs |
| 51 | +---- |
| 52 | + |
| 53 | +The NXP S32K148-Q176 board has one user RGB LED that can be used either as a GPIO |
| 54 | +LED or as a PWM LED. |
| 55 | + |
| 56 | +.. table:: RGB LED as GPIO LED |
| 57 | + |
| 58 | + +-----------------+------------------+----------------+-------+ |
| 59 | + | Devicetree node | Devicetree alias | Label | Pin | |
| 60 | + +=================+==================+================+=======+ |
| 61 | + | led1_red | led0 | LED1_RGB_RED | PTE21 | |
| 62 | + +-----------------+------------------+----------------+-------+ |
| 63 | + | led1_green | led1 | LED1_RGB_GREEN | PTE22 | |
| 64 | + +-----------------+------------------+----------------+-------+ |
| 65 | + | led1_blue | led2 | LED1_RGB_BLUE | PTE23 | |
| 66 | + +-----------------+------------------+----------------+-------+ |
| 67 | + |
| 68 | +.. table:: RGB LED as PWM LED |
| 69 | + |
| 70 | + +-----------------+--------------------------+--------------------+------------------+ |
| 71 | + | Devicetree node | Devicetree alias | Label | Pin | |
| 72 | + +=================+==========================+====================+==================+ |
| 73 | + | led1_red_pwm | pwm-led0 / red-pwm-led | LED1_RGB_RED_PWM | PTE21 / FTM4_CH1 | |
| 74 | + +-----------------+--------------------------+--------------------+------------------+ |
| 75 | + | led1_green_pwm | pwm-led1 / green-pwm-led | LED1_RGB_GREEN_PWM | PTE22 / FTM4_CH2 | |
| 76 | + +-----------------+--------------------------+--------------------+------------------+ |
| 77 | + | led1_blue_pwm | pwm-led2 / blue-pwm-led | LED1_RGB_BLUE_PWM | PTE23 / FTM4_CH3 | |
| 78 | + +-----------------+--------------------------+--------------------+------------------+ |
| 79 | + |
| 80 | +The user can control the LEDs in any way. An output of ``0`` illuminates the LED. |
| 81 | + |
| 82 | +Buttons |
| 83 | +------- |
| 84 | + |
| 85 | +The NXP S32K148-Q176 board has two user buttons: |
| 86 | + |
| 87 | ++-----------------+-------+-------+ |
| 88 | +| Devicetree node | Label | Pin | |
| 89 | ++=================+=======+=======+ |
| 90 | +| sw0 / button_3 | SW3 | PTC12 | |
| 91 | ++-----------------+-------+-------+ |
| 92 | +| sw1 / button_4 | SW4 | PTC13 | |
| 93 | ++-----------------+-------+-------+ |
| 94 | + |
| 95 | +Serial Console |
| 96 | +============== |
| 97 | + |
| 98 | +The serial console is provided via ``lpuart1`` on the OpenSDA adapter. |
| 99 | + |
| 100 | ++------+--------------+ |
| 101 | +| Pin | Pin Function | |
| 102 | ++======+==============+ |
| 103 | +| PTC7 | LPUART1_TX | |
| 104 | ++------+--------------+ |
| 105 | +| PTC6 | LPUART1_RX | |
| 106 | ++------+--------------+ |
| 107 | + |
| 108 | +System Clock |
| 109 | +============ |
| 110 | + |
| 111 | +The Arm Cortex-M4F core is configured to run at 80 MHz (RUN mode). |
| 112 | + |
| 113 | +Programming and Debugging |
| 114 | +************************* |
| 115 | + |
| 116 | +.. zephyr:board-supported-runners:: |
| 117 | +
|
| 118 | +Applications for the ``s32k148_evb`` board can be built in the usual way as |
| 119 | +documented in :ref:`build_an_application`. |
| 120 | + |
| 121 | +This board configuration supports `SEGGER J-Link`_ West runner for flashing and |
| 122 | +debugging applications. Follow the steps described in :ref:`jlink-debug-host-tools`, |
| 123 | +to setup the flash and debug host tools for this runner. |
| 124 | + |
| 125 | +Flashing |
| 126 | +======== |
| 127 | + |
| 128 | +Run the ``west flash`` command to flash the application using SEGGER J-Link. |
| 129 | + |
| 130 | +Debugging |
| 131 | +========= |
| 132 | + |
| 133 | +Run the ``west debug`` command to start a GDB session using SEGGER J-Link. |
| 134 | + |
| 135 | +Configuring a Console |
| 136 | +===================== |
| 137 | + |
| 138 | +We will use OpenSDA as a USB-to-serial adapter for the serial console. |
| 139 | + |
| 140 | +Use the following settings with your serial terminal of choice (minicom, putty, etc.): |
| 141 | + |
| 142 | +- Speed: 115200 |
| 143 | +- Data: 8 bits |
| 144 | +- Parity: None |
| 145 | +- Stop bits: 1 |
| 146 | + |
| 147 | +.. include:: ../../common/board-footer.rst |
| 148 | + :start-after: nxp-board-footer |
| 149 | + |
| 150 | +References |
| 151 | +********** |
| 152 | + |
| 153 | +.. target-notes:: |
| 154 | + |
| 155 | +.. _NXP S32K148-Q176: |
| 156 | + https://www.nxp.com/design/design-center/development-boards-and-designs/automotive-development-platforms/s32k-mcu-platforms/s32k148-q176-evaluation-board-for-automotive-general-purpose:S32K148EVB |
| 157 | + |
| 158 | +.. _NXP S32K148: |
| 159 | + https://www.nxp.com/products/processors-and-microcontrollers/s32-automotive-platform/s32k-auto-general-purpose-mcus/s32k1-microcontrollers-for-automotive-general-purpose:S32K1 |
| 160 | + |
| 161 | +.. _SEGGER J-Link: |
| 162 | + https://wiki.segger.com/S32Kxxx |
0 commit comments