AM275 FreeRTOS SDK  11.02.00

Introduction

This module contains APIs to program and use the HYPERBUS module. The APIs can be used by other drivers to get access to HYPERBUS and also by application to initiate data transfer operation.

Files

file  hyperbus/v0/hyperbus.h
 HYPERBUS Driver API/interface file.
 

Data Structures

struct  HYPERBUS_ECCErrorInfo
 ECC Error Information structure. More...
 
struct  HYPERBUS_ECCRegions
 ECC region The structure specifies the ECC region start address and size. More...
 
struct  HYPERBUS_ECCRegion
 Structure containing ECC region params. More...
 
struct  HYPERBUS_MemCfg
 Memory Configuration Structure. More...
 
struct  HYPERBUS_fssDataIf
 FSS Data Interface Structure. More...
 
struct  HYPERBUS_fssHandle
 FSS Handle Structure. More...
 
struct  HYPERBUS_MemTiming
 Register structure for the Memory Timing Register. More...
 
struct  HYPERBUS_Params
 HYPERBUS Parameters. More...
 
struct  HYPERBUS_Attrs
 HYPERBUS instance attributes - used during init time. More...
 
struct  HYPERBUS_Object
 HYPERBUS driver object. More...
 
struct  HYPERBUS_Config
 HYPERBUS driver configuration structure. More...
 

Functions

void HYPERBUS_init (void)
 This function initializes the HYPERBUS module. More...
 
void HYPERBUS_deinit (void)
 This function de-initializes the HYPERBUS module. More...
 
HYPERBUS_Handle HYPERBUS_open (uint32_t index)
 This function opens a given HYPERBUS peripheral. More...
 
void HYPERBUS_close (HYPERBUS_Handle handle)
 Function to close a HYPERBUS peripheral specified by the HYPERBUS handle. More...
 
HYPERBUS_Handle HYPERBUS_getHandle (uint32_t index)
 This function returns the handle of an open HYPERBUS Instance from the instance index. More...
 
uint32_t HYPERBUS_getHyperBusDataBaseAddr (HYPERBUS_Handle handle)
 This function gets the SOC mapped data base address of the HyperRam. More...
 
static uint32_t HYPERBUS_makeMemCfg (HYPERBUS_Handle handle, HYPERBUS_MemCfg *pHyperBusMemCfg)
 This function returns the memory configuration of the HYPERBUS Instance. More...
 
static uint32_t HYPERBUS_makeMemTiming (HYPERBUS_Handle handle, HYPERBUS_MemTiming *pHyperBusMemTiming)
 This function returns the memory Timings of the HYPERBUS Instance. More...
 
static void HYPERBUS_isr (void *args)
 This function is called by the HwiP module to service interrupts generated by the FSS of the HYPERBUS controller. More...
 
int32_t HYPERBUS_configureECC (HYPERBUS_Handle handle)
 This function configures the ECC regions for the HYPERBUS Instance. More...
 
int32_t HYPERBUS_setECCRegion (HYPERBUS_Handle handle, uint8_t region)
 This function sets the ECC region for the HYPERBUS Instance. More...
 
int32_t HYPERBUS_enableECC (HYPERBUS_Handle handle, uint8_t enableFlag)
 This function enables or disables ECC for the HYPERBUS Instance. More...
 
int32_t HYPERBUS_clearECCError (HYPERBUS_Handle handle, uint8_t errorType)
 This function clears the ECC error for the HYPERBUS Instance. More...
 
int32_t HYPERBUS_getECCErrorInfo (HYPERBUS_Handle handle, HYPERBUS_ECCErrorInfo *ECCErrorInfo)
 This function returns the ECC error information for the HYPERBUS Instance. More...
 

Typedefs

typedef void * HYPERBUS_Handle
 A handle that is returned from a HYPERBUS_open() call. More...
 
typedef void(* HYPERBUS_ECCCallbackFxn) (HYPERBUS_Handle hyperbusHandle, uint8_t errorType)
 The definition of a callback function used by the HYPERBUS driver when ECC error interrupts occur. More...
 

Enumerations

