Skip to main content
Visitor II
November 30, 2020
Question

How to obtain version information of used packedge at runtime. In cube config file it can be looked up (for example V1.8.0), but how to get it runtime in code?

  • November 30, 2020
  • 3 replies
  • 828 views

How to obtain version information of used packedge at runtime.

In cube config file it can be looked up (for example V1.8.0), but how to get it runtime in code?

    This topic has been closed for replies.

    3 replies

    Super User
    November 30, 2020

    Next time include your chip family.

    There are defines in stm32f4xx_hal.c that define the HAL version at compile time. It's similar for other families.

    /**
     * @brief STM32F4xx HAL Driver version number V1.7.8
     */
    #define __STM32F4xx_HAL_VERSION_MAIN (0x01U) /*!< [31:24] main version */
    #define __STM32F4xx_HAL_VERSION_SUB1 (0x07U) /*!< [23:16] sub1 version */
    #define __STM32F4xx_HAL_VERSION_SUB2 (0x08U) /*!< [15:8] sub2 version */
    #define __STM32F4xx_HAL_VERSION_RC (0x00U) /*!< [7:0] release candidate */

    PeterKwekAuthor
    Visitor II
    November 30, 2020

    Hello,

    Thanks for a fast response.

    Chip family : H743Zi

    This info I allready found and can also be requested by function HAL_GetHalVersion(), returns for my project "0x01090000".

    This version is different from the HW firmware packedge, which can be found in the cubeIde Project manager -> MCU and firmware package: "STM32Cube FW_H7 V1.8.0"

    How obtain this version?

    greetings Peter

    Super User
    November 30, 2020

    edit: I misunderstood.

    You can't obtain the package version as far as I'm aware.