HPM SDK
HPMicro Software Development Kit
hpm_otp_drv.h File Reference
#include "hpm_common.h"

Go to the source code of this file.

Enumerations

enum  otp_region_t {
  otp_region0_mask = 1U , otp_region1_mask = 2U , otp_region2_mask = 4U , otp_region3_mask = 8U ,
  otp_region0_mask = 1U , otp_region1_mask = 2U , otp_region2_mask = 4U , otp_region3_mask = 8U ,
  otp_region0_mask = 1U , otp_region1_mask = 2U , otp_region2_mask = 4U , otp_region3_mask = 8U ,
  otp_region0_mask = 1U , otp_region1_mask = 2U , otp_region2_mask = 4U , otp_region3_mask = 8U ,
  otp_region0_mask = 1U , otp_region1_mask = 2U , otp_region2_mask = 4U , otp_region3_mask = 8U ,
  otp_region0_mask = 1U , otp_region1_mask = 2U , otp_region2_mask = 4U , otp_region3_mask = 8U ,
  otp_region0_mask = 1U , otp_region1_mask = 2U , otp_region2_mask = 4U , otp_region3_mask = 8U ,
  otp_region0_mask = 1U , otp_region1_mask = 2U , otp_region2_mask = 4U , otp_region3_mask = 8U
}
 OTP region definitions. More...
 
enum  otp_lock_option_t {
  otp_no_lock = 0 , otp_read_only = 1 , otp_permanent_no_lock = 2 , otp_disable_access = 3 ,
  otp_lock_option_max = otp_disable_access , otp_no_lock = 0 , otp_read_only = 1 , otp_permanent_no_lock = 2 ,
  otp_disable_access = 3 , otp_lock_option_max = otp_disable_access , otp_no_lock = 0 , otp_read_only = 1 ,
  otp_permanent_no_lock = 2 , otp_disable_access = 3 , otp_lock_option_max = otp_disable_access , otp_no_lock = 0 ,
  otp_read_only = 1 , otp_permanent_no_lock = 2 , otp_disable_access = 3 , otp_lock_option_max = otp_disable_access ,
  otp_no_lock = 0 , otp_read_only = 1 , otp_permanent_no_lock = 2 , otp_disable_access = 3 ,
  otp_lock_option_max = otp_disable_access , otp_no_lock = 0 , otp_read_only = 1 , otp_permanent_no_lock = 2 ,
  otp_disable_access = 3 , otp_lock_option_max = otp_disable_access , otp_no_lock = 0 , otp_read_only = 1 ,
  otp_permanent_no_lock = 2 , otp_disable_access = 3 , otp_lock_option_max = otp_disable_access , otp_no_lock = 0 ,
  otp_read_only = 1 , otp_permanent_no_lock = 2 , otp_disable_access = 3 , otp_lock_option_max = otp_disable_access
}
 OTP lock options. More...
 
enum  { otp_write_disallowed = MAKE_STATUS(status_group_otp, 0) }
 

Functions

void otp_init (void)
 Initialize OTP controller. More...
 
void otp_deinit (void)
 De-initialize OTP controller. More...
 
uint32_t otp_read_from_shadow (uint32_t addr)
 Read the OTP word from shadow register. More...
 
uint32_t otp_read_from_ip (uint32_t addr)
 Read the specified OTP word from OTP IP bus. More...
 
hpm_stat_t otp_program (uint32_t addr, const uint32_t *src, uint32_t num_of_words)
 Program a word to specified OTP field. More...
 
hpm_stat_t otp_reload (otp_region_t region)
 Reload a OTP region. More...
 
hpm_stat_t otp_lock_otp (uint32_t addr, otp_lock_option_t lock_option)
 Change the Software lock permission. More...
 
hpm_stat_t otp_lock_shadow (uint32_t addr, otp_lock_option_t lock_option)
 OTP lock shadow. More...
 
hpm_stat_t otp_set_configurable_region (uint32_t start, uint32_t num_of_words)
 Set the configurable region range. More...
 
hpm_stat_t otp_write_shadow_register (uint32_t addr, uint32_t val)