enum  HYPERBUS_Devicetype { HYPERBUS_DEVICETYPE_HYPERRAM, HYPERBUS_DEVICETYPE_NONE, HYPERBUS_DEVICETYPE_HYPERFLASH }
 Enum for device type. More...
 

Macros

#define HYPERBUS_MEM_OFFSET   0U
 Memory offset for HYPERBUS controller. More...
 
#define HYPERBUS_MCR_CONFIGURABLE_CS_LOW_TIME   0x1U
 Memory Configuration Register defines. More...
 
#define HYPERBUS_MCR_NO_CONFIGURABLE_CS_LOW_TIME   0x0U
 
#define HYPERBUS_MCR_MAXLEN_2_BYTE   0x0U
 Maximum Length defines. More...
 
#define HYPERBUS_MCR_MAXLEN_4_BYTE   0x1U
 
#define HYPERBUS_MCR_MAXLEN_6_BYTE   0x2U
 
#define HYPERBUS_MCR_MAXLEN_1024_BYTE   0x1FFU
 
#define HYPERBUS_MCR_MERGE_WRAP_INCR   0x1U
 Memory Configuration Register defines. More...
 
#define HYPERBUS_MCR_NO_MERGE_WRAP_INCR   0x0U
 
#define HYPERBUS_MCR_ASYMM_CACHE_SUPPORT   0x1U
 Memory Configuration Register defines. More...
 
#define HYPERBUS_MCR_NO_ASYMM_CACHE_SUPPORT   0x0U
 
#define HYPERBUS_MCR_MEM_SPACE   0x0U
 Memory Configuration Register defines. More...
 
#define HYPERBUS_MCR_CR_SPACE   0x1U
 
#define HYPERBUS_MCR_HYPERFLASH   0x0U
 Memory Configuration Register defines. More...
 
#define HYPERBUS_MCR_HYPERRAM   0x1U
 
#define HYPERBUS_MCR_WRAPSIZE_NONE   0x0U
 Memory Configuration Register defines. More...
 
#define HYPERBUS_MCR_WRAPSIZE_64B   0x1U
 
#define HYPERBUS_MCR_WRAPSIZE_16B   0x2U
 
#define HYPERBUS_MCR_WRAPSIZE_32B   0x3U
 
#define HYPERBUS_DMA_CH_INVALID   (-1)
 Invalid DMA channel index value. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_SYSCONFIG_ECC_ENABLE   (0x00000001U)
 Value to enable ECC in SYSCONFIG register. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_SYSCONFIG_ECC_DISABLE   (0x00000000U)
 Value to disable ECC in SYSCONFIG register. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_WRITE_NONALIGN_ERR_MASK   (0x4U)
 Mask for write non-aligned error field in STATUS_RAW register. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_WRITE_NONALIGN_ERR_SHIFT   (0x2U)
 Shift for write non-aligned error field in STATUS_RAW register. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_DOUBLE_BIT_ERR_MASK   (0x2U)
 Mask for double bit error field in STATUS_RAW register. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_DOUBLE_BIT_ERR_SHIFT   (0x1U)
 Shift for double bit error field in STATUS_RAW register. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_SINGLE_BIT_ERR_MASK   (0x1U)
 Mask for single bit error field in STATUS_RAW register. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_SINGLE_BIT_ERR_SHIFT   (0x0U)
 Shift for single bit error field in STATUS_RAW register. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_ERR_ECC_TYPE_OFFSET   (0x00000074U)
 Offset of ECC error type register in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_ERR_WRT_TYPE_OFFSET   (0x00000078U)
 Offset of write error type register in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_ECC_ERR_CLEAR_VALUE   (0x80000000U)
 Value to clear ECC error in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_EOI_OFFSET   (0x00000010U)
 Offset of EOI register in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_EOI_VECTOR   (0x00000001U)
 Value to write to EOI register to clear interrupt in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_OFFSET   (0x00000014U)
 Offset of STATUS_RAW register in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_STATUS_OFFSET   (0x00000018U)
 Offset of IRQ status register in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_SET_OFFSET   (0x0000001cU)
 Offset of IRQ enable set register in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_CLR_OFFSET   (0x00000020U)
 Offset of IRQ enable clear register in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_SET_VALUE   (0x00000007U)
 Value to write to IRQ enable set register to enable interrupts in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_CLR_VALUE   (0x00000007U)
 Value to write to IRQ enable clear register to disable interrupts in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_ECC_REGION_START_OFFSET   (0x00000030U)
 Offset of ECC region start address register in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_ECC_REGION_SIZE_OFFSET   (0x00000034U)
 Offset of ECC region size register in Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_ECC_REGION_OFFSET_STEP   (0x00000008U)
 Offset step to access ECC region start address and size registers. More...
 
