Skip to content

STM32L496G-DISCO

Support for the STM32L496G-DISCO board.

Overview

The ST STM32L496G-DISCO is an evaluation board with the ARM Cortex-M4 based ultra-low power microcontroller STM32L496AG with 320KB of RAM and 1MB of ROM Flash.

The main features of this board are:

  • 1.54 RGB 240 x 240 pixel TFT color LCD display with capacitive touch screen,
  • SAI audio codec, with stereo output, including analog microphone input
  • Stereo digital microphones
  • 8-Mbit external PSRAM
  • 64-Mbit external QSPI flash
  • USB OTG FS port
  • 8-bit camera interface
  • Stereo headset jack
  • micso-SD card connector

Current Hardware Support:

FeatureSupportRemark
ADCX8 channels
DACX1 or 2 channels
I2CX2 devices (I2C1 and I2C2)
PWMX3 devices with a total og 6 channels
SPIX1 or 2 devices (SPI1 and SPI2)
TimersX2 devices (TIM2 and TIM3)
UARTX3 devices (USART2, LPUART1 and USART1)
USB OTG FSX1 device
TFT color LCD 240 x 40-ST7789H2 used as driver IC (not supported yet)
Capacitive Touch Screen-FT3267 used as driver IC (not supported yet)
Stereo microphones-
SAI audio codec-
External PSRAMxConnected to FMC peripheral
External Quad-SPI Flash-QSPI peripheral is not yet supported
SD Card Interface-SDMMC1 on PC8..PC13/PD2

Board Configuration (sorted by peripheral):

RIOT PeripheralGPIOConnector pinRemark
ADC_LINE(0)PC4Arduino A0ADC1 IN13
ADC_LINE(1)PC1Arduino A1ADC1 IN2
ADC_LINE(2)PC3Arduino A2ADC1 IN4
ADC_LINE(3)PF10Arduino A3ADC3 IN13
ADC_LINE(4)PA1Arduino A4ADC1 IN6
ADC_LINE(5)PC0Arduino A5ADC2 IN13
ADC_LINE(6)-V_REF_INTADC1 IN0 connected to V_REFINT
ADC_LINE(7)PA4STmod+ ADCADC1 IN9 if periph_dac is not used
ADC_LINE(7)--ADC2 IN17 connected to DAC1 if periph_dac is used
DAC_LINE(0)PA4STmod+ ADCDAC1 if periph_dac is used
DAC_LINE(1)PA5Arduino D13DAC2 if periph_spi is not used
I2C_DEV(0) SCLPB8Arduino D15I2C1 SCL, also connected to STmod+ SCL
I2C_DEV(0) SDAPB7Arduino D14I2C1 SDA, also connected to STmod+ SDA
I2C_DEV(1) SCLPH14-I2C2 SCL, used for MFX_x, CODEC_x, CTP_x, DCMI_x
I2C_DEV(1) SDAPB14-I2C2 SDA, used for MFX_x, CODEC_x, CTP_x, DCMI_x
PWM_DEV(0) CH0PH15Arduino D3TIM8_CH3N
PWM_DEV(0) CH1PI6Arduino D6TIM8_CH2
PWM_DEV(0) CH2PH13Arduino D9TIM8_CH1N
PWM_DEV(1) CH0PB9Arduino D5TIM4_CH4
PWM_DEV(2) CH0PA0STmod+ PWMTIM5_CH1
SPI_DEV(0) SCKPA5Arduino D13SPI1 SCK
SPI_DEV(0) MISOPB4Arduino D12SPI1 MISO
SPI_DEV(0) MOSIPB5Arduino D11SPI1 MOSI
SPI_DEV(0) CSPA15Arduino D10SPI1 NSS
SPI_DEV(1) SCKPI1STmod+ CLK, Pmod CLKSPI2 SCK (*1)
SPI_DEV(1) MISOPI2STmod+ MISO, Pmod MISOSPI2 MISO (*1)
SPI_DEV(1) MOSIPB15STmod+ MOSI, Pmod MOSISPI2 MOSI (*1)
SPI_DEV(1) CSPG1STmod+ CS, Pmod CSSPI2 NSS (*1)
UART_DEV(0) RXPD6ST-LinkUSART2 RX
UART_DEV(0) TXPA2ST-LinkUSART2 TX
UART_DEV(1) RXPD6Arduino D0LPUART1 RX
UART_DEV(1) TXPA2Arduino D1LPUART1 TX
UART_DEV(2) RXPG10STmod+ RX, Pmod RXUSART1 RX (*2)
UART_DEV(2) TXPB6STmod+ TX, Pmod TXUSART1 TX (*2)
UART_DEV(2) CTSPG11STmod+ CTS, Pmod CTSUSART1 CTS (*2)
UART_DEV(2) RTSPG12STmod+ RTS, Pmod RTSUSART1 RTS (*2)

