nrfx 3.3
Data Structures | Macros | Enumerations | Functions
OTPC HAL

Hardware access layer for managing the One Time Programmable Controller (OTPC) peripheral. More...

Data Structures

struct  nrf_otpc_config_t
 OTPC configuration structure. More...
 
struct  nrf_otpc_power_conf_t
 Mask for the various voltages supplies when switching power modes. More...
 
struct  nrf_otpc_region_config_t
 OTPC region configuration structure. More...
 

Macros

#define NRF_OTPC_HAS_REGION   1
 Symbol indicating whether REGION[n] registers are available.
 
#define NRF_OTPC_HAS_REGIONLOCK   1
 Symbol indicating whether REGIONLOCK register is available.
 

Enumerations

enum  nrf_otpc_event_t {
  NRF_OTPC_EVENT_READY = offsetof(NRF_OTPC_Type, EVENTS_READY) ,
  NRF_OTPC_EVENT_READY_NEXT = offsetof(NRF_OTPC_Type, EVENTS_READYNEXT)
}
 OTPC events. More...
 
enum  nrf_otpc_int_mask_t {
  NRF_OTPC_INT_READY_MASK = OTPC_INTENSET_READY_Msk ,
  NRF_OTPC_INT_READY_NEXT_MASK = OTPC_INTENSET_READYNEXT_Msk
}
 OTPC interrupts. More...
 
enum  nrf_otpc_mode_write_t {
  NRF_OTPC_MODE_WRITE_DISABLE = OTPC_CONFIG_WEN_DisableWrite ,
  NRF_OTPC_MODE_WRITE_ENABLE = OTPC_CONFIG_WEN_EnableWrite
}
 Write enable (WEN) settings. More...
 
enum  nrf_otpc_power_init_t {
  NRF_OTPC_POWER_INIT_MODE_UP = OTPC_POWER_INIT_MODE_PowerUp ,
  NRF_OTPC_POWER_INIT_MODE_DOWN = OTPC_POWER_INIT_MODE_PowerDown
}
 Power mode settings. More...
 
enum  nrf_otpc_power_status_t {
  NRF_OTPC_POWER_STATUS_OFF = OTPC_POWER_STATUS_STATE_Off ,
  NRF_OTPC_POWER_STATUS_POWER_UP_SEQ = OTPC_POWER_STATUS_STATE_PowerUpSeq ,
  NRF_OTPC_POWER_STATUS_STANDBY = OTPC_POWER_STATUS_STATE_Standby ,
  NRF_OTPC_POWER_STATUS_ACTIVE = OTPC_POWER_STATUS_STATE_Active ,
  NRF_OTPC_POWER_STATUS_POWER_DOWN_SEQ = OTPC_POWER_STATUS_STATE_PowerDownSeq
}
 Power mode status. More...
 
enum  nrf_otpc_puf_lock_t {
  NRF_OTPC_PUF_LOCK_PENDING = OTPC_PUF_LOCK_LOCK_Pending ,
  NRF_OTPC_PUF_LOCK_DISABLED = OTPC_PUF_LOCK_LOCK_Disabled ,
  NRF_OTPC_PUF_LOCK_ENABLED = OTPC_PUF_LOCK_LOCK_Enabled
}
 Status of the PUF write lock. More...
 

Functions

NRF_STATIC_INLINE void nrf_otpc_event_clear (NRF_OTPC_Type *p_reg, nrf_otpc_event_t event)
 Function for clearing the specified OTPC event.
 
NRF_STATIC_INLINE bool nrf_otpc_event_check (NRF_OTPC_Type const *p_reg, nrf_otpc_event_t event)
 Function for retrieving the state of the OTPC event.
 
NRF_STATIC_INLINE uint32_t nrf_otpc_event_address_get (NRF_OTPC_Type const *p_reg, nrf_otpc_event_t event)
 Function for getting the address of the specified OTPC event register.
 
NRF_STATIC_INLINE void nrf_otpc_int_enable (NRF_OTPC_Type *p_reg, uint32_t mask)
 Function for enabling the specified interrupts.
 
NRF_STATIC_INLINE void nrf_otpc_int_disable (NRF_OTPC_Type *p_reg, uint32_t mask)
 Function for disabling the specified interrupts.
 
NRF_STATIC_INLINE uint32_t nrf_otpc_int_enable_check (NRF_OTPC_Type const *p_reg, uint32_t mask)
 Function for checking if the specified interrupts are enabled.
 
