PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
Unique ID Functions (UID)

Data Structures

struct  stc_unique_id
 PDL structure of Unique ID register set. More...
 

Typedefs

typedef struct stc_unique_id stc_unique_id_t
 PDL structure of Unique ID register set. More...
 

Functions

en_result_t Uid_ReadUniqueId (stc_unique_id_t *pstcUniqueId)
 Read Unique ID registers as is. More...
 
uint32_t Uid_ReadUniqueId0 (void)
 Read Unique ID registers 0 and shifts it by 4 (LSB aligned) More...
 
uint32_t Uid_ReadUniqueId1 (void)
 Read Unique ID registers 1 and masks the upper 19 bits to '0'. More...
 
uint64_t Uid_ReadUniqueId64 (void)
 Read Unique ID registers 0 and 1 and merge it LSB aligned to a 64 bit value. More...
 

Detailed Description

Provided functions of UID module:

Uid_ReadUniqueId() reads out the Unique ID to a pointered structure of the type stc_unique_id_t. Uid_ReadUniqueId0() reads out the Unique ID 0 register and aligns the result to the LSB. Uid_ReadUniqueId1() reads out the Unique ID 1 register. Both functions masks reverd bits to '0'. Uid_ReadUniqueId64() reads out the complet Unique ID registers aligns them to LSB and masks out reserved bits to '0'.

Typedef Documentation

PDL structure of Unique ID register set.

Function Documentation

en_result_t Uid_ReadUniqueId ( stc_unique_id_t *  pstcUniqueId)

Read Unique ID registers as is.

This function reads out UIDR0 and UIDR1 as is without any shift to a pointered structure of the type stc_unique_id_t. Reserved bits are masked to '0'.

Parameters
[out]pstcUniqueIdPointer to the Unique ID strucutre
Return values
OkUnique ID sucessfully written
ErrorInvalidParameterpstcUniqueId == NULL

Definition at line 102 of file uid.c.

References ErrorInvalidParameter, Ok, stc_unique_id::u32Uidr0, and stc_unique_id::u32Uidr1.

uint32_t Uid_ReadUniqueId0 ( void  )

Read Unique ID registers 0 and shifts it by 4 (LSB aligned)

This function reads out UIDR0 and aligns the value to the LSB by right-shifting by 4.

Returns
uint32_t Unique ID 0 >> 4

Definition at line 124 of file uid.c.

uint32_t Uid_ReadUniqueId1 ( void  )

Read Unique ID registers 1 and masks the upper 19 bits to '0'.

This function reads out UIDR1 and masks the upper 19 bits to '0'

Returns
uint32_t Unique ID 1 & 0x00001FFF

Definition at line 137 of file uid.c.

uint64_t Uid_ReadUniqueId64 ( void  )

Read Unique ID registers 0 and 1 and merge it LSB aligned to a 64 bit value.

Returns
uint64_t Complete unique ID LSB aligned

Definition at line 149 of file uid.c.