STM32L476-DISCO Platform HAL


CYGPKG_HAL_CORTEXM_STM32_STM32L476_DISCO -- eCos Support for the STM32L476-DISCO Board


This documentation describes the platform-specific elements of the ST STM32L476 board support within eCos. It should be read in conjunction with the STM32 variant HAL section, which covers the common functionality shared by all STM32 variants, including eCos HAL features and on-chip device support.

The board is equipped with an on-board ST-LINK/V2 hardware debugger interface (via the CN1 “USB ST-LINK” connector), which is typically used for eCos application development.

Supported Hardware

The STM32L476VG has two main on-chip memory regions. The device has a SRAM region of 96KiB present at 0x20000000, and a 1MiB FLASH region present at 0x08000000 (which is aliased to 0x00000000 during normal execution). A 128Mbit N25Q SPI flash device it available through the QSPI controller.

The STM32 variant HAL includes support for the six on-chip serial devices. These consist of three USARTs, two UARTs and a LPUART. These are all supported by a common driver and are documented in the variant HAL. However, the STM32L476-DISCO motherboard has no direct UART connectors. It is possible to use USART1 on PIO pins PB6 and PB7 which are connected to pins 15 and 16 of the P1 header.

The STM32 variant HAL also includes support for the I²C buses. A number of I²C devices are present on the board, but none are currently supported by eCosPro. Connections for external I²C devices on bus 1 can be made either via the CN2 I²C extension connector or pins 15 and 16 of P1. Note that these are the same pins as used by USART1, so these two devices cannot be used simultaneously.

Similarly the STM32 variant HAL includes support for the SPI buses. There are a number of SPI devices on the board, but none are currently supported by eCosPro. External access to SPI bus 1 can be had via P2 header pins 15 to 18 which are connected to PIO pins PE12-15. However, these pins are also used for the QSPI memory, so it is not possible to use SPI and QSPI simultaneously.

Device drivers are also provided for the STM32 on-chip, ADC devices. There are no usable analog inputs on the board, only the internal sources are generally available. Only a limited number of PIO pins that connect to the ADCs are accessible. These are mainly limited to PA0-3 and PA5 on the P1 header, which are shared with the joystick switch. If the LCD is removed then further pins are accessible via the socket.

Additionally, support is provided for the on-chip watchdog, RTC (wallclock) and a Flash driver exists to permit management of the STM32's on-chip Flash.

The STM32L4 processor and the STM32L476-DISCO board provide a wide variety of peripherals, but unless support is specifically indicated, it should be assumed that it is not included.


The board port is intended to work with GNU tools configured for an arm-eabi target. The original port was done using arm-eabi-gcc version 4.7.3j, arm-eabi-gdb version 7.8.2, and binutils version 2.23.2.

Documentation license for this page: eCosPro License