NRF_STATIC_INLINE uint32_t nrf_otpc_int_pending_get (NRF_OTPC_Type const *p_reg)
 Function for retrieving the state of pending interrupts.
 
NRF_STATIC_INLINE bool nrf_otpc_ready_check (NRF_OTPC_Type const *p_reg)
 Function for checking current OTPC operation status.
 
NRF_STATIC_INLINE bool nrf_otpc_write_ready_check (NRF_OTPC_Type const *p_reg)
 Function for checking whether OTPC is ready to accept a new write operation.
 
NRF_STATIC_INLINE void nrf_otpc_config_set (NRF_OTPC_Type *p_reg, nrf_otpc_config_t const *p_config)
 Function for setting the OTPC peripheral configuration.
 
NRF_STATIC_INLINE void nrf_otpc_config_get (NRF_OTPC_Type const *p_reg, nrf_otpc_config_t *p_config)
 Function for getting the OTPC peripheral configuration.
 
NRF_STATIC_INLINE void nrf_otpc_waitstates_set (NRF_OTPC_Type *p_reg, uint32_t waitstate_num)
 Function for setting wait states number for the OTP read access.
 
NRF_STATIC_INLINE uint32_t nrf_otpc_waitstates_get (NRF_OTPC_Type const *p_reg)
 Function for reading wait states for OTP read access.
 
NRF_STATIC_INLINE void nrf_otpc_power_init_set (NRF_OTPC_Type *p_reg, nrf_otpc_power_init_t mode)
 Function for setting power mode switching sequence.
 
NRF_STATIC_INLINE nrf_otpc_power_init_t nrf_otpc_power_init_get (NRF_OTPC_Type const *p_reg)
 Function for getting power mode switching sequence.
 
NRF_STATIC_INLINE void nrf_otpc_power_mask_set (NRF_OTPC_Type *p_reg, nrf_otpc_power_conf_t const *p_data)
 Function for setting mask for the various voltages supplies when switching power modes.
 
NRF_STATIC_INLINE void nrf_otpc_power_mask_get (NRF_OTPC_Type const *p_reg, nrf_otpc_power_conf_t *p_data)
 Function for getting mask for the various voltages supplies when switching power modes.
 
NRF_STATIC_INLINE nrf_otpc_power_status_t nrf_otpc_power_status_get (NRF_OTPC_Type const *p_reg)
 Function for getting the power mode status.
 
NRF_STATIC_INLINE void nrf_otpc_power_up_ack_get (NRF_OTPC_Type const *p_reg, nrf_otpc_power_conf_t *p_data)
 Function for getting status of the power control signals acknowledgement during power-up sequence.
 
NRF_STATIC_INLINE void nrf_otpc_power_down_ack_get (NRF_OTPC_Type const *p_reg, nrf_otpc_power_conf_t *p_data)
 Function for getting status of the power control signals acknowledgement during power-down sequence.
 
NRF_STATIC_INLINE void nrf_otpc_power_force_on_set (NRF_OTPC_Type *p_reg, nrf_otpc_power_conf_t const *p_data)
 Function for setting the configuration of force ON signal of the power supply.
 
NRF_STATIC_INLINE void nrf_otpc_power_force_on_get (NRF_OTPC_Type const *p_reg, nrf_otpc_power_conf_t *p_data)
 Function for getting force ON the power supply.
 
NRF_STATIC_INLINE void nrf_otpc_power_force_off_set (NRF_OTPC_Type *p_reg, nrf_otpc_power_conf_t const *p_data)
 Function for setting force OFF the power supply.
 
NRF_STATIC_INLINE void nrf_otpc_power_force_off_get (NRF_OTPC_Type const *p_reg, nrf_otpc_power_conf_t *p_data)
 Function for getting force OFF the power supply.
 
NRF_STATIC_INLINE uint32_t nrf_otpc_puf_read_get (NRF_OTPC_Type const *p_reg)
 Function for getting the PUF bits stream XORed with the PUF pad value. Function returns 0 if the PUF is locked.
 
NRF_STATIC_INLINE void nrf_otpc_puf_pad_set (NRF_OTPC_Type *p_reg, uint32_t pad_val)
 Function for setting the PUF pad value used to XOR with the PUF word read.
 
NRF_STATIC_INLINE nrf_otpc_puf_lock_t nrf_otpc_puf_lock_get (NRF_OTPC_Type const *p_reg)
 Function for getting the status of the PUF write lock.
 
NRF_STATIC_INLINE void nrf_otpc_puf_lock_enable (NRF_OTPC_Type *p_reg)
 Function for enabling the PUF write lock.
 
