File tree 2 files changed +13
-0
lines changed
targets/TARGET_STM/TARGET_STM32L4/device 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)
403
403
return (DBGMCU -> IDCODE & DBGMCU_IDCODE_DEV_ID );
404
404
}
405
405
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
+
406
418
/**
407
419
* @brief Return the first word of the unique device identifier (UID based on 96 bits)
408
420
* @retval Device identifier
Original file line number Diff line number Diff line change @@ -582,6 +582,7 @@ void HAL_ResumeTick(void);
582
582
uint32_t HAL_GetHalVersion (void );
583
583
uint32_t HAL_GetREVID (void );
584
584
uint32_t HAL_GetDEVID (void );
585
+ void HAL_GetUID_12Byte (uint32_t * UID );
585
586
uint32_t HAL_GetUIDw0 (void );
586
587
uint32_t HAL_GetUIDw1 (void );
587
588
uint32_t HAL_GetUIDw2 (void );
You can’t perform that action at this time.
0 commit comments