Classes | |
struct | _ocotp_timing |
OCOTP timing structure. Note that, these value are used for calcalating the read/write timings. And the values should statisfy below rules: More... | |
Variables | |
uint32_t | _ocotp_timing::relax |
uint32_t | _ocotp_timing::strobe_prog |
uint32_t | _ocotp_timing::strobe_read |
uint32_t | _ocotp_timing::wait |
Driver version | |
enum | _ocotp_status { kStatus_OCOTP_AccessError = MAKE_STATUS(kStatusGroup_SDK_OCOTP, 0), kStatus_OCOTP_CrcFail = MAKE_STATUS(kStatusGroup_SDK_OCOTP, 1) } |
Error codes for the OCOTP driver. More... | |
typedef struct _ocotp_timing | ocotp_timing_t |
OCOTP timing structure. Note that, these value are used for calcalating the read/write timings. And the values should statisfy below rules: More... | |
void | OCOTP_Init (OCOTP_Type *base, uint32_t srcClock_Hz) |
Initializes OCOTP controller. More... | |
void | OCOTP_Deinit (OCOTP_Type *base) |
De-initializes OCOTP controller. More... | |
static bool | OCOTP_CheckBusyStatus (OCOTP_Type *base) |
Checking the BUSY bit in CTRL register. Checking this BUSY bit will help confirm if the OCOTP controller is ready for access. More... | |
static bool | OCOTP_CheckErrorStatus (OCOTP_Type *base) |
Checking the ERROR bit in CTRL register. More... | |
static void | OCOTP_ClearErrorStatus (OCOTP_Type *base) |
Clear the error bit if this bit is set. More... | |
void | OCOTP_ReloadShadowRegister (OCOTP_Type *base) |
Reload the shadow register. This function will help reload the shadow register without reseting the OCOTP module. Please make sure the OCOTP has been initialized before calling this API. More... | |
uint32_t | OCOTP_ReadFuseShadowRegister (OCOTP_Type *base, uint32_t address) |
Read the fuse shadow register with the fuse addess. More... | |
status_t | OCOTP_WriteFuseShadowRegister (OCOTP_Type *base, uint32_t address, uint32_t data) |
Write the fuse shadow register with the fuse addess and data. Please make sure the wrtie address is not locked while calling this API. More... | |
static uint32_t | OCOTP_GetVersion (OCOTP_Type *base) |
Get the OCOTP controller version from the register. More... | |
#define | FSL_OCOTP_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
OCOTP driver version 2.0.1. More... | |
#define FSL_OCOTP_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
OCOTP driver version 2.0.1.
Definition at line 23 of file fsl_ocotp.h.
typedef struct _ocotp_timing ocotp_timing_t |
OCOTP timing structure. Note that, these value are used for calcalating the read/write timings. And the values should statisfy below rules:
Tsp_rd=(WAIT+1)/ipg_clk_freq should be >= 150ns; Tsp_pgm=(RELAX+1)/ipg_clk_freq should be >= 100ns; Trd = ((STROBE_READ+1)- 2*(RELAX_READ+1)) /ipg_clk_freq, The Trd is required to be larger than 40 ns. Tpgm = ((STROBE_PROG+1)- 2*(RELAX_PROG+1)) /ipg_clk_freq; The Tpgm should be configured within the range of 9000 ns < Tpgm < 11000 ns;
enum _ocotp_status |
Error codes for the OCOTP driver.
Enumerator | |
---|---|
kStatus_OCOTP_AccessError | eFuse and shadow register access error. |
kStatus_OCOTP_CrcFail | CRC check failed. |
Definition at line 27 of file fsl_ocotp.h.
|
inlinestatic |
Checking the BUSY bit in CTRL register. Checking this BUSY bit will help confirm if the OCOTP controller is ready for access.
base | OCOTP peripheral base address. |
true | for bit set and false for cleared. |
Definition at line 82 of file fsl_ocotp.h.
|
inlinestatic |
Checking the ERROR bit in CTRL register.
base | OCOTP peripheral base address. |
true | for bit set and false for cleared. |
Definition at line 93 of file fsl_ocotp.h.
|
inlinestatic |
Clear the error bit if this bit is set.
base | OCOTP peripheral base address. |
Definition at line 103 of file fsl_ocotp.h.
void OCOTP_Deinit | ( | OCOTP_Type * | base | ) |
De-initializes OCOTP controller.
kStatus_Success | upon successful execution, error status otherwise. |
Definition at line 140 of file fsl_ocotp.c.
|
inlinestatic |
Get the OCOTP controller version from the register.
base | OCOTP peripheral base address. |
return | the version value. |
Definition at line 142 of file fsl_ocotp.h.
void OCOTP_Init | ( | OCOTP_Type * | base, |
uint32_t | srcClock_Hz | ||
) |
Initializes OCOTP controller.
base | OCOTP peripheral base address. |
srcClock_Hz | source clock frequency in unit of Hz. |
Definition at line 114 of file fsl_ocotp.c.
uint32_t OCOTP_ReadFuseShadowRegister | ( | OCOTP_Type * | base, |
uint32_t | address | ||
) |
Read the fuse shadow register with the fuse addess.
base | OCOTP peripheral base address. |
address | the fuse address to be read from. |
Definition at line 156 of file fsl_ocotp.c.
void OCOTP_ReloadShadowRegister | ( | OCOTP_Type * | base | ) |
Reload the shadow register. This function will help reload the shadow register without reseting the OCOTP module. Please make sure the OCOTP has been initialized before calling this API.
base | OCOTP peripheral base addess. |
Definition at line 59 of file fsl_ocotp.c.
status_t OCOTP_WriteFuseShadowRegister | ( | OCOTP_Type * | base, |
uint32_t | address, | ||
uint32_t | data | ||
) |
Write the fuse shadow register with the fuse addess and data. Please make sure the wrtie address is not locked while calling this API.
base | OCOTP peripheral base address. |
address | the fuse address to be written. |
data | the value will be writen to fuse address. |
write | status, kStatus_Success for success and kStatus_Fail for failed. |
Definition at line 209 of file fsl_ocotp.c.
uint32_t _ocotp_timing::relax |
Relax time value to fill in the TIMING register.
Definition at line 47 of file fsl_ocotp.h.
uint32_t _ocotp_timing::strobe_prog |
Storbe program time value to fill in the TIMING register.
Definition at line 48 of file fsl_ocotp.h.
uint32_t _ocotp_timing::strobe_read |
Storbe read time value to fill in the TIMING register.
Definition at line 49 of file fsl_ocotp.h.
uint32_t _ocotp_timing::wait |
Wait time value to fill in the TIMING register.
Definition at line 46 of file fsl_ocotp.h.