#define HYPERBUS_FSS_FSAS_ECC_REGION_START_ADDR_SHIFT   (0x0000000cU)
 Shift value to get ECC region start address in 4KBytes steps. More...
 
#define HYPERBUS_FSS_FSAS_ECC_REGION_SIZE_SHIFT   (0x0000000cU)
 Shift value to get ECC region size in 4KBytes steps. More...
 
#define HYPERBUS_FSS_FSAS_NUM_ECC_REGIONS   (0x4U)
 Number of ECC regions supported by the Hyperbus FSS module. More...
 
#define HYPERBUS_FSS_FSAS_ECC_REGION0   (0U)
 First ECC region in Hyperbus FSS module (region 0) More...
 
#define HYPERBUS_FSS_FSAS_ECC_REGION1   (1U)
 Second ECC region in Hyperbus FSS module (region 1) More...
 
#define HYPERBUS_FSS_FSAS_ECC_REGION2   (2U)
 Third ECC region in Hyperbus FSS module (region 2) More...
 
#define HYPERBUS_FSS_FSAS_ECC_REGION3   (3U)
 Fourth ECC region in Hyperbus FSS module (region 3) More...
 

Chip Selects

Chip selects

#define HYPERBUS_CS0   (0U)
 
#define HYPERBUS_CS1   (1U)
 

HYPERBUS ECC error type

#define HYPERBUS_ECC_1B_ERROR   (0U)
 
#define HYPERBUS_ECC_2B_ERROR   (1U)
 
#define HYPERBUS_ECC_WRITE_NONALIGN_ERROR   (2U)
 
#define HYPERBUS_ECC_ERR_ALL   (3U)
 

Macro Definition Documentation

◆ HYPERBUS_MEM_OFFSET

#define HYPERBUS_MEM_OFFSET   0U

Memory offset for HYPERBUS controller.

◆ HYPERBUS_MCR_CONFIGURABLE_CS_LOW_TIME

#define HYPERBUS_MCR_CONFIGURABLE_CS_LOW_TIME   0x1U

Memory Configuration Register defines.

0x1 = configurable CS# low time, 0x0 otherwise

◆ HYPERBUS_MCR_NO_CONFIGURABLE_CS_LOW_TIME

#define HYPERBUS_MCR_NO_CONFIGURABLE_CS_LOW_TIME   0x0U

◆ HYPERBUS_MCR_MAXLEN_2_BYTE

#define HYPERBUS_MCR_MAXLEN_2_BYTE   0x0U

Maximum Length defines.

This bit indicates maximum read/write transaction length to memory. This bit is ignored when MAXEN bit is 0. 000000000: 2 Byte [1 HyperBus CK] 000000001: 4 Byte [2 HyperBus CK] 000000010: 6 Byte [3 HyperBus CK] 111111111: 1024 Byte [512 HyperBus CK]

◆ HYPERBUS_MCR_MAXLEN_4_BYTE

#define HYPERBUS_MCR_MAXLEN_4_BYTE   0x1U

◆ HYPERBUS_MCR_MAXLEN_6_BYTE

#define HYPERBUS_MCR_MAXLEN_6_BYTE   0x2U

◆ HYPERBUS_MCR_MAXLEN_1024_BYTE

#define HYPERBUS_MCR_MAXLEN_1024_BYTE   0x1FFU

◆ HYPERBUS_MCR_MERGE_WRAP_INCR

#define HYPERBUS_MCR_MERGE_WRAP_INCR   0x1U

Memory Configuration Register defines.

0x1 = merge WRAP and INCR, 0x0 otherwise

◆ HYPERBUS_MCR_NO_MERGE_WRAP_INCR

