1.. zephyr:board:: frdm_ke17z512
2
3Overview
4********
5
6The FRDM-KE17Z512 is a development board for NXP Kinetis KE1xZ 32-bit
7MCU-based platforms. The onboard OpenSDAv2 serial and debug adapter,
8running an open source bootloader, offers options for serial
9communication, flash programming, and run-control debugging.
10
11Hardware
12********
13
14- MKE17Z512VLL9 MCU (up to 96  MHz, 512 KB flash memory, 96 KB RAM,
15  and 100 Low profile Quad Flat Package (LQFP))
16- 3.3 V or 5 V MCU operation
17- 6-axis FXOS8700CQ digital accelerometer and magnetometer
18- RGB LED
19- Two user push-buttons
20- Thermistor
21- Arduino compatible I/O pin header
22- OpenSDA on-board debugger
23- Two Touch Electrodes
24
25For more information about the KE1xZ SoC and the FRDM-KE17Z512 board, see
26these NXP reference documents:
27
28- `KE1xZ Website`_
29- `KE1xZ Fact Sheet`_
30- `KE1xZ Reference Manual`_
31- `FRDM-KE17Z512 Website`_
32- `FRDM-KE17Z512 Quick Start Guide`_
33- `FRDM-KE17Z512 Reference Manual`_
34
35Supported Features
36==================
37
38The frdm_ke17z512 board configuration supports the following hardware
39features:
40
41+-----------+------------+-------------------------------------+
42| Interface | Controller | Driver/Component                    |
43+===========+============+=====================================+
44| NVIC      | on-chip    | nested vector interrupt controller  |
45+-----------+------------+-------------------------------------+
46| SYSTICK   | on-chip    | systick                             |
47+-----------+------------+-------------------------------------+
48| ADC       | on-chip    | adc                                 |
49+-----------+------------+-------------------------------------+
50| GPIO      | on-chip    | gpio                                |
51+-----------+------------+-------------------------------------+
52| LPTMR     | on-chip    | counter                             |
53+-----------+------------+-------------------------------------+
54| UART      | on-chip    | uart polling;                       |
55|           |            | uart interrupt                      |
56+-----------+------------+-------------------------------------+
57| FTM       | on-chip    | pwm                                 |
58+-----------+------------+-------------------------------------+
59| I2C       | on-chip    | I2C                                 |
60+-----------+------------+-------------------------------------+
61| RTC       | on-chip    | counter                             |
62+-----------+------------+-------------------------------------+
63| ACMP      | on-chip    | sensor                              |
64+-----------+------------+-------------------------------------+
65| SPI       | on-chip    | spi                                 |
66+-----------+------------+-------------------------------------+
67| DMA       | on-chip    | dma                                 |
68+-----------+------------+-------------------------------------+
69| WATCHDOG  | on-chip    | watchdog                            |
70+-----------+------------+-------------------------------------+
71
72The default configuration can be found in the defconfig file:
73``boards/nxp/frdm_ke17z512/frdm_ke17z512_defconfig``.
74
75Other hardware features are not currently supported by the port.
76
77System Clock
78============
79
80The KE17Z9 SoC is configured to run at 48 MHz using the FIRC.
81
82Serial Port
83===========
84
85The KE17Z9 SoC has three LPUARTs. UART2 is configured for the console.
86
87Programming and Debugging
88*************************
89
90Build and flash applications as usual (see :ref:`build_an_application` and
91:ref:`application_run` for more details).
92
93Configuring a Debug Probe
94=========================
95
96A debug probe is used for both flashing and debugging the board. This board is
97configured by default to use Linkserver.
98
99Early versions of this board have an outdated version of the OpenSDA bootloader
100and require an update. Please see the `DAPLink Bootloader Update`_ page for
101instructions to update from the CMSIS-DAP bootloader to the DAPLink bootloader.
102
103Option 1: Linkserver
104--------------------
105
106Install the :ref:`linkserver-debug-host-tools` and make sure they are in your
107search path.  LinkServer works with the default CMSIS-DAP firmware included in
108the on-board debugger.
109
110Linkserver is the default for this board, ``west flash`` and ``west debug`` will
111call the linkserver runner.
112
113Option 2: :ref:`opensda-jlink-onboard-debug-probe`
114--------------------------------------------------
115
116Install the :ref:`jlink-debug-host-tools` and make sure they are in your search
117path.
118
119Follow the instructions in :ref:`opensda-jlink-onboard-debug-probe` to program
120the `Segger J-Link OpenSDA V2.1 Firmware`_.
121Use the ``-r jlink`` option with west to use the jlink runner.
122
123.. code-block:: console
124
125   west flash -r jlink
126
127Configuring a Console
128=====================
129
130Regardless of your choice in debug probe, we will use the OpenSDA
131microcontroller as a usb-to-serial adapter for the serial console.
132
133Connect a USB cable from your PC to J10.
134
135Use the following settings with your serial terminal of choice (minicom, putty,
136etc.):
137
138- Speed: 115200
139- Data: 8 bits
140- Parity: None
141- Stop bits: 1
142
143Flashing
144========
145
146Here is an example for the :zephyr:code-sample:`hello_world` application.
147
148.. zephyr-app-commands::
149   :zephyr-app: samples/hello_world
150   :board: frdm_ke17z512
151   :goals: flash
152
153Open a serial terminal, reset the board (press the SW1 button), and you should
154see the following message in the terminal:
155
156.. code-block:: console
157
158   *** Booting Zephyr OS build v3.6.0-xxxx-gxxxxxxxxxxxx ***
159   Hello World! frdm_ke17z512/mke17z9
160
161Debugging
162=========
163
164Here is an example for the :zephyr:code-sample:`hello_world` application.
165
166.. zephyr-app-commands::
167   :zephyr-app: samples/hello_world
168   :board: frdm_ke17z512
169   :goals: debug
170
171Open a serial terminal, step through the application in your debugger, and you
172should see the following message in the terminal:
173
174.. code-block:: console
175
176   *** Booting Zephyr OS build v3.6.0-xxxx-gxxxxxxxxxxxx ***
177   Hello World! frdm_ke17z512/mke17z9
178
179.. _FRDM-KE17Z512 Website:
180   https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/frdm-development-board-for-96-mhz-ke17z-ke13z-ke12z-with-512-kb-flash-mcus:FRDM-KE17Z512
181
182.. _FRDM-KE17Z512 Quick Start Guide:
183   https://www.nxp.com/docs/en/quick-reference-guide/FRDMKE17Z512QSG.pdf
184
185.. _FRDM-KE17Z512 Reference Manual:
186   https://www.nxp.com/docs/en/reference-manual/KE1XZP100M96SF0RM.pdf
187
188.. _KE1xZ Website:
189   https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/ke-series-arm-cortex-m4-m0-plus/ke1xz-arm-cortex-m0-plus-5v-main-stream-mcu-with-nxp-touch-and-can-control:KE1xZ
190
191.. _KE1xZ Fact Sheet:
192   https://www.nxp.com/docs/en/fact-sheet/KE1xZMCUFAMFS.pdf
193
194.. _KE1xZ Reference Manual:
195   https://www.nxp.com/webapp/Download?colCode=KE1XZP100M72SF0RM
196
197.. _linkserver-debug-host-tools:
198   https://www.nxp.com/lgfiles/updates/mcuxpresso/LinkServer_1.5.30.exe
199
200.. _Segger J-Link OpenSDA V2.1 Firmware:
201   https://www.segger.com/downloads/jlink/OpenSDA_V2_1.bin
202
203.. _DAPLink Bootloader Update:
204   https://os.mbed.com/blog/entry/DAPLink-bootloader-update/
205
206.. _jlink-debug-host-tools:
207   https://www.segger.com/downloads/jlink/JLink_Windows_V794_x86_64.exe
208