-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add ke17z512 support #72784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
aescolar
merged 4 commits into
zephyrproject-rtos:main
from
nxp-upstream:add_ke17z512_support
Jun 7, 2024
Merged
Add ke17z512 support #72784
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d84ca94
soc: nxp: kinetis: add mke17z9 soc support
ankeXiao 90d0bf4
drivers: clock_control: add a macro for mke17z9 to wrap flexbus clock
ankeXiao d2ef4af
boards: nxp: frdm_ke17z512: add new board support
ankeXiao 58b57ff
tests: drivers: gpio: gpio_basic_api: add overlay for ke17z512
ankeXiao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Copyright 2024 NXP | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config BOARD_FRDM_KE17Z512 | ||
| select SOC_MKE17Z9 | ||
| select SOC_PART_NUMBER_MKE17Z512VLL9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # | ||
| # Copyright 2024 NXP | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
|
|
||
| board_runner_args(linkserver "--device=MKE17Z512xxx9:FRDM-KE17Z512") | ||
| board_runner_args(jlink "--device=MKE17Z512xxx9" "--reset-after-load") | ||
|
|
||
| include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake) | ||
| include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| board: | ||
| name: frdm_ke17z512 | ||
| vendor: nxp | ||
| socs: | ||
| - name: mke17z9 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,198 @@ | ||
| .. _frdm_ke17z512: | ||
|
|
||
| NXP FRDM-KE17Z512 | ||
| ################## | ||
|
|
||
| Overview | ||
| ******** | ||
|
|
||
| The FRDM-KE17Z512 is a development board for NXP Kinetis KE1xZ 32-bit | ||
| MCU-based platforms. The onboard OpenSDAv2 serial and debug adapter, | ||
| running an open source bootloader, offers options for serial | ||
| communication, flash programming, and run-control debugging. | ||
|
|
||
| .. figure:: frdm_ke17z512.webp | ||
| :align: center | ||
| :alt: FRDM-KE17Z512 | ||
|
|
||
| FRDM-KE17Z512 (Credit: NXP) | ||
|
|
||
| Hardware | ||
| ******** | ||
|
|
||
| - MKE17Z512VLL9 MCU (up to 96 MHz, 512 KB flash memory, 96 KB RAM, | ||
| and 100 Low profile Quad Flat Package (LQFP)) | ||
| - 3.3 V or 5 V MCU operation | ||
| - 6-axis FXOS8700CQ digital accelerometer and magnetometer | ||
| - RGB LED | ||
| - Two user push-buttons | ||
| - Thermistor | ||
| - Arduino compatible I/O pin header | ||
| - OpenSDA on-board debugger | ||
| - Two Touch Electrodes | ||
|
|
||
| For more information about the KE1xZ SoC and the FRDM-KE17Z512 board, see | ||
| these NXP reference documents: | ||
|
|
||
| - `KE1xZ Website`_ | ||
| - `KE1xZ Fact Sheet`_ | ||
| - `KE1xZ Reference Manual`_ | ||
| - `FRDM-KE17Z512 Website`_ | ||
| - `FRDM-KE17Z512 Quick Start Guide`_ | ||
| - `FRDM-KE17Z512 Reference Manual`_ | ||
|
|
||
| Supported Features | ||
| ================== | ||
|
|
||
| The frdm_ke17z512 board configuration supports the following hardware | ||
| features: | ||
|
|
||
| +-----------+------------+-------------------------------------+ | ||
| | Interface | Controller | Driver/Component | | ||
| +===========+============+=====================================+ | ||
| | NVIC | on-chip | nested vector interrupt controller | | ||
| +-----------+------------+-------------------------------------+ | ||
| | SYSTICK | on-chip | systick | | ||
| +-----------+------------+-------------------------------------+ | ||
| | GPIO | on-chip | gpio | | ||
| +-----------+------------+-------------------------------------+ | ||
| | UART | on-chip | uart polling; | | ||
| | | | uart interrupt | | ||
| +-----------+------------+-------------------------------------+ | ||
|
|
||
| The default configuration can be found in the defconfig file: | ||
| ``boards/nxp/frdm_ke17z512/frdm_ke17z512_defconfig``. | ||
|
|
||
| Other hardware features are not currently supported by the port. | ||
|
|
||
| System Clock | ||
| ============ | ||
|
|
||
| The KE17Z9 SoC is configured to run at 48 MHz using the FIRC. | ||
|
|
||
| Serial Port | ||
| =========== | ||
|
|
||
| The KE17Z9 SoC has three LPUARTs. UART2 is configured for the console. | ||
|
|
||
| Programming and Debugging | ||
| ************************* | ||
|
|
||
| Build and flash applications as usual (see :ref:`build_an_application` and | ||
| :ref:`application_run` for more details). | ||
|
|
||
| Configuring a Debug Probe | ||
| ========================= | ||
|
|
||
| A debug probe is used for both flashing and debugging the board. This board is | ||
| configured by default to use Linkserver. | ||
|
|
||
| Early versions of this board have an outdated version of the OpenSDA bootloader | ||
| and require an update. Please see the `DAPLink Bootloader Update`_ page for | ||
| instructions to update from the CMSIS-DAP bootloader to the DAPLink bootloader. | ||
|
|
||
| Option 1: Linkserver | ||
| -------------------- | ||
|
|
||
| Install the :ref:`linkserver-debug-host-tools` and make sure they are in your | ||
| search path. LinkServer works with the default CMSIS-DAP firmware included in | ||
| the on-board debugger. | ||
|
|
||
| Linkserver is the default for this board, ``west flash`` and ``west debug`` will | ||
| call the linkserver runner. | ||
|
|
||
| Option 2: :ref:`opensda-jlink-onboard-debug-probe` | ||
| -------------------------------------------------- | ||
|
|
||
| Install the :ref:`jlink-debug-host-tools` and make sure they are in your search | ||
| path. | ||
|
|
||
| Follow the instructions in :ref:`opensda-jlink-onboard-debug-probe` to program | ||
| the `Segger J-Link OpenSDA V2.1 Firmware`_. | ||
| Use the ``-r jlink`` option with west to use the jlink runner. | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| west flash -r jlink | ||
|
|
||
| Configuring a Console | ||
| ===================== | ||
|
|
||
| Regardless of your choice in debug probe, we will use the OpenSDA | ||
| microcontroller as a usb-to-serial adapter for the serial console. | ||
|
|
||
| Connect a USB cable from your PC to J10. | ||
|
|
||
| Use the following settings with your serial terminal of choice (minicom, putty, | ||
| etc.): | ||
|
|
||
| - Speed: 115200 | ||
| - Data: 8 bits | ||
| - Parity: None | ||
| - Stop bits: 1 | ||
|
|
||
| Flashing | ||
| ======== | ||
|
|
||
| Here is an example for the :ref:`hello_world` application. | ||
|
|
||
| .. zephyr-app-commands:: | ||
| :zephyr-app: samples/hello_world | ||
| :board: frdm_ke17z512 | ||
| :goals: flash | ||
|
|
||
| Open a serial terminal, reset the board (press the SW1 button), and you should | ||
| see the following message in the terminal: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| *** Booting Zephyr OS build v3.6.0-xxxx-gxxxxxxxxxxxx *** | ||
| Hello World! frdm_ke17z512/mke17z9 | ||
|
|
||
| Debugging | ||
| ========= | ||
|
|
||
| Here is an example for the :ref:`hello_world` application. | ||
|
|
||
| .. zephyr-app-commands:: | ||
| :zephyr-app: samples/hello_world | ||
| :board: frdm_ke17z512 | ||
| :goals: debug | ||
|
|
||
| Open a serial terminal, step through the application in your debugger, and you | ||
| should see the following message in the terminal: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| *** Booting Zephyr OS build v3.6.0-xxxx-gxxxxxxxxxxxx *** | ||
| Hello World! frdm_ke17z512/mke17z9 | ||
|
|
||
| .. _FRDM-KE17Z512 Website: | ||
| 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 | ||
|
|
||
| .. _FRDM-KE17Z512 Quick Start Guide: | ||
| https://www.nxp.com/docs/en/quick-reference-guide/FRDMKE17Z512QSG.pdf | ||
|
|
||
| .. _FRDM-KE17Z512 Reference Manual: | ||
| https://www.nxp.com/docs/en/reference-manual/KE1XZP100M96SF0RM.pdf | ||
|
|
||
| .. _KE1xZ Website: | ||
| 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 | ||
|
|
||
| .. _KE1xZ Fact Sheet: | ||
| https://www.nxp.com/docs/en/fact-sheet/KE1xZMCUFAMFS.pdf | ||
|
|
||
| .. _KE1xZ Reference Manual: | ||
| https://www.nxp.com/webapp/Download?colCode=KE1XZP100M72SF0RM | ||
|
|
||
| .. _linkserver-debug-host-tools: | ||
| https://www.nxp.com/lgfiles/updates/mcuxpresso/LinkServer_1.5.30.exe | ||
|
|
||
| .. _Segger J-Link OpenSDA V2.1 Firmware: | ||
| https://www.segger.com/downloads/jlink/OpenSDA_V2_1.bin | ||
|
|
||
| .. _DAPLink Bootloader Update: | ||
| https://os.mbed.com/blog/entry/DAPLink-bootloader-update/ | ||
|
|
||
| .. _jlink-debug-host-tools: | ||
| https://www.segger.com/downloads/jlink/JLink_Windows_V794_x86_64.exe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /* | ||
| * Copyright 2024 NXP | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
|
|
||
| #include <nxp/kinetis/MKE17Z512VLL9-pinctrl.h> | ||
|
|
||
| &pinctrl { | ||
|
|
||
| /* Configures pin routing and optionally pin electrical features. */ | ||
| lpuart2_default: lpuart2_default { | ||
| group0 { | ||
| pinmux = <LPUART2_TX_PTE12>, | ||
| <LPUART2_RX_PTD17>; | ||
| drive-strength = "low"; | ||
| slew-rate = "slow"; | ||
| }; | ||
| }; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| /* | ||
| * Copyright 2024 NXP | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| /dts-v1/; | ||
|
|
||
| #include <nxp/nxp_ke17z512.dtsi> | ||
| #include "frdm_ke17z512-pinctrl.dtsi" | ||
| #include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
|
||
| / { | ||
| model = "NXP Freedom KE17Z512 board"; | ||
| compatible = "nxp,ke17z512", "nxp,mke17z9", "nxp,ke1xz"; | ||
|
|
||
| chosen { | ||
| zephyr,sram = &sram_u; | ||
| zephyr,flash = &flash0; | ||
| zephyr,console = &lpuart2; | ||
| zephyr,shell-uart = &lpuart2; | ||
| }; | ||
|
|
||
| aliases { | ||
| led0 = &red_led; | ||
| led1 = &green_led; | ||
| led2 = &blue_led; | ||
| sw0 = &user_button_2; | ||
| sw1 = &user_button_3; | ||
| }; | ||
|
|
||
| leds { | ||
| compatible = "gpio-leds"; | ||
| red_led: led_0 { | ||
| gpios = <&gpiod 10 GPIO_ACTIVE_LOW>; | ||
| label = "Red LED"; | ||
| }; | ||
| green_led: led_1 { | ||
| gpios = <&gpiod 5 GPIO_ACTIVE_LOW>; | ||
| label = "Green LED"; | ||
| }; | ||
| blue_led: led_2 { | ||
| gpios = <&gpiod 12 GPIO_ACTIVE_LOW>; | ||
| label = "Blue LED"; | ||
| }; | ||
| }; | ||
|
|
||
| gpio_keys { | ||
| compatible = "gpio-keys"; | ||
| user_button_2: button_0 { | ||
| label = "User SW2"; | ||
| gpios = <&gpioe 14 GPIO_ACTIVE_LOW>; | ||
| zephyr,code = <INPUT_KEY_0>; | ||
| }; | ||
| user_button_3: button_1 { | ||
| label = "User SW3"; | ||
| gpios = <&gpiod 3 GPIO_ACTIVE_LOW>; | ||
| zephyr,code = <INPUT_KEY_1>; | ||
| }; | ||
| }; | ||
| }; | ||
|
|
||
| &lpuart2 { | ||
| status = "okay"; | ||
| pinctrl-0 = <&lpuart2_default>; | ||
| pinctrl-names = "default"; | ||
| current-speed = <115200>; | ||
| }; | ||
|
|
||
| &gpiod { | ||
| status = "okay"; | ||
| }; | ||
|
|
||
| &gpioe { | ||
| status = "okay"; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # | ||
| # Copyright 2024 NXP | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
|
|
||
| identifier: frdm_ke17z512 | ||
| name: NXP FRDM-KE17Z512 | ||
| type: mcu | ||
| arch: arm | ||
| ram: 64 | ||
| flash: 512 | ||
| toolchain: | ||
| - zephyr | ||
| - gnuarmemb | ||
| - xtools | ||
| supported: | ||
| - gpio | ||
| - uart | ||
| vendor: nxp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # | ||
| # Copyright 2024 NXP | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
|
|
||
| CONFIG_CONSOLE=y | ||
| CONFIG_UART_CONSOLE=y | ||
| CONFIG_SERIAL=y | ||
| CONFIG_GPIO=y | ||
| CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000 | ||
| CONFIG_PINCTRL=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.