#define HYPERBUS_MCR_NO_MERGE_WRAP_INCR   0x0U

◆ HYPERBUS_MCR_ASYMM_CACHE_SUPPORT

#define HYPERBUS_MCR_ASYMM_CACHE_SUPPORT   0x1U

Memory Configuration Register defines.

0x1 = asymmetry cache support, 0x0 otherwise

◆ HYPERBUS_MCR_NO_ASYMM_CACHE_SUPPORT

#define HYPERBUS_MCR_NO_ASYMM_CACHE_SUPPORT   0x0U

◆ HYPERBUS_MCR_MEM_SPACE

#define HYPERBUS_MCR_MEM_SPACE   0x0U

Memory Configuration Register defines.

0x0 = memory space, 0x1 = CR space

◆ HYPERBUS_MCR_CR_SPACE

#define HYPERBUS_MCR_CR_SPACE   0x1U

◆ HYPERBUS_MCR_HYPERFLASH

#define HYPERBUS_MCR_HYPERFLASH   0x0U

Memory Configuration Register defines.

0x0 = HyperFlash, 0x1 = HyperRAM

◆ HYPERBUS_MCR_HYPERRAM

#define HYPERBUS_MCR_HYPERRAM   0x1U

◆ HYPERBUS_MCR_WRAPSIZE_NONE

#define HYPERBUS_MCR_WRAPSIZE_NONE   0x0U

Memory Configuration Register defines.

0x0 = wrap size none, 0x1 = 64B, 0x2 = 16B, 0x3 = 32B

◆ HYPERBUS_MCR_WRAPSIZE_64B

#define HYPERBUS_MCR_WRAPSIZE_64B   0x1U

◆ HYPERBUS_MCR_WRAPSIZE_16B

#define HYPERBUS_MCR_WRAPSIZE_16B   0x2U

◆ HYPERBUS_MCR_WRAPSIZE_32B

#define HYPERBUS_MCR_WRAPSIZE_32B   0x3U

◆ HYPERBUS_CS0

#define HYPERBUS_CS0   (0U)

◆ HYPERBUS_CS1

#define HYPERBUS_CS1   (1U)

◆ HYPERBUS_DMA_CH_INVALID

#define HYPERBUS_DMA_CH_INVALID   (-1)

Invalid DMA channel index value.

◆ HYPERBUS_ECC_1B_ERROR

#define HYPERBUS_ECC_1B_ERROR   (0U)

◆ HYPERBUS_ECC_2B_ERROR

#define HYPERBUS_ECC_2B_ERROR   (1U)

◆ HYPERBUS_ECC_WRITE_NONALIGN_ERROR

#define HYPERBUS_ECC_WRITE_NONALIGN_ERROR   (2U)

◆ HYPERBUS_ECC_ERR_ALL

#define HYPERBUS_ECC_ERR_ALL   (3U)

◆ HYPERBUS_FSS_FSAS_GENREGS_SYSCONFIG_ECC_ENABLE

#define HYPERBUS_FSS_FSAS_GENREGS_SYSCONFIG_ECC_ENABLE   (0x00000001U)

Value to enable ECC in SYSCONFIG register.

◆ HYPERBUS_FSS_FSAS_GENREGS_SYSCONFIG_ECC_DISABLE

#define HYPERBUS_FSS_FSAS_GENREGS_SYSCONFIG_ECC_DISABLE   (0x00000000U)

Value to disable ECC in SYSCONFIG register.

◆ HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_WRITE_NONALIGN_ERR_MASK

#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_WRITE_NONALIGN_ERR_MASK   (0x4U)

Mask for write non-aligned error field in STATUS_RAW register.

◆ HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_WRITE_NONALIGN_ERR_SHIFT

#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_WRITE_NONALIGN_ERR_SHIFT   (0x2U)

Shift for write non-aligned error field in STATUS_RAW register.

◆ HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_DOUBLE_BIT_ERR_MASK

#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_DOUBLE_BIT_ERR_MASK   (0x2U)

Mask for double bit error field in STATUS_RAW register.

◆ HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_DOUBLE_BIT_ERR_SHIFT

#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_DOUBLE_BIT_ERR_SHIFT   (0x1U)

