Correct HAL Library for HSPI to control QSPI Flash (MX25L51245G) on STM32U5G9
Hi,
I am using the STM32U5G9 and trying to control a QSPI Flash (MX25L51245GXDI) using the HSPI peripheral.
I am confused about which official HAL library and functions I should use for this specific configuration. Since the hardware is named HSPI but the Flash is QSPI, it is unclear which driver is the intended one.
Could you please clarify which of the following should be used?
-
HAL_SPI_... (Standard SPI functions)
-
HAL_XSPI_... (Expanded SPI functions)
-
HAL_QSPI_... (Quad SPI functions)
-
HAL_OSPI_... (Octo-SPI functions)
There is no stm32u5xx_hal_hspi.c provided in the firmware package, and using HAL_QSPI_... or HAL_SPI_... functions with the HSPI1 instance results in type-casting errors and compilation failures.
Please provide the official recommendation on which HAL driver is mandatory for driving a 4-line Quad SPI Flash through the HSPI interface on the STM32U5G9 series.
Best regards,
