STM32L4R9 Discovery
Contents
QSPI Flash Programming Support
Before continuing with this article, please read the generic article about QSPI flash programming support on STM32L4 devices (STM32L4Rxxx / STM32L4Sxxx (Q)SPI support).
Example implementation
As described in the generic article, the reference flash algorithm is based on our internal SPIFI Lib that is part of the JLinkARM.dll. For adaption to other pin configs an openflashloader will be provided. For further information regarding the Open Flashloader and how to use the JLinkDevices.xml file, please refer to the Openflashloader Wiki article (Open Flashloader).
Quad-SPI Interface Pins
The ST STM32L4R9 Discovery uses the following port pins to interface the (Q)SPI flash.
Alternate function | Port / Pin |
---|---|
QSPI_CLK | PG12 |
QSPI_CS | PI6 |
QSPI_D0 | PI11 |
QSPI_D1 | PI10 |
QSPI_D2 | PI9 |
QSPI_D3 | PH8 |
JLinkDevices.xml
<Database> <Device> <ChipInfo Vendor="ST" Name="STM32L4R9AI" Core="JLINK_CORE_CORTEX_M4" /> <FlashBankInfo Name="QSPI Flash" BaseAddr="0x90000000" MaxSize="0x01000000" Loader="RAMCode_SPIFI_ST_STM32L4R9I.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" /> </Device> </Database>
Embedded Studio example project
The example project contains a simple counter loop which is linked into the (Q)SPI flash memory region @ address 0x90000000. It runs out-of-the-box. Please note, that Embedded Studio must at least use the J-Link DLL version V6.98, which supports the Open Flash Loader.