TM STM32Fxxx HAL Libraries  v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle

Library Functions. More...

Macros

#define TM_ID_GetSignature()    (DBGMCU->IDCODE & 0x00000FFF)
 Get STM32Fxxx device signature. More...
 
#define TM_ID_GetRevision()    ((DBGMCU->IDCODE >> 16) & 0x0000FFFF)
 Gets STM32Fxxx device revision. More...
 
#define TM_ID_GetPackage()    (((*(__IO uint16_t *) (ID_PACKAGE_ADDRESS)) & 0x0700) >> 8)
 Gets STM32Fxxx device package. More...
 
#define TM_ID_GetFlashSize()    (*(__IO uint16_t *) (ID_FLASH_ADDRESS))
 Gets STM32Fxxx device flash size in kilo bytes. More...
 
#define TM_ID_GetUnique8(x)    ((x >= 0 && x < 12) ? (*(__IO uint8_t *) (ID_UNIQUE_ADDRESS + (x))) : 0)
 Gets STM32Fxxx unique ID number in 8-bit format. More...
 
#define TM_ID_GetUnique16(x)    ((x >= 0 && x < 6) ? (*(__IO uint16_t *) (ID_UNIQUE_ADDRESS + 2 * (x))) : 0)
 Gets unique ID number in 16-bit format. More...
 
#define TM_ID_GetUnique32(x)    ((x >= 0 && x < 3) ? (*(__IO uint32_t *) (ID_UNIQUE_ADDRESS + 4 * (x))) : 0)
 Get unique ID number in 32-bit format. More...
 

Detailed Description

Library Functions.

Macro Definition Documentation

#define TM_ID_GetFlashSize ( )    (*(__IO uint16_t *) (ID_FLASH_ADDRESS))

Gets STM32Fxxx device flash size in kilo bytes.

Note
Defined as macro to get maximal response time
Parameters
None
Return values
Flashsize in kilo bytes
#define TM_ID_GetPackage ( )    (((*(__IO uint16_t *) (ID_PACKAGE_ADDRESS)) & 0x0700) >> 8)

Gets STM32Fxxx device package.

Note
Defined as macro to get maximal response time
This is not available for all packages, somewhere HardFault may occur
Parameters
None
Return values
Devicerevision value
#define TM_ID_GetRevision ( )    ((DBGMCU->IDCODE >> 16) & 0x0000FFFF)

Gets STM32Fxxx device revision.

Note
Defined as macro to get maximal response time
Parameters
None
Return values
Devicerevision value
#define TM_ID_GetSignature ( )    (DBGMCU->IDCODE & 0x00000FFF)

Get STM32Fxxx device signature.

Note
Defined as macro to get maximal response time
Parameters
None
Return values
Devicesignature, bits 11:0 are valid, 15:12 are always 0
#define TM_ID_GetUnique16 (   x)    ((x >= 0 && x < 6) ? (*(__IO uint16_t *) (ID_UNIQUE_ADDRESS + 2 * (x))) : 0)

Gets unique ID number in 16-bit format.

Note
STM32Fxxx has 96bits long unique ID, so 6 2-bytes values are available for read in 16-bit format
Defined as macro to get maximal response time
Parameters
xByte number: specify which part of 16 bits you want to read
  • Values between 0 and 5 are allowed
Return values
UniqueID address
#define TM_ID_GetUnique32 (   x)    ((x >= 0 && x < 3) ? (*(__IO uint32_t *) (ID_UNIQUE_ADDRESS + 4 * (x))) : 0)

Get unique ID number in 32-bit format.

Note
STM32Fxxx has 96bits long unique ID, so 3 4-bytes values are available for read in 32-bit format
Defined as macro to get maximal response time
Parameters
xByte number: specify which part of 32 bits you want to read
  • Values between 0 and 2 are allowed
Return values
UniqueID address
#define TM_ID_GetUnique8 (   x)    ((x >= 0 && x < 12) ? (*(__IO uint8_t *) (ID_UNIQUE_ADDRESS + (x))) : 0)

Gets STM32Fxxx unique ID number in 8-bit format.

Note
STM32Fxxx has 96bits long unique ID, so 12 bytes are available for read in 8-bit format
Defined as macro to get maximal response time
Parameters
xByte number: specify which part of 8 bits you want to read
  • Values between 0 and 11 are allowed
Return values
UniqueID address