boards: arm: stm32: basic support for STM32F769I-DISCO board
This patch adds basic support and for the STM32F769I-DISCO board with GPIO, USART support. Two USARTs are enabled.The GPIOs are configured for the 4 LEDs and one button on the board. Signed-off-by: Yong Jin <jinyong.iot@foxmail.com>
This commit is contained in:
parent
8776835bd6
commit
cc5ae49133
3
boards/arm/stm32f769i_disco/CMakeLists.txt
Normal file
3
boards/arm/stm32f769i_disco/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
zephyr_library()
|
||||
zephyr_library_sources(pinmux.c)
|
||||
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
|
10
boards/arm/stm32f769i_disco/Kconfig.board
Normal file
10
boards/arm/stm32f769i_disco/Kconfig.board
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Kconfig - STM32F769I Discovery board configuration
|
||||
#
|
||||
# Copyright (c) 2018 Yong Jin
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
config BOARD_STM32F769I_DISCO
|
||||
bool "STM32F769I Discovery Development Board"
|
||||
depends on SOC_STM32F769XI
|
20
boards/arm/stm32f769i_disco/Kconfig.defconfig
Normal file
20
boards/arm/stm32f769i_disco/Kconfig.defconfig
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Kconfig - STM32F769I DISCOVERY board configuration
|
||||
#
|
||||
# Copyright (c) 2018 Yong Jin
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
if BOARD_STM32F769I_DISCO
|
||||
|
||||
config BOARD
|
||||
default "stm32f769i_disco"
|
||||
|
||||
if UART_CONSOLE
|
||||
|
||||
config UART_STM32_PORT_1
|
||||
default y
|
||||
|
||||
endif # UART_CONSOLE
|
||||
|
||||
endif # BOARD_STM32F769I_DISCO
|
1
boards/arm/stm32f769i_disco/board.cmake
Normal file
1
boards/arm/stm32f769i_disco/board.cmake
Normal file
|
@ -0,0 +1 @@
|
|||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
|
13
boards/arm/stm32f769i_disco/board.h
Normal file
13
boards/arm/stm32f769i_disco/board.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Yong Jin
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef __INC_BOARD_H
|
||||
#define __INC_BOARD_H
|
||||
|
||||
|
||||
#include <soc.h>
|
||||
|
||||
#endif /* __INC_BOARD_H */
|
BIN
boards/arm/stm32f769i_disco/doc/img/en.stm32f769i-disco.jpg
Normal file
BIN
boards/arm/stm32f769i_disco/doc/img/en.stm32f769i-disco.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 80 KiB |
212
boards/arm/stm32f769i_disco/doc/stm32f769i_disco.rst
Normal file
212
boards/arm/stm32f769i_disco/doc/stm32f769i_disco.rst
Normal file
|
@ -0,0 +1,212 @@
|
|||
.. _stm32f769i_disco_board:
|
||||
|
||||
ST STM32F769I Discovery
|
||||
#######################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
The discovery kit enables a wide diversity of applications taking benefit
|
||||
from audio, multi-sensor support, graphics, security, security, video,
|
||||
and high-speed connectivity features. Important board features include:
|
||||
|
||||
- STM32F769NIH6 microcontroller featuring 2 Mbytes of Flash memory and 512 Kbytes of RAM, in BGA216 package
|
||||
- On-board ST-LINK/V2-1 supporting USB reenumeration capability
|
||||
- USB ST-LINK functions: virtual COM port, mass storage, debug port
|
||||
- Five power supply options:
|
||||
|
||||
- ST LINK/V2-1
|
||||
- USB HS connector
|
||||
- 5 V from RJ45 (Power Over Ethernet)
|
||||
- 5 V from Arduino™ or external connector
|
||||
- USB charger
|
||||
|
||||
- 4-inch capacitive touch LCD display with MIPI-DSI connector
|
||||
- SAI audio codec
|
||||
- Two audio line jacks, one for input and one for output
|
||||
- Stereo speaker outputs
|
||||
- Four ST MEMS microphones on DFSDM inputs
|
||||
- Two SPDIF RCA input and output connectors
|
||||
- Two push-buttons (user and reset)
|
||||
- 512-Mbit Quad-SPI Flash memory
|
||||
- 128-Mbit SDRAM
|
||||
- Connector for microSD card
|
||||
- Wi-Fi or Ext-EEP daughterboard connector
|
||||
- USB OTG HS with Micro-AB connector
|
||||
- Ethernet connector compliant with IEEE-802.3-2002
|
||||
- Power Over Ethernet based on IEEE 802.3af (Powered Device, 48 V to 5 V, 3 W)
|
||||
- Power supply output for external applications: 3.3 V or 5 V
|
||||
- Arduino Uno V3 connectors
|
||||
- Comprehensive free software including a variety of examples, part of the STM32Cube package
|
||||
- Supported by a wide choice of integrated development environments
|
||||
|
||||
.. image:: img/en.stm32f769i-disco.jpg
|
||||
:width: 500px
|
||||
:align: center
|
||||
:height: 260px
|
||||
:alt: STM32F769I-DISCO
|
||||
|
||||
More information about the board can be found at the `32F769I-DISCO website`_.
|
||||
|
||||
Hardware
|
||||
********
|
||||
|
||||
The STM32F769I Discovery kit provides the following hardware components:
|
||||
|
||||
- STM32F769NIH6 in BGA216 package
|
||||
- ARM |reg| 32-bit Cortex |reg| -M7 CPU with FPU
|
||||
- 216 MHz max CPU frequency
|
||||
- VDD from 1.7 V to 3.6 V
|
||||
- 2 MB Flash
|
||||
- 512 + 16 + 4 KB SRAM
|
||||
- Flexible external memory controller with up to 32-bit data bus
|
||||
- Dual mode Quad-SPI
|
||||
- Chrom-ART Accelerator(DMA2D), graphical hardware accelerator enabling enhanced graphical user interface
|
||||
- Hardware JPEG codec
|
||||
- LCD-TFT controller supporting up to XGA resolution
|
||||
- MIPI |reg| DSI host controller supporting up to 720p 30Hz resolution
|
||||
- 3x12-bit ADC with 24 channels
|
||||
- 2x12-bit D/A converters
|
||||
- DMA Controller
|
||||
- General Purpose Timers (15)
|
||||
- Watchdog Timers (2)
|
||||
- I2C (4)
|
||||
- USART/UART (8)
|
||||
- SPI (6)
|
||||
- SAI (2)
|
||||
- CAN (3)
|
||||
- SDMMC (2)
|
||||
- SPDIFRX interface
|
||||
- HDMI-CEC
|
||||
- MDIO slave interface
|
||||
- USB 2.0 full-speed device/host/OTG controller with on-chip PHY
|
||||
- USB 2.0 high-speed/full-speed device/host/OTG controller with dedicated DMA, on-chip full-speed PHY and ULPI
|
||||
- 10/100 Ethernet MAC with dedicated DMA: supports IEEE 1588v2 hardware, MII/RMII
|
||||
- 8- to 14-bit camera interface up to 54 Mbyte/s
|
||||
- True random number generator
|
||||
- CRC calculation unit
|
||||
- RTC: subsecond accuracy, hardware calendar
|
||||
- 96-bit unique ID
|
||||
|
||||
More information about STM32F769NIH6 can be found here:
|
||||
|
||||
- `STM32F769NIH6 on www.st.com`_
|
||||
- `STM32F76xxx reference manual`_
|
||||
|
||||
Supported Features
|
||||
==================
|
||||
|
||||
The Zephyr stm32f769i_disco board configuration supports the following hardware features:
|
||||
|
||||
+-----------+------------+-------------------------------------+
|
||||
| Interface | Controller | Driver/Component |
|
||||
+===========+============+=====================================+
|
||||
| NVIC | on-chip | nested vector interrupt controller |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| UART | on-chip | serial port-polling; |
|
||||
| | | serial port-interrupt |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| PINMUX | on-chip | pinmux |
|
||||
+-----------+------------+-------------------------------------+
|
||||
| GPIO | on-chip | gpio |
|
||||
+-----------+------------+-------------------------------------+
|
||||
|
||||
Other hardware features are not yet supported on Zephyr porting.
|
||||
|
||||
The default configuration can be found in the defconfig file:
|
||||
``boards/arm/stm32f769i_disco/stm32f769i_disco_defconfig``
|
||||
|
||||
Pin Mapping
|
||||
===========
|
||||
|
||||
STM32F769I Discovery kit has 9 GPIO controllers. These controllers are responsible for pin muxing,
|
||||
input/output, pull-up, etc.
|
||||
|
||||
For mode details please refer to `32F769I-DISCO board User Manual`_.
|
||||
|
||||
Default Zephyr Peripheral Mapping:
|
||||
----------------------------------
|
||||
- UART_1_TX : PA9
|
||||
- UART_1_RX : PA10
|
||||
- UART_6_TX : PC6
|
||||
- UART_6_RX : PC7
|
||||
- LD1 : PJ13
|
||||
- LD2 : PJ5
|
||||
- LD3 : PA12
|
||||
- LD4 : PD4
|
||||
|
||||
System Clock
|
||||
============
|
||||
|
||||
The STM32F769I System Clock can be driven by an internal or external oscillator,
|
||||
as well as by the main PLL clock. By default, the System clock is driven by the PLL
|
||||
clock at 216MHz, driven by a 25MHz high speed external clock.
|
||||
|
||||
Serial Port
|
||||
===========
|
||||
|
||||
The STM32F769I Discovery kit has up to 8 UARTs. The Zephyr console output is assigned to UART1
|
||||
which connected to the onboard ST-LINK/V2 Virtual COM port interface. Default communication
|
||||
settings are 115200 8N1.
|
||||
|
||||
Programming and Debugging
|
||||
*************************
|
||||
|
||||
Applications for the ``stm32f769i_disco`` board configuration can be built and
|
||||
flashed in the usual way (see :ref:`build_an_application` and
|
||||
:ref:`application_run` for more details).
|
||||
|
||||
Flashing
|
||||
========
|
||||
|
||||
STM32F769I Discovery kit includes an ST-LINK/V2 embedded debug tool interface.
|
||||
This interface is supported by the openocd version included in the Zephyr SDK.
|
||||
|
||||
Flashing an application to STM32F769I
|
||||
-------------------------------------------
|
||||
|
||||
First, connect the STM32F769I Discovery kit to your host computer using
|
||||
the USB port to prepare it for flashing. Then build and flash your application.
|
||||
|
||||
Here is an example for the :ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: stm32f769i_disco
|
||||
:goals: build flash
|
||||
|
||||
Run a serial host program to connect with your board:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ minicom -D /dev/ttyACM0
|
||||
|
||||
You should see the following message on the console:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Hello World! arm
|
||||
|
||||
Debugging
|
||||
=========
|
||||
|
||||
You can debug an application in the usual way. Here is an example for the
|
||||
:ref:`hello_world` application.
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/hello_world
|
||||
:board: stm32f769i_disco
|
||||
:goals: debug
|
||||
|
||||
|
||||
.. _32F769I-DISCO website:
|
||||
http://www.st.com/en/evaluation-tools/32f769idiscovery.html
|
||||
|
||||
.. _32F769I-DISCO board User Manual:
|
||||
http://www.st.com/resource/en/user_manual/dm00276557.pdf
|
||||
|
||||
.. _STM32F769NIH6 on www.st.com:
|
||||
https://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32f7-series/stm32f7x9/stm32f769ni.html
|
||||
|
||||
.. _STM32F76xxx reference manual:
|
||||
http://www.st.com/resource/en/reference_manual/dm00224583.pdf
|
37
boards/arm/stm32f769i_disco/pinmux.c
Normal file
37
boards/arm/stm32f769i_disco/pinmux.c
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Yong Jin
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <device.h>
|
||||
#include <init.h>
|
||||
#include <pinmux.h>
|
||||
#include <sys_io.h>
|
||||
|
||||
#include <pinmux/stm32/pinmux_stm32.h>
|
||||
|
||||
/* pin assignments for STM32F769I-DISCO board */
|
||||
static const struct pin_config pinconf[] = {
|
||||
#ifdef CONFIG_UART_STM32_PORT_1
|
||||
{STM32_PIN_PA9, STM32F7_PINMUX_FUNC_PA9_USART1_TX},
|
||||
{STM32_PIN_PA10, STM32F7_PINMUX_FUNC_PA10_USART1_RX},
|
||||
#endif /* CONFIG_UART_STM32_PORT_1 */
|
||||
#ifdef CONFIG_UART_STM32_PORT_6
|
||||
{STM32_PIN_PC6, STM32F7_PINMUX_FUNC_PC6_USART6_TX},
|
||||
{STM32_PIN_PC7, STM32F7_PINMUX_FUNC_PC7_USART6_RX},
|
||||
#endif /* CONFIG_UART_STM32_PORT_6 */
|
||||
};
|
||||
|
||||
static int pinmux_stm32_init(struct device *port)
|
||||
{
|
||||
ARG_UNUSED(port);
|
||||
|
||||
stm32_setup_pins(pinconf, ARRAY_SIZE(pinconf));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(pinmux_stm32_init, PRE_KERNEL_1,
|
||||
CONFIG_PINMUX_STM32_DEVICE_INITIALIZATION_PRIORITY);
|
67
boards/arm/stm32f769i_disco/stm32f769i_disco.dts
Normal file
67
boards/arm/stm32f769i_disco/stm32f769i_disco.dts
Normal file
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright (c) 2018 Yong Jin
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <st/stm32f769.dtsi>
|
||||
|
||||
/ {
|
||||
model = "STMicroelectronics STM32F769I DISCOVERY board";
|
||||
compatible = "st,stm32f769I-disco", "st,stm32f769";
|
||||
|
||||
chosen {
|
||||
zephyr,console = &usart1;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
red_led_1:led@0 {
|
||||
gpios = <&gpioj 13 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "User LD1";
|
||||
};
|
||||
green_led_2:led@1 {
|
||||
gpios = <&gpioj 5 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "User LD2";
|
||||
};
|
||||
green_led_3:led@2 {
|
||||
gpios = <&gpioa 12 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "User LD3";
|
||||
};
|
||||
red_led_4:led@3 {
|
||||
gpios = <&gpiod 4 GPIO_INT_ACTIVE_HIGH>;
|
||||
label = "User LD4";
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
user_button: button@0 {
|
||||
label = "User";
|
||||
gpios = <&gpioa 0 GPIO_INT_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
aliases {
|
||||
led0 = &red_led_1;
|
||||
led1 = &green_led_2;
|
||||
led2 = &green_led_3;
|
||||
led3 = &red_led_4;
|
||||
sw0 = &user_button;
|
||||
};
|
||||
};
|
||||
|
||||
&usart1 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&usart6 {
|
||||
current-speed = <115200>;
|
||||
pinctrl-names = "default";
|
||||
status = "ok";
|
||||
};
|
7
boards/arm/stm32f769i_disco/stm32f769i_disco.yaml
Normal file
7
boards/arm/stm32f769i_disco/stm32f769i_disco.yaml
Normal file
|
@ -0,0 +1,7 @@
|
|||
identifier: stm32f769i_disco
|
||||
name: STM32F769IDISCOVERY
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gccarmemb
|
36
boards/arm/stm32f769i_disco/stm32f769i_disco_defconfig
Normal file
36
boards/arm/stm32f769i_disco/stm32f769i_disco_defconfig
Normal file
|
@ -0,0 +1,36 @@
|
|||
CONFIG_ARM=y
|
||||
CONFIG_BOARD_STM32F769I_DISCO=y
|
||||
CONFIG_SOC_SERIES_STM32F7X=y
|
||||
CONFIG_SOC_STM32F769XI=y
|
||||
# 216MHz system clock
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=216000000
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
||||
|
||||
CONFIG_SERIAL=y
|
||||
|
||||
# console
|
||||
CONFIG_CONSOLE=y
|
||||
CONFIG_UART_CONSOLE=y
|
||||
|
||||
# enable pinmux
|
||||
CONFIG_PINMUX=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# clock configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
# Clock configuration for Cube Clock control driver
|
||||
CONFIG_CLOCK_STM32_HSE_CLOCK=25000000
|
||||
CONFIG_CLOCK_STM32_SYSCLK_SRC_PLL=y
|
||||
# use HSE as PLL input
|
||||
CONFIG_CLOCK_STM32_PLL_SRC_HSE=y
|
||||
# produce 216MHz clock at PLL output
|
||||
CONFIG_CLOCK_STM32_PLL_M_DIVISOR=25
|
||||
CONFIG_CLOCK_STM32_PLL_N_MULTIPLIER=432
|
||||
CONFIG_CLOCK_STM32_PLL_P_DIVISOR=2
|
||||
CONFIG_CLOCK_STM32_PLL_Q_DIVISOR=9
|
||||
CONFIG_CLOCK_STM32_AHB_PRESCALER=1
|
||||
CONFIG_CLOCK_STM32_APB1_PRESCALER=4
|
||||
CONFIG_CLOCK_STM32_APB2_PRESCALER=2
|
12
boards/arm/stm32f769i_disco/support/openocd.cfg
Normal file
12
boards/arm/stm32f769i_disco/support/openocd.cfg
Normal file
|
@ -0,0 +1,12 @@
|
|||
source [find board/stm32f7discovery.cfg]
|
||||
|
||||
$_TARGETNAME configure -event gdb-attach {
|
||||
echo "Debugger attaching: halting execution"
|
||||
reset halt
|
||||
gdb_breakpoint_override hard
|
||||
}
|
||||
|
||||
$_TARGETNAME configure -event gdb-detach {
|
||||
echo "Debugger detaching: resuming execution"
|
||||
resume
|
||||
}
|
Loading…
Reference in a new issue