Otfad_hal

## Data Structures

struct | otfad_context_info_t
| Format of context info. More...

## Enumerations

enum | _hal_constants { kOtfadNumKeyWords = 4, kOtfadNumCtrWords = 2, kOtfadNumRgnWords = 2 }
| Constants. More...
enum | _otfad_modes { kOtfadMode_Normal = 0x00, kOtfadMode_SecurityViolation = 0x02, kOtfadMode_LogiallyDisabled = 0x03 }
| Operational modes. More...
enum | _otfad_enables { kOtfadDisable = 0x00, kOtfadEnable = 0x01 }
| Enable flags. More...

## Functions

uint32_t | otfad_hal_get_mode (OTFAD_Type *baseAddr)
| Get the current mode. More...
void | otfad_hal_global_enable (OTFAD_Type *baseAddr)
| Enable the module. More...
bool | otfad_hal_is_enabled (OTFAD_Type *baseAddr)
| Get enabled state. More...
void | otfad_hal_restricted_register_access_enable (OTFAD_Type *baseAddr)
| Enable restricted register status. More...
bool | otfad_hal_is_register_access_restricted (OTFAD_Type *baseAddr)
| Get restricted register access state. More...
uint32_t | otfad_hal_get_hardware_revision_level (OTFAD_Type *baseAddr)
| Get hardware revision level. More...
uint32_t | otfad_hal_get_number_of_contexts (OTFAD_Type *baseAddr)
| Get number of contexts. More...
void | otfad_hal_set_context (OTFAD_Type *baseAddr, uint32_t contextNum, const otfad_context_info_t *contextInfo)
| Set context info. More...

## Usage Information

## Data Structure Documentation

struct otfad_context_info_t

Format of context info.

Data Fields
uint32_t | ctrInfo[kOtfadNumCtrWords] | Counter words.
uint32_t | keyInfo[kOtfadNumKeyWords] | Key words.
uint32_t | regionInfo[kOtfadNumRgnWords] | Region words.

## Enumeration Type Documentation

enum _hal_constants

Constants.

Enumerator
kOtfadNumKeyWords | Number of key words.
kOtfadNumCtrWords | Number of counter words.
kOtfadNumRgnWords | Number of region words.

enum _otfad_enables

Enable flags.

Enumerator
kOtfadDisable | Disable.
kOtfadEnable | Enable.

enum _otfad_modes

Operational modes.

Enumerator
kOtfadMode_Normal | Normal mode (NRM)
kOtfadMode_SecurityViolation | Security Violation Mode (SVM)
kOtfadMode_LogiallyDisabled | Logically Disabled Mode (LDM)

## Function Documentation

uint32_t otfad_hal_get_hardware_revision_level | ( | OTFAD_Type * | baseAddr | ) |

Get hardware revision level.

Parameters

  baseAddr | Module base address

Returns
  Hardware revision level from status register

uint32_t otfad_hal_get_mode | ( | OTFAD_Type * | baseAddr | ) |

Get the current mode.

Parameters

  baseAddr | Module base address

Returns
  Current mode in status register

uint32_t otfad_hal_get_number_of_contexts | ( | OTFAD_Type * | baseAddr | ) |

Get number of contexts.

Parameters

  baseAddr | Module base address

Returns
  Number of contexts from status register

void otfad_hal_global_enable | ( | OTFAD_Type * | baseAddr | ) |

Enable the module.

Set the global enable flag in the control register to '1'. A power-on reset is required to clear this flag.

Parameters

  baseAddr | Module base address

bool otfad_hal_is_enabled | ( | OTFAD_Type * | baseAddr | ) |

Get enabled state.

Parameters

  baseAddr | Module base address

Returns
  Global enabled flag in status register

bool otfad_hal_is_register_access_restricted | ( | OTFAD_Type * | baseAddr | ) |

Get restricted register access state.

Parameters

  baseAddr | Module base address

Returns
  Restricted register access flag in status register

void otfad_hal_restricted_register_access_enable | ( | OTFAD_Type * | baseAddr | ) |

Enable restricted register status.

Set the restricted register access enable flag in the control register to '1'. A power-on reset is required to clear this flag.

Parameters

  baseAddr | Module base address

void otfad_hal_set_context | ( | OTFAD_Type * | baseAddr,
|  | uint32_t | contextNum,
|  | const otfad_context_info_t * | contextInfo
| ) |  |

Set context info.

Parameters

  baseAddr | Module base address
  contextNum | Context number
  contextInfo | Ponter to context info struct