RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures
Ssarc

Data Structures

struct  _ssarc_descriptor_config
 The configuration of descriptor. More...
 
struct  _ssarc_group_config
 The configuration of the group. More...
 

Driver version

enum  _ssarc_interrupt_status_flags {
  kSSARC_AddressErrorFlag = SSARC_LP_INT_STATUS_ADDR_ERR_MASK , kSSARC_AHBErrorFlag = SSARC_LP_INT_STATUS_AHB_ERR_MASK , kSSARC_SoftwareRequestDoneFlag = SSARC_LP_INT_STATUS_SW_REQ_DONE_MASK , kSSARC_TimeoutFlag = SSARC_LP_INT_STATUS_TIMEOUT_MASK ,
  kSSARC_GroupConflictFlag = SSARC_LP_INT_STATUS_GROUP_CONFLICT_MASK
}
 The enumeration of ssarc status flags. More...
 
enum  _ssarc_descriptor_register_size { kSSARC_DescriptorRegister8bitWidth = 0x0U , kSSARC_DescriptorRegister16bitWidth = 0x1U , kSSARC_DescriptorRegister32bitWidth = 0x2U }
 The size of the register to be saved/restored. More...
 
enum  _ssarc_descriptor_operation { kSSARC_SaveDisableRestoreDisable = 0x0U , kSSARC_SaveEnableRestoreDisable = SSARC_HP_SRAM2_SV_EN_MASK , kSSARC_SaveDisableRestoreEnable = SSARC_HP_SRAM2_RT_EN_MASK , kSSARC_SaveEnableRestoreEnable = (SSARC_HP_SRAM2_RT_EN_MASK | SSARC_HP_SRAM2_SV_EN_MASK) }
 The operation of the descriptor. More...
 
enum  _ssarc_descriptor_type {
  kSSARC_ReadValueWriteBack = 0x00U , kSSARC_WriteFixedValue = 0x01U , kSSARC_RMWOr = 0x02U , kSSARC_RMWAnd = 0x03U ,
  kSSARC_DelayCycles = 0x04U , kSSARC_Polling0 = 0x05U , kSSARC_Polling1 = 0x06U
}
 The type of operation. More...
 
enum  _ssarc_save_restore_order { kSSARC_ProcessFromStartToEnd = 0U , kSSARC_ProcessFromEndToStart = 1U }
 The order of the restore/save operation. More...
 
enum  _ssarc_software_trigger_mode { kSSARC_TriggerSaveRequest = SSARC_LP_DESC_CTRL1_SW_TRIG_SV_MASK , kSSARC_TriggerRestoreRequest = SSARC_LP_DESC_CTRL1_SW_TRIG_RT_MASK }
 Software trigger mode. More...
 
typedef enum _ssarc_descriptor_register_size ssarc_descriptor_register_size_t
 The size of the register to be saved/restored.
 
typedef enum _ssarc_descriptor_operation ssarc_descriptor_operation_t
 The operation of the descriptor.
 
typedef enum _ssarc_descriptor_type ssarc_descriptor_type_t
 The type of operation.
 
typedef enum _ssarc_save_restore_order ssarc_save_restore_order_t
 The order of the restore/save operation.
 
typedef enum _ssarc_software_trigger_mode ssarc_software_trigger_mode_t
 Software trigger mode.
 
typedef struct _ssarc_descriptor_config ssarc_descriptor_config_t
 The configuration of descriptor.
 
typedef struct _ssarc_group_config ssarc_group_config_t
 The configuration of the group.
 
#define FSL_SSARC_DRIVER_VERSION   (MAKE_VERSION(2, 1, 0))
 SSARC driver version 2.1.0.
 
#define SSARC_INT_STATUS_ALL
 

Descriptor related APIs.

void SSARC_SetDescriptorConfig (SSARC_HP_Type *base, uint32_t index, const ssarc_descriptor_config_t *config)
 Sets the configuration of the descriptor.
 

Group Related APIs

void SSARC_GroupInit (SSARC_LP_Type *base, uint8_t groupID, const ssarc_group_config_t *config)
 Inits the selected group.
 
void SSARC_TriggerSoftwareRequest (SSARC_LP_Type *base, uint8_t groupID, ssarc_software_trigger_mode_t mode)
 Triggers software request.
 

Detailed Description

Macro Definition Documentation

◆ SSARC_INT_STATUS_ALL

#define SSARC_INT_STATUS_ALL
Value:
(SSARC_LP_INT_STATUS_ADDR_ERR_MASK | SSARC_LP_INT_STATUS_AHB_ERR_MASK | SSARC_LP_INT_STATUS_SW_REQ_DONE_MASK | \
SSARC_LP_INT_STATUS_TIMEOUT_MASK | SSARC_LP_INT_STATUS_GROUP_CONFLICT_MASK)

Enumeration Type Documentation

◆ _ssarc_descriptor_operation

The operation of the descriptor.