NRF_STATIC_INLINE void nrf_otpc_standby_timeout_set (NRF_OTPC_Type *p_reg, uint32_t timeout)
 Function for setting timeout to go into standby mode.
 
NRF_STATIC_INLINE uint32_t nrf_otpc_standby_timeout_get (NRF_OTPC_Type const *p_reg)
 Function for getting timeout to go into standby mode.
 
NRF_STATIC_INLINE void nrf_otpc_frequency_set (NRF_OTPC_Type *p_reg, uint32_t freq)
 Function for setting clock frequency of OTPC. This clock is used by the OTPC for timing OTP operations. OTPC rounds this value up internally to the nearest multiple of 20 MHz.
 
NRF_STATIC_INLINE uint32_t nrf_otpc_frequency_get (NRF_OTPC_Type const *p_reg)
 Function for getting clock frequency of OTPC. This clock is used by the OTPC for timing OTP operations. OTPC rounds this value up internally to the nearest multiple of 20 MHz.
 
NRF_STATIC_INLINE void nrf_otpc_region_config_set (NRF_OTPC_Type *p_reg, nrf_otpc_region_config_t const *p_config, uint32_t region)
 Function for setting the configuration of the specified region.
 
NRF_STATIC_INLINE void nrf_otpc_region_config_get (NRF_OTPC_Type const *p_reg, nrf_otpc_region_config_t *p_config, uint32_t region)
 Function for getting the configuration of the specified region.
 
NRF_STATIC_INLINE void nrf_otpc_region_config_lock_set (NRF_OTPC_Type *p_reg, uint32_t region, bool lock)
 Function for setting the configuration lock for the specified region.
 
NRF_STATIC_INLINE bool nrf_otpc_region_config_lock_check (NRF_OTPC_Type const *p_reg, uint32_t region)
 Function for checking the configuration lock for the specified region.
 
NRF_STATIC_INLINE void nrf_otpc_region_write_lock_set (NRF_OTPC_Type *p_reg, uint32_t region, bool lock)
 Function for setting the write lock for the specified region.
 
NRF_STATIC_INLINE bool nrf_otpc_region_write_lock_check (NRF_OTPC_Type const *p_reg, uint32_t region)
 Function for checking if the write lock for the specified region is enabled.
 

Detailed Description

Hardware access layer for managing the One Time Programmable Controller (OTPC) peripheral.

Enumeration Type Documentation

◆ nrf_otpc_event_t

OTPC events.

Enumerator
NRF_OTPC_EVENT_READY 

Current operation is completed.

NRF_OTPC_EVENT_READY_NEXT 

Ready to accept a new write operation.

◆ nrf_otpc_int_mask_t

OTPC interrupts.

Enumerator
NRF_OTPC_INT_READY_MASK 

Interrupt on READY event.

NRF_OTPC_INT_READY_NEXT_MASK 

Interrupt on READYNEXT event.

◆ nrf_otpc_mode_write_t

Write enable (WEN) settings.

Enumerator
NRF_OTPC_MODE_WRITE_DISABLE 

Write is disabled.

NRF_OTPC_MODE_WRITE_ENABLE 

Write is enabled.

◆ nrf_otpc_power_init_t

Power mode settings.

Enumerator
NRF_OTPC_POWER_INIT_MODE_UP 

Triggers power-up sequence.

NRF_OTPC_POWER_INIT_MODE_DOWN 

Triggers power-down sequence.

◆ nrf_otpc_power_status_t

Power mode status.

Enumerator
NRF_OTPC_POWER_STATUS_OFF 

OTP is OFF.

NRF_OTPC_POWER_STATUS_POWER_UP_SEQ 

OTP power-up sequence is active.

NRF_OTPC_POWER_STATUS_STANDBY 

OTP is in standby mode.

NRF_OTPC_POWER_STATUS_ACTIVE 

OTP is in active mode.

NRF_OTPC_POWER_STATUS_POWER_DOWN_SEQ 

OTP power-down sequence is active.

◆ nrf_otpc_puf_lock_t

Status of the PUF write lock.

Enumerator
NRF_OTPC_PUF_LOCK_PENDING 

The PUF.PAD is not written. The PUF.READ is locked.

NRF_OTPC_PUF_LOCK_DISABLED 

PUF.READ is not locked.

NRF_OTPC_PUF_LOCK_ENABLED 

PUF.READ is locked.

Function Documentation

◆ nrf_otpc_config_get()

