March 2017 DocID030055 Rev 1 1/75
1
UM2145
User manual
STM32CubeL4 demonstration firmware
for 32L496GDISCOVERY kit
Introduction
STMCube
TM
is an STMicroelectronics original initiative to make developers’ lives easier by
reducing development effort, time and cost. The STM32Cube covers the whole STM32
portfolio.
STM32Cube Version 1.x includes:
T
he STM32CubeMX, a graphical software configuration tool that allows the generation of
C initialization code using graphical wizards.
A comprehensive embedded software platform, delivered per series (such as
STM32CubeL4 for STM32L4 series)
The STM32CubeL4 HAL, STM32 abstraction layer embedded software ensuring
maximized portability across the STM32 portfolio.
Low Layer APIs (LL) offering a fast light-weight expert-oriented layer which is closer
to the hardware than the HAL. LL APIs are available only for a set of peripherals.
A consistent set of middleware components such as RTOS, USB, FatFS, graphics.
All embedded software utilities delivered with a full set of examples.
The STM32CubeL4 32L496GDISCOVERY demonstra
tion platform is built around the
STM32Cube HAL, BSP and RTOS middleware components.
This evaluation board is suitable hardware to evaluate STM32L4 ultra-low-power solutions
and audio/graphic c
apabilities thanks to a capacitive touchscreen LCD-glass display, two
microphones, a joystick, external PSRAM and Quad-SPI Flash memories, an ST-LINK/V2
debugger/programmer and an STM32L496AG microcontroller.
The architecture was defined with the goal of
making from the STM32CubeL4
32L496GDISCOVERY demonstration core an independent central component, which can
be used with several RTOS and third party firmware libraries through several abstraction
layers inserted between the STM32CubeL4 32L496GDISCOVERY demonstration core and
the several modules and libraries working around it.
The STM32CubeL4 32L496GDISCOVERY demonstra
tion supports STM32L496xx devices
and runs on the 32L496GDISCOVERY board.
www.st.com
Contents UM2145
2/75 DocID030055 Rev 1
Contents
1 STM32CubeL4 main features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Getting started with the demonstration . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Hardware requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1.1 Hardware configuration to run the demonstration firmware . . . . . . . . . . . 9
3 Demonstration firmware package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.1 Demonstration repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
3.2 Demonstration architecture overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.3 32L496GDISCOVERY board BSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4 Demonstration functional description . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1 Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1.1 SD card compulsory usage and content . . . . . . . . . . . . . . . . . . . . . . . . 16
4.1.2 Touchscreen calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.2 STemWin graphic demonstration modules . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.1 Audio Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.2.2 Audio Recorder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2.3 Video module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4.2.4 Analog clock module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.5 USB devices module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2.6 IDD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.2.7 System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.2.8 STemWin demo exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3 Embedded Wizard graphic demonstration modules . . . . . . . . . . . . . . . . . 29
4.3.1 Watch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.3.2 Running . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3.3 Info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3.4 Enabling/Disabling Chrom-ART (DMA2D) . . . . . . . . . . . . . . . . . . . . . . . 35
4.3.5 Embedded Wizard demo exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.4 TouchGFX graphic demonstration modules . . . . . . . . . . . . . . . . . . . . . . . 36
4.4.1 Lite versus Full TouchGFX demos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.4.2 Entering TouchGFX demo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.4.3 TouchGFX menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37