Classes | Enumerator | Variables
Ocotp

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...
 

Detailed Description

Macro Definition Documentation

◆ FSL_OCOTP_DRIVER_VERSION

#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 Documentation

◆ ocotp_timing_t

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;

Enumeration Type Documentation

◆ _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.

Function Documentation

◆ OCOTP_CheckBusyStatus()

static bool OCOTP_CheckBusyStatus ( OCOTP_Type base)
inlinestatic

Checking the BUSY bit in CTRL register. Checking this BUSY bit will help confirm if the OCOTP controller is ready for access.

Parameters
baseOCOTP peripheral base address.
Return values
truefor bit set and false for cleared.

Definition at line 82 of file fsl_ocotp.h.

◆ OCOTP_CheckErrorStatus()

static bool OCOTP_CheckErrorStatus ( OCOTP_Type base)
inlinestatic

Checking the ERROR bit in CTRL register.

Parameters
baseOCOTP peripheral base address.
Return values
truefor bit set and false for cleared.

Definition at line 93 of file fsl_ocotp.h.

◆ OCOTP_ClearErrorStatus()

static void OCOTP_ClearErrorStatus ( OCOTP_Type base)
inlinestatic

Clear the error bit if this bit is set.

Parameters
baseOCOTP peripheral base address.

Definition at line 103 of file fsl_ocotp.h.

◆ OCOTP_Deinit()

void OCOTP_Deinit ( OCOTP_Type base)

De-initializes OCOTP controller.

Return values
kStatus_Successupon successful execution, error status otherwise.

Definition at line 140 of file fsl_ocotp.c.

◆ OCOTP_GetVersion()

static uint32_t OCOTP_GetVersion ( OCOTP_Type base)
inlinestatic

Get the OCOTP controller version from the register.

Parameters
baseOCOTP peripheral base address.
Return values
returnthe version value.

Definition at line 142 of file fsl_ocotp.h.

◆ OCOTP_Init()

void OCOTP_Init ( OCOTP_Type base,
uint32_t  srcClock_Hz 
)

Initializes OCOTP controller.

Parameters
baseOCOTP peripheral base address.
srcClock_Hzsource clock frequency in unit of Hz.

Definition at line 114 of file fsl_ocotp.c.

◆ OCOTP_ReadFuseShadowRegister()

uint32_t OCOTP_ReadFuseShadowRegister ( OCOTP_Type base,
uint32_t  address 
)

Read the fuse shadow register with the fuse addess.

Parameters
baseOCOTP peripheral base address.
addressthe fuse address to be read from.

Definition at line 156 of file fsl_ocotp.c.

◆ OCOTP_ReloadShadowRegister()

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.

Parameters
baseOCOTP peripheral base addess.

Definition at line 59 of file fsl_ocotp.c.

◆ OCOTP_WriteFuseShadowRegister()

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.

Parameters
baseOCOTP peripheral base address.
addressthe fuse address to be written.
datathe value will be writen to fuse address.
Return values
writestatus, kStatus_Success for success and kStatus_Fail for failed.

Definition at line 209 of file fsl_ocotp.c.

Variable Documentation

◆ relax

uint32_t _ocotp_timing::relax

Relax time value to fill in the TIMING register.

Definition at line 47 of file fsl_ocotp.h.

◆ strobe_prog

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.

◆ strobe_read

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.

◆ wait

uint32_t _ocotp_timing::wait

Wait time value to fill in the TIMING register.

Definition at line 46 of file fsl_ocotp.h.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:11