AM64x MCU+ SDK  08.02.00

Introduction

These APIs are used to parse various SFDP parameter tables read from a NOR OSPI flash

Files

file  ospi_sfdp.h
 OSPI Driver SFDP API/interface file.
 

Data Structures

struct  OSPI_SfdpMainHeader
 
struct  OSPI_SfdpParamHeader
 
struct  OSPI_SfdpBasicFlashParamTable
 
struct  OSPI_SfdpXspiProfile1ParamTable
 
struct  OSPI_SfdpSectorMapParamTable
 
struct  OSPI_SfdpSCCRParamTable
 
struct  OSPI_Sfdp4ByteAddressingParamTable
 
struct  OSPI_SfdpHeader
 OSPI SFDP Structure. More...
 

Functions

char * OSPI_Sfdp_getParameterTableName (uint32_t paramTableId)
 This function returns the name of the parameter table given the table ID. More...
 
uint32_t OSPI_Sfdp_getPtp (OSPI_SfdpParamHeader *paramHeader)
 This function returns the Parameter Table Pointer (PTP) of the parameter table given the parameter header. More...
 
int32_t OSPI_Sfdp_parseBfpt (OSPI_SfdpBasicFlashParamTable *bfpt, OSPI_GenericXspiDevDefines *xspiDefines, uint32_t numDwords)
 This function parses the Basic Flash Parameter Table (BFPT) and fills the xspiDevDefines structure with the parsed information. More...
 
int32_t OSPI_Sfdp_parseXpt1 (OSPI_SfdpXspiProfile1ParamTable *xpt1, OSPI_GenericXspiDevDefines *xspiDefines, uint32_t numDwords)
 This function parses the xSPI Flash Profile 1.0 Table and fills the xspiDevDefines structure with the parsed information. More...
 
int32_t OSPI_Sfdp_parse4bait (OSPI_Sfdp4ByteAddressingParamTable *fourBait, OSPI_GenericXspiDevDefines *xspiDefines, uint32_t numDwords)
 This function parses the 4 Byte Addressing Information Table (4BAIT) and fills the xspiDevDefines structure with the parsed information. More...
 
int32_t OSPI_Sfdp_parseSccr (OSPI_SfdpSCCRParamTable *sccr, OSPI_GenericXspiDevDefines *xspiDefines, uint32_t numDwords)
 This function parses the Status, Control and Configuration Registers (SCCR) Table and fills the xspiDevDefines structure with the parsed information. More...
 
int32_t OSPI_Sfdp_parseSmpt (OSPI_SfdpSectorMapParamTable *smpt, OSPI_GenericXspiDevDefines *xspiDefines, uint32_t numDwords)
 This function parses the Sector Map Parameter Table (SMPT) and fills the xspiDevDefines structure with the parsed information. More...
 

Macros

#define OSPI_SFDP_SIGNATURE   (0x50444653U)
 
#define OSPI_SFDP_JESD216_MAJOR   (1U)
 
#define OSPI_SFDP_JESD216_MINOR   (0U)
 
#define OSPI_SFDP_JESD216A_MINOR   (5U)
 
#define OSPI_SFDP_JESD216B_MINOR   (6U)
 
#define OSPI_SFDP_JESD216C_MINOR   (7U)
 
#define OSPI_SFDP_JESD216D_MINOR   (8U)
 
#define OSPI_SFDP_NPH_MAX   (13U)
 
#define OSPI_SFDP_HEADER_START_OFFSET   (0x00U)
 
#define OSPI_SFDP_FIRST_PARAM_HEADER_OFFSET   (0x08U)
 
#define OSPI_SFDP_SECOND_PARAM_HEADER_OFFSET   (0x10U)
 
#define OSPI_SFDP_BASIC_PARAM_TABLE_ID   (0xFF00)
 
#define OSPI_SFDP_SECTOR_MAP_TABLE_ID   (0xFF81)
 
#define OSPI_SFDP_RPMC_TABLE_ID   (0xFF03)
 
#define OSPI_SFDP_4BYTE_ADDR_INSTR_TABLE_ID   (0xFF84)
 
#define OSPI_SFDP_XSPI_PROFILE_TABLE_ID   (0xFF05)
 
#define OSPI_SFDP_XSPI_PROFILE_2_TABLE_ID   (0xFF06)
 
#define OSPI_SFDP_SCCR_TABLE_ID   (0xFF87)
 
#define OSPI_SFDP_SCCR_MULTISPI_OFFSETS_TABLE_ID   (0xFF88)
 
#define OSPI_SFDP_SCCR_XSPI_PROFILE_2_TABLE_ID   (0xFF09)
 
#define OSPI_SFDP_OCTAL_CMD_SEQ_TABLE_ID   (0xFF0A)
 
