Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions boards/st/nucleo_n657x0_q/Kconfig.nucleo_n657x0_q
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# STM32N657X0_Q Nucleo board configuration

# Copyright (c) 2024 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0

config BOARD_NUCLEO_N657X0_Q
select SOC_STM32N657XX
9 changes: 9 additions & 0 deletions boards/st/nucleo_n657x0_q/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 STMicroelectronics

board_runner_args(stm32cubeprogrammer "--port=swd")
board_runner_args(stm32cubeprogrammer "--tool-opt= mode=HOTPLUG ap=1")
board_runner_args(stm32cubeprogrammer "--extload=MX25UM51245G_STM32N6570-NUCLEO.stldr")
board_runner_args(stm32cubeprogrammer "--download-address=0x70000000")

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
6 changes: 6 additions & 0 deletions boards/st/nucleo_n657x0_q/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: nucleo_n657x0_q
full_name: Nucleo N657x0-Q
vendor: st
socs:
- name: stm32n657xx
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 changes: 182 additions & 0 deletions boards/st/nucleo_n657x0_q/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
.. zephyr:board:: nucleo_n657x0_q

Overview
********

The STM32 Nucleo-144 board provides an affordable and flexible way for users to try out
new concepts and build prototypes by choosing from the various combinations of performance
and power consumption features, provided by the STM32 microcontroller. For the compatible boards,
the internal or external SMPS significantly reduces power consumption in Run mode.

The ST Zio connector, which extends the ARDUINO® Uno V3 connectivity, and the ST morpho headers
provide an easy means of expanding the functionality of the Nucleo open development platform with
a wide choice of specialized shields.

The STM32 Nucleo-144 board does not require any separate probe as it integrates the ST-LINK
debugger/programmer.

The STM32 Nucleo-144 board comes with the STM32 comprehensive free software libraries and
examples available with the STM32Cube MCU Package.

Hardware
********

- Common features:

- STM32 microcontroller in an LQFP144, TFBGA225, or VFBGA264 package
- 3 user LEDs
- 1 user push-button and 1 reset push-button
- 32.768 kHz crystal oscillator
- Board connectors:

- SWD
- ST morpho expansion connector

- Flexible power-supply options: ST-LINK USB VBUS, USB connector, or external sources

- Features specific to some of the boards (refer to the ordering information section
of the data brief for details);

- External or internal SMPS to generate Vcore logic supply
- Ethernet compliant with IEEE-802.3-2002
- USB Device only, USB OTG full speed, or SNK/UFP (full-speed or high-speed mode)
- Board connectors:

- ARDUINO® Uno V3 connector or ST Zio expansion connector including ARDUINO® Uno V3
- Camera module FPC
- MIPI20 compatible connector with trace signals
- USB with Micro-AB or USB Type-C®
- Ethernet RJ45

- On-board ST-LINK (STLINK/V2-1, STLINK-V3E, or STLINK-V3EC) debugger/programmer with
USB re-enumeration capability: mass storage, Virtual COM port, and debug port

Supported Features
==================

The Zephyr ``nucleo_n657x0_q`` board supports the following hardware features:

+-----------+------------+-------------------------------------+
| Interface | Controller | Driver/Component |
+===========+============+=====================================+
| CLOCK | on-chip | reset and clock control |
+-----------+------------+-------------------------------------+
| GPIO | on-chip | gpio |
+-----------+------------+-------------------------------------+
| NVIC | on-chip | nested vector interrupt controller |
+-----------+------------+-------------------------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-------------------------------------+


Other hardware features are not yet supported on this Zephyr port.

The default configuration can be found in the defconfig file:
:zephyr_file:`boards/st/nucleo_n657x0_q/nucleo_n657x0_q_defconfig`


Connections and IOs
===================

NUCLEO_N657X0_Q Board has 12 GPIO controllers. These controllers are responsible
for pin muxing, input/output, pull-up, etc.

For more details please refer to `NUCLEO_N657X0_Q User Manual`_.

Default Zephyr Peripheral Mapping:
----------------------------------

- LD1 : PO1
- LD2 : PG10
- USART_1_TX : PE5
- USART_1_RX : PE6

System Clock
------------

NUCLEO_N657X0_Q System Clock could be driven by internal or external oscillator,
as well as main PLL clock. By default System clock is driven by PLL clock at
400MHz, driven by 64MHz high speed internal oscillator.

Serial Port
-----------

NUCLEO_N657X0_Q board has 10 U(S)ARTs. The Zephyr console output is assigned to
USART1. Default settings are 115200 8N1.

Programming and Debugging
*************************

NUCLEO_N657X0_Q board includes an ST-LINK/V3 embedded debug tool interface.
This probe allows to flash the board using various tools.

Flashing
========

The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
Version 2.18.0 or later of `STM32CubeProgrammer`_ is required.

Flashing an application to NUCLEO_N657X0_Q
------------------------------------------

Connect the NUCLEO_N657X0_Q to your host computer using the USB port.
Then build and flash an application.

.. note::
For flashing, BOOT0 pin should be set to 0 and BOOT1 to 1 before powering on
the board.

To run the application after flashing, BOOT1 should be set to 0 and the board
should be powered off and on again.

Here is an example for the :zephyr:code-sample:`hello_world` application.

Run a serial host program to connect with your Nucleo board:

.. code-block:: console

$ minicom -D /dev/ttyACM0

Then build and flash the application.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: nucleo_n657x0_q
:goals: build flash

You should see the following message on the console:

.. code-block:: console

Hello World! nucleo_n657x0_q/stm32n657xx

Debugging
=========

