cancel
Showing results for 
Search instead for 
Did you mean: 

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?

PeterKwek
Associate II

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?

3 REPLIES 3
TDK
Guru

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 */

If you feel a post has answered your question, please click "Accept as Solution".
PeterKwek
Associate II

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

TDK
Guru

edit: I misunderstood.

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

If you feel a post has answered your question, please click "Accept as Solution".