|
enum | {
kStatus_OCOTP_AccessError = MAKE_STATUS(kStatusGroup_SDK_OCOTP, 0)
, kStatus_OCOTP_CrcFail = MAKE_STATUS(kStatusGroup_SDK_OCOTP, 1)
, kStatus_OCOTP_ReloadError
, kStatus_OCOTP_ProgramFail = MAKE_STATUS(kStatusGroup_SDK_OCOTP, 3)
,
kStatus_OCOTP_Locked = MAKE_STATUS(kStatusGroup_SDK_OCOTP, 4)
} |
| _ocotp_status Error codes for the OCOTP driver. More...
|
|
void | OCOTP_Init (OCOTP_Type *base, uint32_t srcClock_Hz) |
| Initializes OCOTP controller.
|
|
void | OCOTP_Deinit (OCOTP_Type *base) |
| De-initializes OCOTP controller.
|
|
status_t | 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.
|
|
uint32_t | OCOTP_ReadFuseShadowRegister (OCOTP_Type *base, uint32_t address) |
| Read the fuse shadow register with the fuse addess.
|
|
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.
|
|
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.
|
|
status_t | OCOTP_WriteFuseShadowRegisterWithLock (OCOTP_Type *base, uint32_t address, uint32_t data, bool lock) |
| Write the fuse shadow register and lock it.
|
|
#define | FSL_OCOTP_DRIVER_VERSION (MAKE_VERSION(2, 1, 3)) |
| OCOTP driver version.
|
|
#define | OCOTP_READ_FUSE_DATA_COUNT (1U) |
|
status_t OCOTP_WriteFuseShadowRegisterWithLock |
( |
OCOTP_Type * |
base, |
|
|
uint32_t |
address, |
|
|
uint32_t |
data, |
|
|
bool |
lock |
|
) |
| |
Write the fuse shadow register and lock it.
Please make sure the wrtie address is not locked while calling this API.
Some OCOTP controller supports ECC mode and redundancy mode (see reference mananual for more details). OCOTP controller will auto select ECC or redundancy mode to program the fuse word according to fuse map definition. In ECC mode, the 32 fuse bits in one word can only be written once. In redundancy mode, the word can be written more than once as long as they are different fuse bits. Set parameter lock
as true to force use ECC mode.
- Parameters
-
base | OCOTP peripheral base address. |
address | The fuse address to be written. |
data | The value will be writen to fuse address. |
lock | Lock or unlock write fuse shadow register operation. |
- Return values
-
kStatus_Success | Program and reload success. |
kStatus_OCOTP_Locked | The eFuse word is locked and cannot be programmed. |
kStatus_OCOTP_ProgramFail | eFuse word programming failed. |
kStatus_OCOTP_ReloadError | eFuse word programming success, but error happens during reload the values. |
kStatus_OCOTP_AccessError | Cannot access eFuse word. |