#define OSPI_SFDP_LONG_LATENCY_NVM_MSP_TABLE_ID   (0xFF8B)
 
#define OSPI_SFDP_QUAD_IO_WITH_DS_TABLE_ID   (0xFF0C)
 
#define OSPI_SFDP_QUAD_CMD_SEQ_TABLE_ID   (0xFF8D)
 
#define OSPI_SFDP_BFPT_MAX_DWORDS_JESD216   (9)
 
#define OSPI_SFDP_BFPT_MAX_DWORDS_JESD216B   (16)
 
#define OSPI_SFDP_OCTAL_READ_ADDR_MSB_0   (0)
 
#define OSPI_SFDP_OCTAL_READ_ADDR_LSB_0   (1)
 

Macro Definition Documentation

◆ OSPI_SFDP_SIGNATURE

#define OSPI_SFDP_SIGNATURE   (0x50444653U)

◆ OSPI_SFDP_JESD216_MAJOR

#define OSPI_SFDP_JESD216_MAJOR   (1U)

◆ OSPI_SFDP_JESD216_MINOR

#define OSPI_SFDP_JESD216_MINOR   (0U)

◆ OSPI_SFDP_JESD216A_MINOR

#define OSPI_SFDP_JESD216A_MINOR   (5U)

◆ OSPI_SFDP_JESD216B_MINOR

#define OSPI_SFDP_JESD216B_MINOR   (6U)

◆ OSPI_SFDP_JESD216C_MINOR

#define OSPI_SFDP_JESD216C_MINOR   (7U)

◆ OSPI_SFDP_JESD216D_MINOR

#define OSPI_SFDP_JESD216D_MINOR   (8U)

◆ OSPI_SFDP_NPH_MAX

#define OSPI_SFDP_NPH_MAX   (13U)

◆ OSPI_SFDP_HEADER_START_OFFSET

#define OSPI_SFDP_HEADER_START_OFFSET   (0x00U)

◆ OSPI_SFDP_FIRST_PARAM_HEADER_OFFSET

#define OSPI_SFDP_FIRST_PARAM_HEADER_OFFSET   (0x08U)

◆ OSPI_SFDP_SECOND_PARAM_HEADER_OFFSET

#define OSPI_SFDP_SECOND_PARAM_HEADER_OFFSET   (0x10U)

◆ OSPI_SFDP_BASIC_PARAM_TABLE_ID

#define OSPI_SFDP_BASIC_PARAM_TABLE_ID   (0xFF00)

◆ OSPI_SFDP_SECTOR_MAP_TABLE_ID

#define OSPI_SFDP_SECTOR_MAP_TABLE_ID   (0xFF81)

◆ OSPI_SFDP_RPMC_TABLE_ID

#define OSPI_SFDP_RPMC_TABLE_ID   (0xFF03)

◆ OSPI_SFDP_4BYTE_ADDR_INSTR_TABLE_ID

#define OSPI_SFDP_4BYTE_ADDR_INSTR_TABLE_ID   (0xFF84)

◆ OSPI_SFDP_XSPI_PROFILE_TABLE_ID

#define OSPI_SFDP_XSPI_PROFILE_TABLE_ID   (0xFF05)

◆ OSPI_SFDP_XSPI_PROFILE_2_TABLE_ID

#define OSPI_SFDP_XSPI_PROFILE_2_TABLE_ID   (0xFF06)

◆ OSPI_SFDP_SCCR_TABLE_ID

#define OSPI_SFDP_SCCR_TABLE_ID   (0xFF87)

◆ OSPI_SFDP_SCCR_MULTISPI_OFFSETS_TABLE_ID

#define OSPI_SFDP_SCCR_MULTISPI_OFFSETS_TABLE_ID   (0xFF88)

◆ OSPI_SFDP_SCCR_XSPI_PROFILE_2_TABLE_ID

#define OSPI_SFDP_SCCR_XSPI_PROFILE_2_TABLE_ID   (0xFF09)

◆ OSPI_SFDP_OCTAL_CMD_SEQ_TABLE_ID

#define OSPI_SFDP_OCTAL_CMD_SEQ_TABLE_ID   (0xFF0A)

◆ OSPI_SFDP_LONG_LATENCY_NVM_MSP_TABLE_ID

#define OSPI_SFDP_LONG_LATENCY_NVM_MSP_TABLE_ID   (0xFF8B)

◆ OSPI_SFDP_QUAD_IO_WITH_DS_TABLE_ID

#define OSPI_SFDP_QUAD_IO_WITH_DS_TABLE_ID   (0xFF0C)

◆ OSPI_SFDP_QUAD_CMD_SEQ_TABLE_ID

#define OSPI_SFDP_QUAD_CMD_SEQ_TABLE_ID   (0xFF8D)

◆ OSPI_SFDP_BFPT_MAX_DWORDS_JESD216

