File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
targets/TARGET_STM/TARGET_STM32L4/device Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -403,6 +403,18 @@ uint32_t HAL_GetDEVID(void)
403403 return (DBGMCU -> IDCODE & DBGMCU_IDCODE_DEV_ID );
404404}
405405
406+ /**
407+ * @brief Return the unique device identifier (UID based on 96 bits)
408+ * @param UID: pointer to 3 words array.
409+ * @retval Device identifier
410+ */
411+ void HAL_GetUID_12Byte (uint32_t * UID )
412+ {
413+ UID [0 ] = (uint32_t )(READ_REG (* ((uint32_t * )UID_BASE )));
414+ UID [1 ] = (uint32_t )(READ_REG (* ((uint32_t * )(UID_BASE + 4U ))));
415+ UID [2 ] = (uint32_t )(READ_REG (* ((uint32_t * )(UID_BASE + 8U ))));
416+ }
417+
406418/**
407419 * @brief Return the first word of the unique device identifier (UID based on 96 bits)
408420 * @retval Device identifier
Original file line number Diff line number Diff line change @@ -582,6 +582,7 @@ void HAL_ResumeTick(void);
582582uint32_t HAL_GetHalVersion (void );
583583uint32_t HAL_GetREVID (void );
584584uint32_t HAL_GetDEVID (void );
585+ void HAL_GetUID_12Byte (uint32_t * UID );
585586uint32_t HAL_GetUIDw0 (void );
586587uint32_t HAL_GetUIDw1 (void );
587588uint32_t HAL_GetUIDw2 (void );
You can’t perform that action at this time.
0 commit comments