CYGPKG_HAL_CORTEXM_STM32_STM32L4R9_DISCO — eCos Support for the STM32L4R9-DISCO Board


This documentation describes the platform-specific elements of the ST STM32L4R9I_DISCO 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 interface, which is typically used for eCos application development. There is also a TAG connector (CN8) available for a direct SWD debug connection.

Supported Hardware

The STM32L4R9AI has two main on-chip memory regions. The device has a SRAM region of 640KiB present at 0x20000000, and a 2MiB FLASH region present at 0x08000000 (which is aliased to 0x00000000 during normal execution). A 512Mbit MX25LM51245G Octo SPI flash device is available through the OCTOSPI controller. A 16Mbit PSRAM device provides an off-chip RAM area after the initialisaton of the system (the MFX I/O expander is used to configure the H/W appropriately).

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 STM32L4R9-DISCO motherboard only makes use of two of these. USART2 is routed to the on-board ST-Link and presented as a CDC-ACM device on the CN13 USB connector. USART3 is routed to the DSI with its hardware RTS/CTS flow control lines.

The STM32 variant HAL also includes support for the I²C buses. Support is provided for the on-board MFX I/O expander and audio codec I²C devices, with both being on bus 1. The descriptors are exported in the normal way via <cyg/io/i2c.h>, with the respective names hal_st_mfx and hal_stm32l4r9_disco_cs42l51.

Similarly the STM32 variant HAL includes support for the SPI buses. Though the board does not provide any SPI devices as standard.

Device drivers are also provided for the STM32 on-chip, ADC devices. The internal channels are available, with some I/O pins on the connectors available for analog input.

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 and the off-chip Quad SPI NOR flash.

The STM32L4 processor and the STM32L4R9-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 7.3.0c, arm-eabi-gdb version 8.1, and binutils version 2.23.2.