Enumerator
kSSARC_SaveDisableRestoreDisable 

Disable Save operation, disable restore operation.

kSSARC_SaveEnableRestoreDisable 

Enable Save operation, disable restore operation.

kSSARC_SaveDisableRestoreEnable 

Disable Save operation, enable restore operation.

kSSARC_SaveEnableRestoreEnable 

Enable Save operation, enable restore operation.

◆ _ssarc_descriptor_register_size

The size of the register to be saved/restored.

Enumerator
kSSARC_DescriptorRegister8bitWidth 

The register to be saved/restored is 8 bit width.

kSSARC_DescriptorRegister16bitWidth 

The register to be saved/restored is 16 bit width.

kSSARC_DescriptorRegister32bitWidth 

The register to be saved/restored is 32 bit width.

◆ _ssarc_descriptor_type

The type of operation.

Enumerator
kSSARC_ReadValueWriteBack 

Read the register value on save operation and write it back on restore operation

kSSARC_WriteFixedValue 

Always write a fixed value from DATA[31:0]

kSSARC_RMWOr 

Read register, OR with the DATA[31:0], and write it back

kSSARC_RMWAnd 

Read register, AND with the DATA[31:0], and write it back

kSSARC_DelayCycles 

Delay for number of cycles based on the DATA[31:0]

kSSARC_Polling0 

Read the register until read_data[31:0] & DATA[31:0] == 0

kSSARC_Polling1 

Read the register until read_data[31:0] & DATA[31:0] != 0

◆ _ssarc_interrupt_status_flags

The enumeration of ssarc status flags.

Enumerator
kSSARC_AddressErrorFlag 

If the descriptor is not in the range, assert address error.

kSSARC_AHBErrorFlag 

If any AHB master access receives none-OKAY, assert AHB error.

kSSARC_SoftwareRequestDoneFlag 

If a software triggered save or restore process is completed, assert sofware request done .

kSSARC_TimeoutFlag 

If processing of a group has exceeded the timeout value, assert timeout.

kSSARC_GroupConflictFlag 

Group conflict.

◆ _ssarc_save_restore_order

The order of the restore/save operation.

Enumerator
kSSARC_ProcessFromStartToEnd 

Descriptors within the group are processed from start to end.

kSSARC_ProcessFromEndToStart 

Descriptors within the group are processed from end to start.

◆ _ssarc_software_trigger_mode

Software trigger mode.

Enumerator
kSSARC_TriggerSaveRequest 

Don't trigger restore operation, trigger the save operation by software.

kSSARC_TriggerRestoreRequest 

Trigger the restore operation, don't trigger the save operation.

Function Documentation

◆ SSARC_GroupInit()

void SSARC_GroupInit ( SSARC_LP_Type base,
uint8_t  groupID,
const ssarc_group_config_t config 
)

Inits the selected group.

Note
For the groups with the same save priority or restore priority, the save/restore operation runs in the group order.
Parameters
baseSSARC_LP peripheral base address.
groupIDThe index of the group. Range from 0 to 15.
configPointer to the structure ssarc_group_config_t. Please refer to ssarc_group_config_t for details.

brief Init the selected group.

note For the groups with the same save priority or restore priority, the save/restore operation runs in the group order.

param base SSARC_LP peripheral base address. param groupID The index of the group. Range from 0 to 15. param config Pointer to the structure ssarc_group_config_t. Please refer to ssarc_group_config_t for details.

◆ SSARC_SetDescriptorConfig()

void SSARC_SetDescriptorConfig ( SSARC_HP_Type base,
uint32_t  index,
const ssarc_descriptor_config_t config 
)

Sets the configuration of the descriptor.

Parameters
baseSSARC_HP peripheral base address.
indexThe index of descriptor. Range from 0 to 1023.
configPointer to the structure ssarc_descriptor_config_t. Please refer to ssarc_descriptor_config_t for details.

brief Sets the configuration of the descriptor.

param base SSARC_HP peripheral base address. param index The index of descriptor. Range from 0 to 1023. param config Pointer to the structure ssarc_descriptor_config_t. Please refer to ssarc_descriptor_config_t for details.

◆ SSARC_TriggerSoftwareRequest()

void SSARC_TriggerSoftwareRequest ( SSARC_LP_Type base,
uint8_t  groupID,
ssarc_software_trigger_mode_t  mode 
)

Triggers software request.

Note
Each group allows software to trigger the save/restore operation without getting the request from basic power controller.
Parameters
baseSSARC_LP peripheral base address.
groupIDThe index of the group. Range from 0 to 15.
modeSoftware trigger mode. Please refer to ssarc_software_trigger_mode_t for details.

brief Triggers software request.

note Each group allows software to trigger the save/restore operation without getting the request from basic power controller.

param base SSARC_LP peripheral base address. param groupID The index of the group. Range from 0 to 15. param mode. Software trigger mode. Please refer to ssarc_software_trigger_mode_t for details.