Shift for double bit error field in STATUS_RAW register.

◆ HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_SINGLE_BIT_ERR_MASK

#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_SINGLE_BIT_ERR_MASK   (0x1U)

Mask for single bit error field in STATUS_RAW register.

◆ HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_SINGLE_BIT_ERR_SHIFT

#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_ECC_SINGLE_BIT_ERR_SHIFT   (0x0U)

Shift for single bit error field in STATUS_RAW register.

◆ HYPERBUS_FSS_FSAS_GENREGS_ERR_ECC_TYPE_OFFSET

#define HYPERBUS_FSS_FSAS_GENREGS_ERR_ECC_TYPE_OFFSET   (0x00000074U)

Offset of ECC error type register in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_ERR_WRT_TYPE_OFFSET

#define HYPERBUS_FSS_FSAS_GENREGS_ERR_WRT_TYPE_OFFSET   (0x00000078U)

Offset of write error type register in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_ECC_ERR_CLEAR_VALUE

#define HYPERBUS_FSS_FSAS_GENREGS_ECC_ERR_CLEAR_VALUE   (0x80000000U)

Value to clear ECC error in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_IRQ_EOI_OFFSET

#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_EOI_OFFSET   (0x00000010U)

Offset of EOI register in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_IRQ_EOI_VECTOR

#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_EOI_VECTOR   (0x00000001U)

Value to write to EOI register to clear interrupt in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_OFFSET

#define HYPERBUS_FSS_FSAS_GENREGS_STATUS_RAW_OFFSET   (0x00000014U)

Offset of STATUS_RAW register in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_IRQ_STATUS_OFFSET

#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_STATUS_OFFSET   (0x00000018U)

Offset of IRQ status register in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_SET_OFFSET

#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_SET_OFFSET   (0x0000001cU)

Offset of IRQ enable set register in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_CLR_OFFSET

#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_CLR_OFFSET   (0x00000020U)

Offset of IRQ enable clear register in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_SET_VALUE

#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_SET_VALUE   (0x00000007U)

Value to write to IRQ enable set register to enable interrupts in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_CLR_VALUE

#define HYPERBUS_FSS_FSAS_GENREGS_IRQ_ENABLE_CLR_VALUE   (0x00000007U)

Value to write to IRQ enable clear register to disable interrupts in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_ECC_REGION_START_OFFSET

#define HYPERBUS_FSS_FSAS_ECC_REGION_START_OFFSET   (0x00000030U)

Offset of ECC region start address register in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_ECC_REGION_SIZE_OFFSET

#define HYPERBUS_FSS_FSAS_ECC_REGION_SIZE_OFFSET   (0x00000034U)

Offset of ECC region size register in Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_ECC_REGION_OFFSET_STEP

#define HYPERBUS_FSS_FSAS_ECC_REGION_OFFSET_STEP   (0x00000008U)

Offset step to access ECC region start address and size registers.

◆ HYPERBUS_FSS_FSAS_ECC_REGION_START_ADDR_SHIFT

#define HYPERBUS_FSS_FSAS_ECC_REGION_START_ADDR_SHIFT   (0x0000000cU)

Shift value to get ECC region start address in 4KBytes steps.

The offset is a 32-bit value that is divided by 4KBytes (0x1000). The result is the start address of the ECC region.

0x0 means the start address is 0 and the region is disabled 0x1 means the start address is 4KBytes 0xA means the start address is 40KBytes 0xF_FFFF means the start address is 4GBytes

◆ HYPERBUS_FSS_FSAS_ECC_REGION_SIZE_SHIFT

#define HYPERBUS_FSS_FSAS_ECC_REGION_SIZE_SHIFT   (0x0000000cU)

Shift value to get ECC region size in 4KBytes steps.

The size is a 32-bit value that is divided by 4KBytes (0x1000). The result is the size of the ECC region.

0x0 means the size is 0 and the region is disabled 0x1 means the size is 4KBytes 0xA means the size is 40KBytes 0xF_FFFF means the size is 4GBytes

◆ HYPERBUS_FSS_FSAS_NUM_ECC_REGIONS

#define HYPERBUS_FSS_FSAS_NUM_ECC_REGIONS   (0x4U)

Number of ECC regions supported by the Hyperbus FSS module.

◆ HYPERBUS_FSS_FSAS_ECC_REGION0

#define HYPERBUS_FSS_FSAS_ECC_REGION0   (0U)

First ECC region in Hyperbus FSS module (region 0)

Used to specify the first ECC region when configuring or selecting regions for ECC operations.

◆ HYPERBUS_FSS_FSAS_ECC_REGION1

#define HYPERBUS_FSS_FSAS_ECC_REGION1   (1U)

Second ECC region in Hyperbus FSS module (region 1)

Used to specify the second ECC region when configuring or selecting regions for ECC operations.

◆ HYPERBUS_FSS_FSAS_ECC_REGION2

#define HYPERBUS_FSS_FSAS_ECC_REGION2   (2U)

Third ECC region in Hyperbus FSS module (region 2)

Used to specify the third ECC region when configuring or selecting regions for ECC operations.

◆ HYPERBUS_FSS_FSAS_ECC_REGION3

#define HYPERBUS_FSS_FSAS_ECC_REGION3   (3U)

Fourth ECC region in Hyperbus FSS module (region 3)

Used to specify the fourth ECC region when configuring or selecting regions for ECC operations.

Typedef Documentation

◆ HYPERBUS_Handle

typedef void* HYPERBUS_Handle

A handle that is returned from a HYPERBUS_open() call.

◆ HYPERBUS_ECCCallbackFxn

typedef void(* HYPERBUS_ECCCallbackFxn) (HYPERBUS_Handle hyperbusHandle, uint8_t errorType)

The definition of a callback function used by the HYPERBUS driver when ECC error interrupts occur.

Parameters
hyperbusHandleHYPERBUS_Handle
errorTypeType of ECC error that occurred

Enumeration Type Documentation

◆ HYPERBUS_Devicetype

Enum for device type.

Enumerator
HYPERBUS_DEVICETYPE_HYPERRAM 
HYPERBUS_DEVICETYPE_NONE 
HYPERBUS_DEVICETYPE_HYPERFLASH 

Function Documentation

◆ HYPERBUS_init()

void HYPERBUS_init ( void  )

This function initializes the HYPERBUS module.

◆ HYPERBUS_deinit()

void HYPERBUS_deinit ( void  )

This function de-initializes the HYPERBUS module.

◆ HYPERBUS_open()

HYPERBUS_Handle HYPERBUS_open ( uint32_t  index)

This function opens a given HYPERBUS peripheral.

Precondition
HYPERBUS controller has been initialized using HYPERBUS_init()
Parameters
indexIndex of config to use in the HYPERBUS_Config array
Returns
A HYPERBUS_Handle on success or a NULL on an error or if it has been opened already
See also
HYPERBUS_init()
HYPERBUS_close()

◆ HYPERBUS_close()

void HYPERBUS_close ( HYPERBUS_Handle  handle)

Function to close a HYPERBUS peripheral specified by the HYPERBUS handle.

Precondition
HYPERBUS_open() has to be called first
Parameters
handleHYPERBUS_Handle returned from HYPERBUS_open()
See also
HYPERBUS_open()

◆ HYPERBUS_getHandle()

HYPERBUS_Handle HYPERBUS_getHandle ( uint32_t  index)

This function returns the handle of an open HYPERBUS Instance from the instance index.

Precondition
HYPERBUS controller has been opened using HYPERBUS_open()
Parameters
indexIndex of config to use in the HYPERBUS_Config array
Returns
An HYPERBUS_Handle if it has been opened already or NULL otherwise
See also
HYPERBUS_init()
HYPERBUS_open()

◆ HYPERBUS_getHyperBusDataBaseAddr()

uint32_t HYPERBUS_getHyperBusDataBaseAddr ( HYPERBUS_Handle  handle)

This function gets the SOC mapped data base address of the HyperRam.

Precondition
HYPERBUS controller has been opened using HYPERBUS_open()
Parameters
handleAn HYPERBUS_Handle returned from an HYPERBUS_open()
Returns
Data BaseAddress of the HyperRam

◆ HYPERBUS_makeMemCfg()

static uint32_t HYPERBUS_makeMemCfg ( HYPERBUS_Handle  handle,
HYPERBUS_MemCfg pHyperBusMemCfg 
)
static

This function returns the memory configuration of the HYPERBUS Instance.

Precondition
HYPERBUS controller has been opened using HYPERBUS_open()
Parameters
handleAn HYPERBUS_Handle returned from an HYPERBUS_open()
pHyperBusMemCfgAn HYPERBUS_MemCfg to be filled
Returns
memory configuration of the HYPERBUS Instance

◆ HYPERBUS_makeMemTiming()

static uint32_t HYPERBUS_makeMemTiming ( HYPERBUS_Handle  handle,
HYPERBUS_MemTiming pHyperBusMemTiming 
)
static

This function returns the memory Timings of the HYPERBUS Instance.

Precondition
HYPERBUS controller has been opened using HYPERBUS_open()
Parameters
handleAn HYPERBUS_Handle returned from an HYPERBUS_open()
pHyperBusMemTimingAn HYPERBUS_MemTiming to be filled
Returns
memory Timings of the HYPERBUS Instance

◆ HYPERBUS_isr()

static void HYPERBUS_isr ( void *  args)
static

This function is called by the HwiP module to service interrupts generated by the FSS of the HYPERBUS controller.

Parameters
argsPointer to the HYPERBUS_Config structure associated with the interrupting HYPERBUS peripheral

◆ HYPERBUS_configureECC()

int32_t HYPERBUS_configureECC ( HYPERBUS_Handle  handle)

This function configures the ECC regions for the HYPERBUS Instance.

Precondition
HYPERBUS controller has been opened using HYPERBUS_open()
Parameters
handleAn HYPERBUS_Handle returned from an HYPERBUS_open()
Returns
0 on success else a negative value

◆ HYPERBUS_setECCRegion()

int32_t HYPERBUS_setECCRegion ( HYPERBUS_Handle  handle,
uint8_t  region 
)

This function sets the ECC region for the HYPERBUS Instance.

Precondition
HYPERBUS controller has been opened using HYPERBUS_open()
Parameters
handleAn HYPERBUS_Handle returned from an HYPERBUS_open()
regionRegion to be set, value should be one of the HYPERBUS_ECC_REGION defines
Returns
0 on success else a negative value

◆ HYPERBUS_enableECC()

int32_t HYPERBUS_enableECC ( HYPERBUS_Handle  handle,
uint8_t  enableFlag 
)

This function enables or disables ECC for the HYPERBUS Instance.

Precondition
HYPERBUS controller has been opened using HYPERBUS_open()
Parameters
handleAn HYPERBUS_Handle returned from an HYPERBUS_open()
enableFlagFlag to enable or disable ECC, set to 1 to enable or 0 to disable
Returns
0 on success else a negative value

◆ HYPERBUS_clearECCError()

int32_t HYPERBUS_clearECCError ( HYPERBUS_Handle  handle,
uint8_t  errorType 
)

This function clears the ECC error for the HYPERBUS Instance.

Precondition
HYPERBUS controller has been opened using HYPERBUS_open()
Parameters
handleAn HYPERBUS_Handle returned from an HYPERBUS_open()
errorTypeType of error to clear, value should be one of the HYPERBUS_ECC_ERROR_TYPE defines
Returns
0 on success else a negative value

◆ HYPERBUS_getECCErrorInfo()

int32_t HYPERBUS_getECCErrorInfo ( HYPERBUS_Handle  handle,
HYPERBUS_ECCErrorInfo ECCErrorInfo 
)

This function returns the ECC error information for the HYPERBUS Instance.

Precondition
HYPERBUS controller has been opened using HYPERBUS_open()
Parameters
handleAn HYPERBUS_Handle returned from an HYPERBUS_open()
ECCErrorInfoPointer to the HYPERBUS_ECCErrorInfo structure to be filled
Returns
0 on success else a negative value

Variable Documentation

◆ gHyperBusConfig

HYPERBUS_Config gHyperBusConfig[]
extern

Externally defined driver configuration array.

◆ gHyperBusConfigNum

uint32_t gHyperBusConfigNum
extern

Externally defined driver configuration array size.

◆ gHyperBusEccRegion