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'.
PDL structure of Unique ID register set.
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] | pstcUniqueId | Pointer to the Unique ID strucutre |
- Return values
-
| Ok | Unique ID sucessfully written |
| ErrorInvalidParameter | pstcUniqueId == 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.