Go to the documentation of this file.
14 #ifndef FSL_COMPONENT_ID
15 #define FSL_COMPONENT_ID "platform.drivers.ocotp"
19 #define OCOTP_TIMING_WAIT_NS (uint64_t)150
21 #define OCOTP_TIMING_RELEX_NS (uint64_t)100
23 #define OCOTP_TIMING_PROGRAM_NS (uint64_t)10000
25 #define OCOTP_TIMING_READ_NS (uint64_t)40
28 #define OCOTP_WRITE_UNLOCK_KEY (0x3E77)
94 uint32_t timingValue = base->
TIMING;
99 base->
TIMING = timingValue;
104 uint32_t timingValue = base->
TIMING;
110 base->
TIMING = timingValue;
116 assert(
NULL != base);
117 assert(0UL != srcClock_Hz);
119 #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
142 assert(
NULL != base);
149 #if !(defined(FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL) && FSL_SDK_DISABLE_DRIVER_CLOCK_CONTROL)
158 assert(
NULL != base);
211 assert(
NULL != base);
static void OCOTP_SetWriteTiming(OCOTP_Type *base, ocotp_timing_t timingConfig)
Set write timing configuration.
static bool OCOTP_CheckBusyStatus(OCOTP_Type *base)
Checking the BUSY bit in CTRL register. Checking this BUSY bit will help confirm if the OCOTP control...
#define OCOTP_CTRL_WR_UNLOCK(x)
#define OCOTP_TIMING_RELEX_NS
#define OCOTP_WRITE_UNLOCK_KEY
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 n...
void OCOTP_Deinit(OCOTP_Type *base)
De-initializes OCOTP controller.
OCOTP timing structure. Note that, these value are used for calcalating the read/write timings....
static void OCOTP_SetReadTiming(OCOTP_Type *base, ocotp_timing_t timingConfig)
Set read timing configuration.
ocotp_timing_t s_timingConfig
#define OCOTP_TIMING_RELAX(x)
#define OCOTP_TIMING_WAIT_MASK
void OCOTP_ReloadShadowRegister(OCOTP_Type *base)
Reload the shadow register. This function will help reload the shadow register without reseting the O...
uint32_t OCOTP_ReadFuseShadowRegister(OCOTP_Type *base, uint32_t address)
Read the fuse shadow register with the fuse addess.
static void OCOTP_ClearErrorStatus(OCOTP_Type *base)
Clear the error bit if this bit is set.
@ kStatus_OCOTP_AccessError
#define OCOTP_CTRL_WR_UNLOCK_MASK
#define OCOTP_TIMING_WAIT_NS
#define OCOTP_CTRL_SET_ADDR(x)
#define OCOTP_TIMING_STROBE_READ(x)
static void CLOCK_EnableClock(clock_ip_name_t name)
Enable the clock for specific IP.
#define OCOTP_CTRL_RELOAD_SHADOWS(x)
#define OCOTP_CTRL_CLR_ADDR_MASK
#define OCOTP_READ_CTRL_READ_FUSE_MASK
__IO uint32_t READ_FUSE_DATA
#define OCOTP_TIMING_STROBE_READ_MASK
void OCOTP_Init(OCOTP_Type *base, uint32_t srcClock_Hz)
Initializes OCOTP controller.
#define OCOTP_TIMING_READ_NS
#define OCOTP_TIMING_PROGRAM_NS
static void CLOCK_DisableClock(clock_ip_name_t name)
Disable the clock for specific IP.
#define OCOTP_TIMING_RELAX_MASK
static bool OCOTP_CheckErrorStatus(OCOTP_Type *base)
Checking the ERROR bit in CTRL register.
#define OCOTP_CTRL_RELOAD_SHADOWS_MASK
int32_t status_t
Type used for all status and error return values.
#define OCOTP_TIMING_STROBE_PROG_MASK
#define OCOTP_TIMING_STROBE_PROG(x)
#define OCOTP_TIMING_WAIT(x)