NRF_STATIC_INLINE void nrf_otpc_config_get ( NRF_OTPC_Type const *  p_reg,
nrf_otpc_config_t p_config 
)

Function for getting the OTPC peripheral configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_configPointer to the structure to be filled with OTPC configuration data.

◆ nrf_otpc_config_set()

NRF_STATIC_INLINE void nrf_otpc_config_set ( NRF_OTPC_Type *  p_reg,
nrf_otpc_config_t const *  p_config 
)

Function for setting the OTPC peripheral configuration.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the structure containing configuration to be set.

◆ nrf_otpc_event_address_get()

NRF_STATIC_INLINE uint32_t nrf_otpc_event_address_get ( NRF_OTPC_Type const *  p_reg,
nrf_otpc_event_t  event 
)

Function for getting the address of the specified OTPC event register.

Parameters
[in]p_regPointer to the peripheral register structure.
[in]eventRequested event.
Returns
Address of the specified event register.

◆ nrf_otpc_event_check()

NRF_STATIC_INLINE bool nrf_otpc_event_check ( NRF_OTPC_Type const *  p_reg,
nrf_otpc_event_t  event 
)

Function for retrieving the state of the OTPC event.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrf_otpc_event_clear()

NRF_STATIC_INLINE void nrf_otpc_event_clear ( NRF_OTPC_Type *  p_reg,
nrf_otpc_event_t  event 
)

Function for clearing the specified OTPC event.

Parameters
[in]p_regPointer to the peripheral register structure.
[in]eventEvent to be cleared.

◆ nrf_otpc_frequency_get()

NRF_STATIC_INLINE uint32_t nrf_otpc_frequency_get ( NRF_OTPC_Type const *  p_reg)

Function for getting clock frequency of OTPC. This clock is used by the OTPC for timing OTP operations. OTPC rounds this value up internally to the nearest multiple of 20 MHz.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Frequency in MHz.

◆ nrf_otpc_frequency_set()

NRF_STATIC_INLINE void nrf_otpc_frequency_set ( NRF_OTPC_Type *  p_reg,
uint32_t  freq 
)

Function for setting clock frequency of OTPC. This clock is used by the OTPC for timing OTP operations. OTPC rounds this value up internally to the nearest multiple of 20 MHz.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]freqFrequency in MHz.

◆ nrf_otpc_int_disable()

NRF_STATIC_INLINE void nrf_otpc_int_disable ( NRF_OTPC_Type *  p_reg,
uint32_t  mask 
)

Function for disabling the specified interrupts.

Parameters
[in]p_regPointer to the peripheral register structure.
[in]maskMask of interrupts to be disabled. Use nrf_otpc_int_mask_t values for bit masking.

◆ nrf_otpc_int_enable()

NRF_STATIC_INLINE void nrf_otpc_int_enable ( NRF_OTPC_Type *  p_reg,
uint32_t  mask 
)

Function for enabling the specified interrupts.

Parameters
[in]p_regPointer to the peripheral register structure.
[in]maskMask of interrupts to be enabled. Use nrf_otpc_int_mask_t values for bit masking.

◆ nrf_otpc_int_enable_check()

NRF_STATIC_INLINE uint32_t nrf_otpc_int_enable_check ( NRF_OTPC_Type const *  p_reg,
uint32_t  mask 
)

Function for checking if the specified interrupts are enabled.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_otpc_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrf_otpc_int_pending_get()

NRF_STATIC_INLINE uint32_t nrf_otpc_int_pending_get ( NRF_OTPC_Type const *  p_reg)

Function for retrieving the state of pending interrupts.

Note
States of pending interrupt are saved as a bitmask. One set at particular position means that interrupt for event is pending.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Bitmask with information about pending interrupts. Use nrf_otpc_int_mask_t values for bit masking.

◆ nrf_otpc_power_down_ack_get()

NRF_STATIC_INLINE void nrf_otpc_power_down_ack_get ( NRF_OTPC_Type const *  p_reg,
nrf_otpc_power_conf_t p_data 
)

Function for getting status of the power control signals acknowledgement during power-down sequence.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about status of the power control signals acknowledgement during power-down sequence.

◆ nrf_otpc_power_force_off_get()

NRF_STATIC_INLINE void nrf_otpc_power_force_off_get ( NRF_OTPC_Type const *  p_reg,
nrf_otpc_power_conf_t p_data 
)

Function for getting force OFF the power supply.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about force OFF power supply.

◆ nrf_otpc_power_force_off_set()