@note

  • (*1) SPI2 is only available if module periph_spi_stmod is used. SB4, SB5, SB9 must be closed to connect SPI2 to STmod+ and Pmod.
  • (*2) USART1 is only available if module periph_spi_stmod is not used. SB6, SB7, SB8 must be closed to connect USART1 to STmod+ and Pmod (default).

Board Configuration (sorted by connectors):

ConnectorRIOT PeripheralGPIORemark
Arduino A0ADC_LINE(0)PC4ADC1 IN13
Arduino A1ADC_LINE(1)PC1ADC1 IN2
Arduino A2ADC_LINE(2)PC3ADC1 IN4
Arduino A3ADC_LINE(3)PF10ADC3 IN13
Arduino A4ADC_LINE(4)PA1ADC1 IN6
Arduino A5ADC_LINE(5)PC0ADC2 IN13
Arduino D0UART_DEV(1) RXPD6LPUART1 RX
Arduino D1UART_DEV(1) TXPA2LPUART1 TX
Arduino D3PWM_DEV(0) CH0PH15TIM8_CH3N
Arduino D6PWM_DEV(0) CH1PI6TIM8_CH2
Arduino D5PWM_DEV(1) CH0PB9TIM4_CH4
Arduino D9PWM_DEV(0) CH2PH13TIM8_CH1N
Arduino D10SPI_DEV(0) CSPA15SPI1 CS
Arduino D11SPI_DEV(0) MOSIPB5SPI1 MOSI
Arduino D12SPI_DEV(0) MISOPB4SPI1 MISO
Arduino D13SPI_DEV(0) SCKPA5SPI1 SCK
Arduino D13DAC_LINE(1)PA5DAC2 if periph_spi is not used
Arduino D14I2C_DEV(0) SDAPB7I2C1 SDA
Arduino D15I2C_DEV(0) SCLPB8I2C1 SCL
Pmod SPI CLKSPI_DEV(1) SCKPI1SPI2 SCK (*1)
Pmod SPI CSSPI_DEV(4) CSPG1SPI2 NSS (*1)
Pmod SPI MISOSPI_DEV(2) MISOPI2SPI2 MISO (*1)
Pmod SPI MOSISPI_DEV(3) MOSIPB15SPI2 MOSI (*1)
Pmod UART CTSUART_DEV(2) CTSPG11USART1 CTS (*2)
Pmod UART RTSUART_DEV(2) RTSPG12USART1 RTS (*2)
Pmod UART RXUART_DEV(2) RXPG10USART1 RX (*2)
Pmod UART TXUART_DEV(2) TXPB6USART1 TX (*2)
STmod+ ADCADC_LINE(7)PA4ADC1 IN9 if periph_dac is not used
STmod+ ADCDAC_LINE(0)PA4DAC1 if periph_dac is used
STmod+ PWMPWM_DEV(2) CH0PA0TIM5_CH1
STmod+ I2C SCLI2C_DEV(0) SCLPB8I2C2 SCL
STmod+ I2C SDAI2C_DEV(0) SDAPB7I2C2 SDA
STmod+ SPI CLKSPI_DEV(1) SCKPI1SPI2 SCK (*1)
STmod+ SPI CSSPI_DEV(1) CSPG1SPI2 NSS (*1)
STmod+ SPI MISOSPI_DEV(1) MISOPI2SPI2 MISO (*1)
STmod+ SPI MOSISPI_DEV(1) MOSIPB15SPI2 MOSI (*1)
STmod+ UART CTSUART_DEV(2) CTSPG11USART1 CTS (*2)
STmod+ UART RTSUART_DEV(2) RTSPG12USART1 RTS (*2)
STmod+ UART RXUART_DEV(2) RXPG10USART1 RX (*2)
STmod+ UART TXUART_DEV(2) TXPB6USART1 TX (*2)
ST-LinkUART_DEV(0) RXPD6USART2 RX
ST-LinkUART_DEV(0) TXPA2USART2 TX

@note

  • (*1) SPI2 is only available if module periph_spi_stmod is used. SB4, SB5, SB9 must be closed to connect SPI2 to STmod+ and Pmod.
  • (*2) USART1 is only available if module periph_spi_stmod is not used. SB6, SB7, SB8 must be closed to connect USART1 to STmod+ and Pmod (default).

Flashing the device

The STM32L496G-DISCO board includes an on-board ST-LINK programmer and can be flashed using OpenOCD. The board can be flashed with:

make BOARD=stm32l496g-disco flash

and debug via GDB with

make BOARD=stm32l496g-disco debug

Supported Toolchains

For using the STM32L496G-DISCO board we recommend the usage of the GNU Tools for ARM Embedded Processors toolchain.