For now debugging is only available through STM32CubeIDE:
* Go to File > Import and select C/C++ > STM32 Cortex-M Executable
* In Executable field, browse to your <ZEPHYR_PATH>/build/zephyr/zephyr.elf
* In MCU field, select STM32N657X0HxQ.
* Click on Finish
* Then click on Debug to start the debugging session

.. note::
For debugging, BOOT0 pin should be set to 0 and BOOT1 to 1 before powering on the
board.

.. _NUCLEO_N657X0_Q website:
https://www.st.com/en/evaluation-tools/nucleo-n657x0-q.html

.. _NUCLEO_N657X0_Q User Manual:
https://www.st.com/resource/en/user_manual/um3417-stm32n6-nucleo144-board-mb1940-stmicroelectronics.pdf

.. _STM32N657X0 on www.st.com:
https://www.st.com/en/microcontrollers-microprocessors/stm32n657x0.html

.. _STM32N657 reference manual:
https://www.st.com/resource/en/reference_manual/rm0486-stm32n647657xx-armbased-32bit-mcus-stmicroelectronics.pdf

.. _STM32CubeProgrammer:
https://www.st.com/en/development-tools/stm32cubeprog.html
124 changes: 124 additions & 0 deletions boards/st/nucleo_n657x0_q/nucleo_n657x0_q.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/*
* Copyright (c) 2024 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include <st/n6/stm32n657X0.dtsi>
#include <st/n6/stm32n657x0hxq-pinctrl.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
model = "STMicroelectronics STM32N657X0-Q-NUCLEO board";
compatible = "st,stm32n657x0-q-nucleo";

chosen {
zephyr,console = &usart1;
zephyr,shell-uart = &usart1;
zephyr,sram = &axisram2;
};

leds: leds {
compatible = "gpio-leds";

green_led: led_1 {
gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>;
label = "User LD6";
};

blue_led: led_2 {
gpios = <&gpiog 8 GPIO_ACTIVE_HIGH>;
label = "User LD7";
};

red_led: led_3 {
gpios = <&gpiog 10 GPIO_ACTIVE_HIGH>;
label = "User LD5";
};
};

gpio_keys {
compatible = "gpio-keys";

user_button: button_0 {
gpios = <&gpioc 13 GPIO_ACTIVE_HIGH>;
label = "User SB1";
zephyr,code = <INPUT_KEY_0>;
};
};

aliases {
led0 = &green_led;
sw0 = &user_button;
};
};

&clk_hsi {
hsi-div = <1>;
status = "okay";
};

&pll1 {
clocks = <&clk_hsi>;
div-m = <4>;
mul-n = <75>;
div-p1 = <1>;
div-p2 = <1>;
status = "okay";
};

&ic1 {
pll-src = <1>;
ic-div = <2>;
status = "okay";
};

&ic2 {
pll-src = <1>;
ic-div = <3>;
status = "okay";
};

&ic6 {
pll-src = <1>;
ic-div = <2>;
status = "okay";
};

&ic11 {
pll-src = <1>;
ic-div = <3>;
status = "okay";
};

&perck {
clocks = <&rcc STM32_SRC_HSI PER_SEL(0)>;
status = "okay";
};

&cpusw {
clocks = <&rcc STM32_SRC_IC1 CPU_SEL(3)>;
clock-frequency = <DT_FREQ_M(600)>;
status = "okay";
};

&rcc {
/* ic2, ic6 & ic11 must all be enabled to set ic2 as SYSCLK */
clocks = <&ic2>;
clock-frequency = <DT_FREQ_M(400)>;
ahb-prescaler = <2>;
apb1-prescaler = <1>;
apb2-prescaler = <1>;
apb4-prescaler = <1>;
apb5-prescaler = <1>;
};

&usart1 {
clocks = <&rcc STM32_CLOCK(APB2, 4)>,
<&rcc STM32_SRC_CKPER USART1_SEL(1)>;
pinctrl-0 = <&usart1_tx_pe5 &usart1_rx_pe6>;
pinctrl-names = "default";
current-speed = <115200>;
status = "okay";
};
14 changes: 14 additions & 0 deletions boards/st/nucleo_n657x0_q/nucleo_n657x0_q.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
identifier: nucleo_n657x0_q
name: ST Nucleo N657X0-Q
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
ram: 1024
flash: 0
supported:
- gpio
- uart
vendor: st
15 changes: 15 additions & 0 deletions boards/st/nucleo_n657x0_q/nucleo_n657x0_q_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 STMicroelectronics

# Enable UART driver
CONFIG_SERIAL=y

# Enable GPIO
CONFIG_GPIO=y

# Console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# No internal Flash
CONFIG_XIP=n
5 changes: 5 additions & 0 deletions boards/st/stm32n6570_dk/Kconfig.stm32n6570_dk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2024 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0

config BOARD_STM32N6570_DK
select SOC_STM32N657XX
9 changes: 9 additions & 0 deletions boards/st/stm32n6570_dk/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) 2024 STMicroelectronics

board_runner_args(stm32cubeprogrammer "--port=swd")
board_runner_args(stm32cubeprogrammer "--tool-opt= mode=HOTPLUG ap=1")
board_runner_args(stm32cubeprogrammer "--extload=MX66UW1G45G_STM32N6570-DK.stldr")
board_runner_args(stm32cubeprogrammer "--download-address=0x70000000")

include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
6 changes: 6 additions & 0 deletions boards/st/stm32n6570_dk/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: stm32n6570_dk
full_name: STM32N6570-DK
vendor: st
socs:
- name: stm32n657xx
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading