Skip to content

Commit

Permalink
boards: arm: stm32: basic support for STM32F769I-DISCO board
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jinyongiot authored and galak committed Jul 6, 2018
1 parent 8776835 commit cc5ae49
Show file tree
Hide file tree
Showing 12 changed files with 418 additions and 0 deletions.
3 changes: 3 additions & 0 deletions boards/arm/stm32f769i_disco/CMakeLists.txt
@@ -0,0 +1,3 @@
zephyr_library()
zephyr_library_sources(pinmux.c)
zephyr_library_include_directories(${PROJECT_SOURCE_DIR}/drivers)
10 changes: 10 additions & 0 deletions boards/arm/stm32f769i_disco/Kconfig.board
@@ -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 changes: 20 additions & 0 deletions boards/arm/stm32f769i_disco/Kconfig.defconfig
@@ -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 change: 1 addition & 0 deletions boards/arm/stm32f769i_disco/board.cmake
@@ -0,0 +1 @@
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
13 changes: 13 additions & 0 deletions boards/arm/stm32f769i_disco/board.h
@@ -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 */
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
212 changes: 212 additions & 0 deletions boards/arm/stm32f769i_disco/doc/stm32f769i_disco.rst
@@ -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 changes: 37 additions & 0 deletions boards/arm/stm32f769i_disco/pinmux.c
@@ -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 changes: 67 additions & 0 deletions boards/arm/stm32f769i_disco/stm32f769i_disco.dts
@@ -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 changes: 7 additions & 0 deletions boards/arm/stm32f769i_disco/stm32f769i_disco.yaml
@@ -0,0 +1,7 @@
identifier: stm32f769i_disco
name: STM32F769IDISCOVERY
type: mcu
arch: arm
toolchain:
- zephyr
- gccarmemb

0 comments on commit cc5ae49

Please sign in to comment.