#define OSPI_SFDP_BFPT_MAX_DWORDS_JESD216   (9)

◆ OSPI_SFDP_BFPT_MAX_DWORDS_JESD216B

#define OSPI_SFDP_BFPT_MAX_DWORDS_JESD216B   (16)

◆ OSPI_SFDP_OCTAL_READ_ADDR_MSB_0

#define OSPI_SFDP_OCTAL_READ_ADDR_MSB_0   (0)

◆ OSPI_SFDP_OCTAL_READ_ADDR_LSB_0

#define OSPI_SFDP_OCTAL_READ_ADDR_LSB_0   (1)

Function Documentation

◆ OSPI_Sfdp_getParameterTableName()

char* OSPI_Sfdp_getParameterTableName ( uint32_t  paramTableId)

This function returns the name of the parameter table given the table ID.

Parameters
paramTableId16 bit ID of the parameter table
Returns
The name of the parameter table as a string

◆ OSPI_Sfdp_getPtp()

uint32_t OSPI_Sfdp_getPtp ( OSPI_SfdpParamHeader paramHeader)

This function returns the Parameter Table Pointer (PTP) of the parameter table given the parameter header.

Parameters
paramHeaderParameter header for the table
Returns
PTP as a uint32_t address

◆ OSPI_Sfdp_parseBfpt()

int32_t OSPI_Sfdp_parseBfpt ( OSPI_SfdpBasicFlashParamTable bfpt,
OSPI_GenericXspiDevDefines xspiDefines,
uint32_t  numDwords 
)

This function parses the Basic Flash Parameter Table (BFPT) and fills the xspiDevDefines structure with the parsed information.

Parameters
bfptPointer to the BFPT (allocated by user)
xspiDefinesPointer to the generic xSPI device definitions structure (allocated by user)
numDwordsNumber of double words actually present in the table (this has to be read from the param header and passed)
Returns
SystemP_SUCCESS if parsing is successful, otherwise failure.

◆ OSPI_Sfdp_parseXpt1()

int32_t OSPI_Sfdp_parseXpt1 ( OSPI_SfdpXspiProfile1ParamTable xpt1,
OSPI_GenericXspiDevDefines xspiDefines,
uint32_t  numDwords 
)

This function parses the xSPI Flash Profile 1.0 Table and fills the xspiDevDefines structure with the parsed information.

Parameters
xpt1Pointer to the xSPI Flash Profile 1.0 Table (allocated by user)
xspiDefinesPointer to the generic xSPI device definitions structure (allocated by user)
numDwordsNumber of double words actually present in the table (this has to be read from the param header and passed)
Returns
SystemP_SUCCESS if parsing is successful, otherwise failure.

◆ OSPI_Sfdp_parse4bait()

int32_t OSPI_Sfdp_parse4bait ( OSPI_Sfdp4ByteAddressingParamTable fourBait,
OSPI_GenericXspiDevDefines xspiDefines,
uint32_t  numDwords 
)

This function parses the 4 Byte Addressing Information Table (4BAIT) and fills the xspiDevDefines structure with the parsed information.

Parameters
fourBaitPointer to the 4BAIT (allocated by user)
xspiDefinesPointer to the generic xSPI device definitions structure (allocated by user)
numDwordsNumber of double words actually present in the table (this has to be read from the param header and passed)
Returns
SystemP_SUCCESS if parsing is successful, otherwise failure.

◆ OSPI_Sfdp_parseSccr()

int32_t OSPI_Sfdp_parseSccr ( OSPI_SfdpSCCRParamTable sccr,
OSPI_GenericXspiDevDefines xspiDefines,
uint32_t  numDwords 
)

This function parses the Status, Control and Configuration Registers (SCCR) Table and fills the xspiDevDefines structure with the parsed information.

Parameters
sccrPointer to the SCCR Table (allocated by user)
xspiDefinesPointer to the generic xSPI device definitions structure (allocated by user)
numDwordsNumber of double words actually present in the table (this has to be read from the param header and passed)
Returns
SystemP_SUCCESS if parsing is successful, otherwise failure.

◆ OSPI_Sfdp_parseSmpt()

int32_t OSPI_Sfdp_parseSmpt ( OSPI_SfdpSectorMapParamTable smpt,
OSPI_GenericXspiDevDefines xspiDefines,
uint32_t  numDwords 
)

This function parses the Sector Map Parameter Table (SMPT) and fills the xspiDevDefines structure with the parsed information.

Parameters
smptPointer to the SMPT (allocated by user)
xspiDefinesPointer to the generic xSPI device definitions structure (allocated by user)
numDwordsNumber of double words actually present in the table (this has to be read from the param header and passed)
Returns
SystemP_SUCCESS if parsing is successful, otherwise failure.