Functions | |
cy_en_efuse_status_t | Cy_EFUSE_GetEfuseBit (uint32_t bitNum, bool *bitVal) |
Reports the current state of a given eFuse bit-number. More... | |
cy_en_efuse_status_t | Cy_EFUSE_GetEfuseByte (uint32_t offset, uint8_t *byteVal) |
Reports the current state of the eFuse byte. More... | |
uint32_t | Cy_EFUSE_GetExternalStatus (void) |
This function handles the case where a module such as a security image captures a system call from this driver and reports its own status or error code, for example, protection violation. More... | |
cy_en_efuse_status_t | Cy_EFUSE_Init (EFUSE_Type *base) |
This function enables the EFUSE block and initializes the registers with the default values. More... | |
void | Cy_EFUSE_Enable (EFUSE_Type *base) |
Enables the EFUSE block. More... | |
void | Cy_EFUSE_Disable (EFUSE_Type *base) |
Disables the EFUSE block. More... | |
bool | Cy_EFUSE_IsEnabled (EFUSE_Type *base) |
Check if EFUSE block is Enabled or Not. More... | |
void | Cy_EFUSE_DeInit (EFUSE_Type *base) |
Disables the EFUSE block. More... | |
cy_en_efuse_status_t | Cy_EFUSE_WriteBit (EFUSE_Type *base, uint32_t bitPos, uint32_t offset) |
Writes a bit to EFUSE by blowing a fuse, so this function is able to write 1s only. More... | |
cy_en_efuse_status_t | Cy_EFUSE_WriteByte (EFUSE_Type *base, uint32_t src, uint32_t offset) |
Writes one byte. More... | |
cy_en_efuse_status_t | Cy_EFUSE_WriteWord (EFUSE_Type *base, uint32_t src, uint32_t offset) |
Writes every bit set in src that was not already programmed. More... | |
cy_en_efuse_status_t | Cy_EFUSE_WriteWordArray (EFUSE_Type *base, const uint32_t *src, uint32_t offset, uint32_t num) |
Writes the values of num 32-bit words from the location pointed to by src to the EFUSE location pointed to by offset. More... | |
cy_en_efuse_status_t | Cy_EFUSE_ReadBit (EFUSE_Type *base, uint8_t *dst, uint32_t bitPos, uint32_t offset) |
Reads a bit from EFUSE. More... | |
cy_en_efuse_status_t | Cy_EFUSE_ReadByte (EFUSE_Type *base, uint8_t *dst, uint32_t offset) |
Reads byte from EFUSE. More... | |
cy_en_efuse_status_t | Cy_EFUSE_ReadWord (EFUSE_Type *base, uint32_t *dst, uint32_t offset) |
Reads a 32-bit word from EFUSE. More... | |
cy_en_efuse_status_t | Cy_EFUSE_ReadWordArray (EFUSE_Type *base, uint32_t *dst, uint32_t offset, uint32_t num) |
Reads an array of 32-bit words from EFUSE. More... | |
cy_en_efuse_status_t | Cy_EFUSE_WriteBootRow (EFUSE_Type *base, uint32_t bootrow) |
Writes data into BOOTROW. More... | |
cy_en_efuse_status_t | Cy_EFUSE_ReadBootRow (EFUSE_Type *base, uint32_t *bootrow) |
Reads data from BOOTROW. More... | |
cy_en_efuse_status_t Cy_EFUSE_GetEfuseBit | ( | uint32_t | bitNum, |
bool * | bitVal | ||
) |
Reports the current state of a given eFuse bit-number.
Consult the device TRM to determine the target fuse bit number.
bitNum | The number of the bit to read. The valid range of the bit number is from 0 to EFUSE_EFUSE_NR * 32 * 8 - 1 where:
|
The EFUSE_EFUSE_NR macro is defined in the series-specific header file, e.g <PDL_DIR>/devices/include/psoc6_01_config.h
bitVal | The pointer to the location to store the bit value. |
cy_en_efuse_status_t Cy_EFUSE_GetEfuseByte | ( | uint32_t | offset, |
uint8_t * | byteVal | ||
) |
Reports the current state of the eFuse byte.
If the offset parameter is beyond the available quantities, zeroes will be stored to the byteVal parameter. Consult the device TRM to determine the target fuse byte offset.
offset | The offset of the byte to read. The valid range of the byte offset is from 0 to EFUSE_EFUSE_NR * 32 - 1 where:
|
The EFUSE_EFUSE_NR macro is defined in the series-specific header file, e.g <PDL_DIR>/devices/include/psoc6_01_config.h
byteVal | The pointer to the location to store eFuse data. |
uint32_t Cy_EFUSE_GetExternalStatus | ( | void | ) |
This function handles the case where a module such as a security image captures a system call from this driver and reports its own status or error code, for example, protection violation.
In that case, a function from this driver returns an unknown error (see cy_en_efuse_status_t). After receipt of an unknown error, the user may call this function to get the status of the capturing module.
The user is responsible for parsing the content of the returned value and casting it to the appropriate enumeration.
cy_en_efuse_status_t Cy_EFUSE_Init | ( | EFUSE_Type * | base | ) |
This function enables the EFUSE block and initializes the registers with the default values.
base | The pointer to the EFUSE instance. |
void Cy_EFUSE_Enable | ( | EFUSE_Type * | base | ) |
Enables the EFUSE block.
base | The pointer to the EFUSE instance. |
void Cy_EFUSE_Disable | ( | EFUSE_Type * | base | ) |
Disables the EFUSE block.
All non-retention registers (command and status registers) are reset to their default values when the IP is disabled.
base | The pointer to the EFUSE instance. |
bool Cy_EFUSE_IsEnabled | ( | EFUSE_Type * | base | ) |
Check if EFUSE block is Enabled or Not.
base | The pointer to the EFUSE instance. |
void Cy_EFUSE_DeInit | ( | EFUSE_Type * | base | ) |
Disables the EFUSE block.
All non-retention registers (command and status registers) are reset to their default values when the IP is disabled.
base | The pointer to the EFUSE instance. |
cy_en_efuse_status_t Cy_EFUSE_WriteBit | ( | EFUSE_Type * | base, |
uint32_t | bitPos, | ||
uint32_t | offset | ||
) |
Writes a bit to EFUSE by blowing a fuse, so this function is able to write 1s only.
Before write operations you must call Cy_EFUSE_Init(). It is recommended to disable the block when not using it. Call Cy_EFUSE_Disable() to disable the EFUSE block.
base | The pointer to the EFUSE instance. |
bitPos | Bit position within byte. |
offset | Byte position within EFUSE address space. |
cy_en_efuse_status_t Cy_EFUSE_WriteByte | ( | EFUSE_Type * | base, |
uint32_t | src, | ||
uint32_t | offset | ||
) |
Writes one byte.
Before write operations you must call Cy_EFUSE_Init(). It is recommended to disable the block when not using it. Call Cy_EFUSE_Disable() to disable the EFUSE block.
base | The pointer to the EFUSE instance. |
src | Value to be written. |
offset | Byte offset from the EFUSE base address |
cy_en_efuse_status_t Cy_EFUSE_WriteWord | ( | EFUSE_Type * | base, |
uint32_t | src, | ||
uint32_t | offset | ||
) |
Writes every bit set in src that was not already programmed.
Before write operations you must call Cy_EFUSE_Init(). It is recommended to disable the block when not using it. Call Cy_EFUSE_Disable() to disable the EFUSE block.
base | The pointer to the EFUSE instance. |
src | Value to be written. |
offset | Offset from the EFUSE base address. Must be 4-byte aligned. |
cy_en_efuse_status_t Cy_EFUSE_WriteWordArray | ( | EFUSE_Type * | base, |
const uint32_t * | src, | ||
uint32_t | offset, | ||
uint32_t | num | ||
) |
Writes the values of num 32-bit words from the location pointed to by src to the EFUSE location pointed to by offset.
Before write operations you must call Cy_EFUSE_Init(). It is recommended to disable the block when not using it. Call Cy_EFUSE_Disable() to disable the EFUSE block.
base | The pointer to the EFUSE instance. |
src | Pointer to the source of data to be written. |
offset | Offset from the EFUSE base address. Must be 4-byte aligned. |
num | Number of 32-bit words to be written. |
cy_en_efuse_status_t Cy_EFUSE_ReadBit | ( | EFUSE_Type * | base, |
uint8_t * | dst, | ||
uint32_t | bitPos, | ||
uint32_t | offset | ||
) |
Reads a bit from EFUSE.
Before read operations you must call Cy_EFUSE_Init(). It is recommended to disable the block when not using it. Call Cy_EFUSE_Disable() to disable the EFUSE block.
base | The pointer to the EFUSE instance. |
dst | Pointer to the destination where the read bit is stored. |
bitPos | Bit position within byte. |
offset | Byte offset from the EFUSE base address. |
cy_en_efuse_status_t Cy_EFUSE_ReadByte | ( | EFUSE_Type * | base, |
uint8_t * | dst, | ||
uint32_t | offset | ||
) |
Reads byte from EFUSE.
Before read operations you must call Cy_EFUSE_Init(). It is recommended to disable the block when not using it. Call Cy_EFUSE_Disable() to disable the EFUSE block.
base | The pointer to the EFUSE instance. |
dst | Pointer to the destination where the read byte is stored. |
offset | Byte offset from the EFUSE base address. |
cy_en_efuse_status_t Cy_EFUSE_ReadWord | ( | EFUSE_Type * | base, |
uint32_t * | dst, | ||
uint32_t | offset | ||
) |
Reads a 32-bit word from EFUSE.
Before read operations you must call Cy_EFUSE_Init(). It is recommended to disable the block when not using it. Call Cy_EFUSE_Disable() to disable the EFUSE block.
base | The pointer to the EFUSE instance. |
dst | Pointer to the destination where the read word is stored. |
offset | Offset from the EFUSE base address. Must be 4-byte aligned. |
cy_en_efuse_status_t Cy_EFUSE_ReadWordArray | ( | EFUSE_Type * | base, |
uint32_t * | dst, | ||
uint32_t | offset, | ||
uint32_t | num | ||
) |
Reads an array of 32-bit words from EFUSE.
Before read operations you must call Cy_EFUSE_Init(). It is recommended to disable the block when not using it. Call Cy_EFUSE_Disable() to disable the EFUSE block.
base | The pointer to the EFUSE instance. |
dst | Pointer to the destination array where the content is to be read. |
offset | Start address of the data to read in EFUSE. |
num | Number of words to read. |
cy_en_efuse_status_t Cy_EFUSE_WriteBootRow | ( | EFUSE_Type * | base, |
uint32_t | bootrow | ||
) |
Writes data into BOOTROW.
Before write operations you must call Cy_EFUSE_Init(). It is recommended to disable the block when not using it. Call Cy_EFUSE_Disable() to disable the EFUSE block.
base | The pointer to the EFUSE instance. |
bootrow | 32-bit value to be written into bootrow. |
cy_en_efuse_status_t Cy_EFUSE_ReadBootRow | ( | EFUSE_Type * | base, |
uint32_t * | bootrow | ||
) |
Reads data from BOOTROW.
The BOOTROW information is latched upon system reset and is readable as MMIO register.
base | The pointer to the EFUSE instance. |
bootrow | Pointer to the variable where the content of BOOTROW is read to. |