NRF_STATIC_INLINE void nrf_otpc_power_force_off_set ( NRF_OTPC_Type *  p_reg,
nrf_otpc_power_conf_t const *  p_data 
)

Function for setting force OFF the power supply.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the structure filled with information about force OFF power supply.

◆ nrf_otpc_power_force_on_get()

NRF_STATIC_INLINE void nrf_otpc_power_force_on_get ( NRF_OTPC_Type const *  p_reg,
nrf_otpc_power_conf_t p_data 
)

Function for getting force ON the power supply.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about force ON power supply.

◆ nrf_otpc_power_force_on_set()

NRF_STATIC_INLINE void nrf_otpc_power_force_on_set ( NRF_OTPC_Type *  p_reg,
nrf_otpc_power_conf_t const *  p_data 
)

Function for setting the configuration of force ON signal of the power supply.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the structure filled with information about force ON power supply.

◆ nrf_otpc_power_init_get()

NRF_STATIC_INLINE nrf_otpc_power_init_t nrf_otpc_power_init_get ( NRF_OTPC_Type const *  p_reg)

Function for getting power mode switching sequence.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Power mode switching sequence.

◆ nrf_otpc_power_init_set()

NRF_STATIC_INLINE void nrf_otpc_power_init_set ( NRF_OTPC_Type *  p_reg,
nrf_otpc_power_init_t  mode 
)

Function for setting power mode switching sequence.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]modePower mode switching sequence.

◆ nrf_otpc_power_mask_get()

NRF_STATIC_INLINE void nrf_otpc_power_mask_get ( NRF_OTPC_Type const *  p_reg,
nrf_otpc_power_conf_t p_data 
)

Function for getting mask for the various voltages supplies when switching power modes.

Note
All bits must be set to 0 for normal operation of OTP. Incorrect usage would result in unknown behavior of OTP. Do not use this function unless you know the consequences.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about various voltages supplies when switching power modes.

◆ nrf_otpc_power_mask_set()

NRF_STATIC_INLINE void nrf_otpc_power_mask_set ( NRF_OTPC_Type *  p_reg,
nrf_otpc_power_conf_t const *  p_data 
)

Function for setting mask for the various voltages supplies when switching power modes.

Note
All bits must be set to 0 for normal operation of OTP. Incorrect usage would result in unknown behavior of OTP.
Warning
Do not use this function unless you know the consequences.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_dataPointer to the structure filled with information about various voltages supplies when switching power modes.

◆ nrf_otpc_power_status_get()

NRF_STATIC_INLINE nrf_otpc_power_status_t nrf_otpc_power_status_get ( NRF_OTPC_Type const *  p_reg)

Function for getting the power mode status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Status of the power mode.

◆ nrf_otpc_power_up_ack_get()

NRF_STATIC_INLINE void nrf_otpc_power_up_ack_get ( NRF_OTPC_Type const *  p_reg,
nrf_otpc_power_conf_t p_data 
)

Function for getting status of the power control signals acknowledgement during power-up sequence.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_dataPointer to the structure to be filled with information about status of the power control signals acknowledgement during power-up sequence.

◆ nrf_otpc_puf_lock_enable()

NRF_STATIC_INLINE void nrf_otpc_puf_lock_enable ( NRF_OTPC_Type *  p_reg)

Function for enabling the PUF write lock.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrf_otpc_puf_lock_get()

NRF_STATIC_INLINE nrf_otpc_puf_lock_t nrf_otpc_puf_lock_get ( NRF_OTPC_Type const *  p_reg)

Function for getting the status of the PUF write lock.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
PUF pad value.

◆ nrf_otpc_puf_pad_set()

NRF_STATIC_INLINE void nrf_otpc_puf_pad_set ( NRF_OTPC_Type *  p_reg,
uint32_t  pad_val 
)

Function for setting the PUF pad value used to XOR with the PUF word read.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]pad_valPUF pad value.

◆ nrf_otpc_puf_read_get()

NRF_STATIC_INLINE uint32_t nrf_otpc_puf_read_get ( NRF_OTPC_Type const *  p_reg)

Function for getting the PUF bits stream XORed with the PUF pad value. Function returns 0 if the PUF is locked.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
PUF word from the the PUF bits stream XORed with the PUF pad value.

◆ nrf_otpc_ready_check()

NRF_STATIC_INLINE bool nrf_otpc_ready_check ( NRF_OTPC_Type const *  p_reg)

Function for checking current OTPC operation status.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueCurrent operation is completed and OTPC is ready.
falseOTPC is busy.

