![]() |
RTEMS 6.3
|
Driver version | |
| 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) |
| anonymous enum |
_ocotp_status Error codes for the OCOTP driver.
| void OCOTP_Deinit | ( | OCOTP_Type * | base | ) |
De-initializes OCOTP controller.
| kStatus_Success | upon successful execution, error status otherwise. |
| 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. When the macro FSL_FEATURE_OCOTP_HAS_TIMING_CTRL is defined as 0, this parameter is not used, application could pass in 0 in this case. |
| 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. |
| 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.
This function reads fuse from address, how many words to read is specified by the parameter fuseWords. This function could read at most OCOTP_READ_FUSE_DATA_COUNT fuse word one time.
| base | OCOTP peripheral base address. |
| address | the fuse address to be read from. |
| data | Data array to save the readout fuse value. |
| fuseWords | How many words to read. |
| kStatus_Success | Read success. |
| kStatus_Fail | Error occurs during read. |
| 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.
| base | OCOTP peripheral base addess. |
| kStatus_Success | Reload success. |
| kStatus_OCOTP_ReloadError | Reload failed. |
| 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. |
| 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.
| 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. |
| 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. |