10#include "fsl_common.h"
23#define FSL_OCOTP_DRIVER_VERSION (MAKE_VERSION(2, 1, 3))
26#ifndef OCOTP_READ_FUSE_DATA_COUNT
27#define OCOTP_READ_FUSE_DATA_COUNT (1U)
41#if (defined(FSL_FEATURE_OCOTP_HAS_TIMING_CTRL) && FSL_FEATURE_OCOTP_HAS_TIMING_CTRL)
53typedef struct _ocotp_timing
66#if defined(__cplusplus)
94static inline bool OCOTP_CheckBusyStatus(
OCOTP_Type *base)
96 return ((OCOTP_CTRL_BUSY_MASK == (base->CTRL & OCOTP_CTRL_BUSY_MASK)) ? (
true) : (
false));
105static inline bool OCOTP_CheckErrorStatus(
OCOTP_Type *base)
107 return ((OCOTP_CTRL_ERROR_MASK == (base->CTRL & OCOTP_CTRL_ERROR_MASK)) ? (
true) : (
false));
115static inline void OCOTP_ClearErrorStatus(
OCOTP_Type *base)
117 base->CTRL_CLR = OCOTP_CTRL_CLR_ERROR_MASK;
200static inline uint32_t OCOTP_GetVersion(
OCOTP_Type *base)
202 return (base->VERSION);
205#if defined(__cplusplus)
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
Definition: fsl_common.h:47
@ kStatusGroup_SDK_OCOTP
Definition: fsl_common.h:184
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...
Definition: fsl_ocotp.c:292
status_t OCOTP_WriteFuseShadowRegisterWithLock(OCOTP_Type *base, uint32_t address, uint32_t data, bool lock)
Write the fuse shadow register and lock it.
Definition: fsl_ocotp.c:297
void OCOTP_Init(OCOTP_Type *base, uint32_t srcClock_Hz)
Initializes OCOTP controller.
Definition: fsl_ocotp.c:144
status_t OCOTP_ReloadShadowRegister(OCOTP_Type *base)
Reload the shadow register. This function will help reload the shadow register without reseting the O...
Definition: fsl_ocotp.c:69
status_t OCOTP_ReadFuseShadowRegisterExt(OCOTP_Type *base, uint32_t address, uint32_t *data, uint8_t fuseWords)
Read the fuse shadow register from the fuse addess.
Definition: fsl_ocotp.c:203
void OCOTP_Deinit(OCOTP_Type *base)
De-initializes OCOTP controller.
Definition: fsl_ocotp.c:174
uint32_t OCOTP_ReadFuseShadowRegister(OCOTP_Type *base, uint32_t address)
Read the fuse shadow register with the fuse addess.
Definition: fsl_ocotp.c:192
@ kStatus_OCOTP_Locked
Definition: fsl_ocotp.h:38
@ kStatus_OCOTP_AccessError
Definition: fsl_ocotp.h:33
@ kStatus_OCOTP_CrcFail
Definition: fsl_ocotp.h:34
@ kStatus_OCOTP_ReloadError
Definition: fsl_ocotp.h:35
@ kStatus_OCOTP_ProgramFail
Definition: fsl_ocotp.h:37
Definition: MIMXRT1052.h:32184