◆ nrf_otpc_region_config_get()

NRF_STATIC_INLINE void nrf_otpc_region_config_get ( NRF_OTPC_Type const *  p_reg,
nrf_otpc_region_config_t p_config,
uint32_t  region 
)

Function for getting the configuration of the specified region.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[out]p_configPointer to the structure to be filled with region configuration data.
[in]regionRegion.

◆ nrf_otpc_region_config_lock_check()

NRF_STATIC_INLINE bool nrf_otpc_region_config_lock_check ( NRF_OTPC_Type const *  p_reg,
uint32_t  region 
)

Function for checking the configuration lock for the specified region.

Note
If lock is enabled, changing the configuration of the region is not possible, and any config set with nrf_otpc_region_config_set is ignored.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]regionRegion.
Return values
trueRegion is locked.
falseRegion is not locked.

◆ nrf_otpc_region_config_lock_set()

NRF_STATIC_INLINE void nrf_otpc_region_config_lock_set ( NRF_OTPC_Type *  p_reg,
uint32_t  region,
bool  lock 
)

Function for setting the configuration lock for the specified region.

Note
If lock is enabled, changing the configuration of the region is not possible, and any config set with nrf_otpc_region_config_set is ignored.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]regionRegion.
[in]lockTrue if lock is to be enabled, false otherwise.

◆ nrf_otpc_region_config_set()

NRF_STATIC_INLINE void nrf_otpc_region_config_set ( NRF_OTPC_Type *  p_reg,
nrf_otpc_region_config_t const *  p_config,
uint32_t  region 
)

Function for setting the configuration of the specified region.

Note
Setting the configuration is not possible if the configuration is locked. Use nrf_otpc_region_config_lock_check to check the status of the configuration lock.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the structure with region configuration to be set.
[in]regionRegion.

◆ nrf_otpc_region_write_lock_check()

NRF_STATIC_INLINE bool nrf_otpc_region_write_lock_check ( NRF_OTPC_Type const *  p_reg,
uint32_t  region 
)

Function for checking if the write lock for the specified region is enabled.

Note
If lock is enabled, writing to the region is not possible, and any written value is ignored.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]regionRegion.
Return values
trueRegion is locked.
falseRegion is not locked.

◆ nrf_otpc_region_write_lock_set()

NRF_STATIC_INLINE void nrf_otpc_region_write_lock_set ( NRF_OTPC_Type *  p_reg,
uint32_t  region,
bool  lock 
)

Function for setting the write lock for the specified region.

Note
If lock is enabled, writing to the region is not possible, and any written value is ignored.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]regionRegion.
[in]lockTrue if lock is to be enabled, false otherwise.

◆ nrf_otpc_standby_timeout_get()

NRF_STATIC_INLINE uint32_t nrf_otpc_standby_timeout_get ( NRF_OTPC_Type const *  p_reg)

Function for getting timeout to go into standby mode.

Note
It is the timeout between two OTP memory operations (read or write) or PUF read. Timeout is disabled if the returned value is zero.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Timeout in terms of OTPC clock cycles, based on frequency.

◆ nrf_otpc_standby_timeout_set()

NRF_STATIC_INLINE void nrf_otpc_standby_timeout_set ( NRF_OTPC_Type *  p_reg,
uint32_t  timeout 
)

Function for setting timeout to go into standby mode.

Note
It is the timeout between two OTP memory operations (read or write) or PUF read. This feature is disabled when the timeout is set to zero.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]timeoutTimeout in terms of OTPC clock cycles, based on frequency. Allowed values 0-511.

◆ nrf_otpc_waitstates_get()

NRF_STATIC_INLINE uint32_t nrf_otpc_waitstates_get ( NRF_OTPC_Type const *  p_reg)

Function for reading wait states for OTP read access.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Current number of wait states for the OTP read.

◆ nrf_otpc_waitstates_set()

NRF_STATIC_INLINE void nrf_otpc_waitstates_set ( NRF_OTPC_Type *  p_reg,
uint32_t  waitstate_num 
)

Function for setting wait states number for the OTP read access.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]waitstate_numNumber of wait states for the OTP read to be set.

◆ nrf_otpc_write_ready_check()

NRF_STATIC_INLINE bool nrf_otpc_write_ready_check ( NRF_OTPC_Type const *  p_reg)

Function for checking whether OTPC is ready to accept a new write operation.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueOTPC is ready to accept a new write operation.
falseOTPC cannot accept any write operation now.

Documentation feedback | Developer Zone | Subscribe | Updated