 |
AM243x MCU+ SDK
11.00.00
|
|
Go to the documentation of this file.
59 #include <drivers/ospi/v0/lld/dma/udma/ospi_udma_lld.h>
117 uint32_t devDelays[4];
int32_t OSPI_norFlashWrite(OSPI_Handle handle, uint32_t offset, uint8_t *buf, uint32_t len)
This function writes data to the flash at a specified offset.
void OSPI_setProtocol(OSPI_Handle handle, uint32_t protocol)
This function sets the number of transfer lines in the OSPI driver to set the requested protocol.
OSPI LLD Driver API/interface file.
uint32_t OSPI_isDacEnable(OSPI_Handle handle)
This function checks if the Direct Access Controller mode is enabled.
void OSPI_setCmdDummyCycles(OSPI_Handle handle, uint32_t cmdDummyCycles)
This function sets appropriate dummy cycles to be used while sending STIG commands to flash.
OSPI Instance Read Command Structure.
Definition: ospi_lld.h:483
void OSPI_Transaction_init(OSPI_Transaction *trans)
Function to initialize the OSPI_Transaction.
int32_t OSPI_setRdDataCaptureDelay(OSPI_Handle handle, uint32_t rdDataCapDelay)
This function sets read data capture cycles in the OSPI controller.
OSPI Instance Write Command Structure.
Definition: ospi_lld.h:464
int32_t OSPI_disablePhyPipeline(OSPI_Handle handle)
This function disables the PHY Pipeline.
void OSPI_ReadCmdParams_init(OSPI_ReadCmdParams *rdParams)
Function to initialize the OSPI_ReadCmdParams structure.
int32_t OSPI_configBaudrate(OSPI_Handle handle, uint32_t baud)
Configures baud divider.
int32_t OSPI_enableSDR(OSPI_Handle handle)
This function enables the Single Data Rate (SDR)
uint32_t dacEnable
Definition: ospi/v0/ospi.h:113
int32_t OSPI_readBaudRateDivFromReg(OSPI_Handle handle, uint32_t *baudDiv)
Return value of baudrate that is programmed in IP register.
int32_t OSPI_norFlashReadSfdp(OSPI_Handle handle, uint32_t offset, uint8_t *buf, uint32_t len)
This function reads SFDP table from the flash from a specified offset.
Data structure used with OSPI_Transfers - OSPI_lld_readDirect, OSPI_lld_writeDirect,...
Definition: ospi_lld.h:442
int32_t OSPI_phyReadAttackVector(OSPI_Handle handle, uint32_t offset)
This function checks if the attack vector, or the data used for tuning the PHY is present at an offse...
int32_t OSPI_norFlashRead(OSPI_Handle handle, uint32_t offset, uint8_t *buf, uint32_t len)
This function reads data from the flash from a specified offset.
uint8_t intrPriority
Definition: ospi/v0/ospi.h:107
uint16_t index
Definition: tisci_rm_proxy.h:3
uint32_t protocol
Definition: ospi/v0/ospi.h:96
uint32_t OSPI_getInputClk(OSPI_Handle handle)
This function returns the input clk frequency OSPI was programmed at.
int32_t OSPI_phyTuneSDR(OSPI_Handle handle, uint32_t flashOffset)
void OSPI_init(void)
This function initializes the OSPI module.
int32_t OSPI_enableDdrRdCmds(OSPI_Handle handle)
This function sets DDR bit in INSTR_RD register for RD commands.
OSPI PHY Configuration.
Definition: ospi_lld.h:573
int32_t OSPI_norFlashErase(OSPI_Handle handle, uint32_t address)
This function erases 1 block of data starting from a provided address.
void OSPI_deinit(void)
This function de-initializes the OSPI module.
void OSPI_setDualOpCodeMode(OSPI_Handle handle)
This function sets OSPI controller to use dual byte opcodes.
void OSPI_setDeviceSize(OSPI_Handle handle, uint32_t pageSize, uint32_t blkSize)
This function sets the block size and page size of the flash to the device size register in OSPI.
void OSPI_Params_init(OSPI_Params *ospiParams)
Initialize data structure with defaults.
uint32_t OSPI_isDtrEnable(OSPI_Handle handle)
This function checks if the Dual Transfer Rate (Sampling on both rising and falling edge of the clock...
OSPI_Handle handle
Definition: ospi/v0/ospi.h:144
uint32_t dataBaseAddr
Definition: ospi/v0/ospi.h:88
int32_t OSPI_setResetPinStatus(OSPI_Handle handle, uint32_t pinStatus)
This function activates the RESET pin feature.
OSPILLD_Handle ospilldHandle
Definition: ospi/v0/ospi.h:168
uint32_t baudRateDiv
Definition: ospi/v0/ospi.h:123
OSPI Parameters.
Definition: ospi_lld.h:529
int32_t OSPI_norFlashReadId(OSPI_Handle handle, uint32_t *manufacturerId, uint32_t *deviceId)
This function tries to read the JEDEC ID from the NOR flash connected to the OSPI peripheral.
void OSPI_setXferOpCodes(OSPI_Handle handle, uint8_t readCmd, uint8_t pageProgCmd)
This function sets the opcodes for reading and page programming the flash.
OSPI_Handle OSPI_getHandle(uint32_t index)
This function returns the handle of an open OSPI Instance from the instance index.
int32_t OSPI_disableDacMode(OSPI_Handle handle)
This function disables the Direct Access Mode.
int32_t OSPI_phyTuneGrapher(OSPI_Handle handle, uint32_t flashOffset, uint8_t arrays[4][128][128])
This function takes a 4x128x128 array and fills it with TX RX DLL data for graphing purpose.
uint32_t inputClkFreq
Definition: ospi/v0/ospi.h:90
uint32_t OSPI_getProtocol(OSPI_Handle handle)
This function returns the current protocol for which the transfer lines in OSPI driver is configured ...
void OSPI_setNumAddrBytes(OSPI_Handle handle, uint32_t numAddrBytes)
This function set the number of bytes used to send address while reading or writing to flash memory.
const OSPI_AddrRegion * dmaRestrictedRegions
Definition: ospi/v0/ospi.h:125
OSPI instance attributes - used during init time.
Definition: ospi/v0/ospi.h:82
uint32_t OSPI_getFlashDataBaseAddr(OSPI_Handle handle)
This function gets the SOC mapped data base address of the flash.
OSPI driver object.
Definition: ospi/v0/ospi.h:140
OSPI driver object.
Definition: ospi_lld.h:633
int32_t OSPI_readDirect(OSPI_Handle handle, OSPI_Transaction *trans)
Function to perform direct reads from the flash using DAC controller.
void OSPI_phyGetTuningData(uint32_t *tuningData, uint32_t *tuningDataSize)
This function returns the address to the attack vector buf required for tuning the PHY.
void OSPI_clearDualOpCodeMode(OSPI_Handle handle)
This function sets OSPI controller to not use dual byte opcodes.
uint32_t chipSelect
Definition: ospi/v0/ospi.h:119
uint32_t isOpen
Definition: ospi/v0/ospi.h:149
int32_t OSPI_writeIndirect(OSPI_Handle handle, OSPI_Transaction *trans)
Function to perform indirect writes to the flash using INDAC controller.
int32_t OSPI_enablePhyPipeline(OSPI_Handle handle)
This function enables the PHY Pipeline.
int32_t OSPI_norFlashInit1s1s1s(OSPI_Handle handle)
This function initializes the NOR flash to work in 1-1-1 mode.
uint32_t OSPI_isPhyEnable(OSPI_Handle handle)
This function checks if the OSPI PHY controller is enabled.
uint32_t isDacEnable
Definition: ospi/v0/ospi.h:151
int32_t OSPI_writeCmd(OSPI_Handle handle, OSPI_WriteCmdParams *wrParams)
Function to send specific commands and related data to flash.
void OSPI_setPhyEnableSuccess(OSPI_Handle handle, uint32_t success)
This function sets the phyEnableSuccess field in OSPI_Object. Has to be called from flash driver.
OSPI_DmaConfig gOspiDmaConfig[]
int32_t OSPI_enablePhy(OSPI_Handle handle)
This function enables the PHY.
int32_t OSPI_disablePhy(OSPI_Handle handle)
This function disables the PHY.
int32_t OSPI_enableDDR(OSPI_Handle handle)
This function enables the Dual Data Rate (DDR)
Definition: ospi/v0/ospi.h:173
OSPI Address Region.
Definition: ospi_lld.h:510
uint32_t intrNum
Definition: ospi/v0/ospi.h:103
int32_t OSPI_configResetPin(OSPI_Handle handle, uint32_t config)
This function configures reset functionality.
void OSPI_close(OSPI_Handle handle)
Function to close a OSPI peripheral specified by the OSPI handle.
void OSPI_enableModeBitsRead(OSPI_Handle handle)
This function enables mode bits transmission while reading.
OSPILLD_InitObject ospilldInitObject
Definition: ospi/v0/ospi.h:164
SemaphoreP_Object lockObj
Definition: ospi/v0/ospi.h:153
uint32_t OSPI_isDmaEnable(OSPI_Handle handle)
This function checks if DMA is enabled for reads.
void OSPI_enableModeBitsCmd(OSPI_Handle handle)
This function enables mode bits transmission while sending CMDs.
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:93
HwiP_Object hwiObj
Definition: ospi/v0/ospi.h:157
void OSPI_setWriteDummyCycles(OSPI_Handle handle, uint32_t dummyCycles)
This function sets appropriate dummy cycles for flash write.
void OSPI_norFlashSetCmds(uint8_t rdCmd, uint8_t wrCmd, uint8_t eraseCmd)
This function sets up internal bookkeeping variables for read, write and erase commands....
void OSPI_setReadDummyCycles(OSPI_Handle handle, uint32_t dummyCycles)
This function sets appropriate dummy cycles for flash read.
void * ospiDmaHandle
Definition: ospi/v0/ospi.h:162
OSPI_Config gOspiConfig[]
Externally defined driver configuration array.
uint32_t OSPI_isIntrEnable(OSPI_Handle handle)
This function checks if interrupts are enabled.
uint32_t dmaEnable
Definition: ospi/v0/ospi.h:109
uint32_t phyEnable
Definition: ospi/v0/ospi.h:111
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
OSPILLD_Object ospilldObject
Definition: ospi/v0/ospi.h:167
OSPI DMA Configuration, these are filled by SysCfg based on the DMA driver that is selected.
Definition: ospi_lld_dma.h:133
int32_t OSPI_getBaudRateDivFromObj(OSPI_Handle handle, uint32_t *baudDiv)
Return value of baudrate that is saved in OSPI Object.
void OSPI_WriteCmdParams_init(OSPI_WriteCmdParams *wrParams)
Function to initialize the OSPI_WriteCmdParams structure.
void OSPI_setCmdExtType(OSPI_Handle handle, uint32_t cmdExtType)
This function sets the type of command extension used in dual byte opcode mode.
OSPI driver initialization object.
Definition: ospi_lld.h:584
OSPI_Handle OSPI_open(uint32_t index, const OSPI_Params *openParams)
This function opens a given OSPI peripheral.
OSPI_Transaction * currTrans
Definition: ospi/v0/ospi.h:160
uint32_t intrEnable
Definition: ospi/v0/ospi.h:105
int32_t OSPI_enableDacMode(OSPI_Handle handle)
This function enables the Direct Access Mode.
void * OSPI_Handle
A handle that is returned from a OSPI_open() call.
Definition: ospi/v0/ospi.h:74
uint32_t baseAddr
Definition: ospi/v0/ospi.h:86
uint32_t frmFmt
Definition: ospi/v0/ospi.h:115
uint32_t gOspiConfigNum
Externally defined driver configuration array size.
int32_t OSPI_writeDirect(OSPI_Handle handle, OSPI_Transaction *trans)
Function to perform direct writes to the flash using DAC controller.
void OSPI_setModeBits(OSPI_Handle handle, uint32_t modeBits)
This function sets mode bits in the mode bit field of OSPI config register.
const OSPI_Attrs * attrs
Definition: ospi/v0/ospi.h:174
uint32_t OSPI_getPhyEnableSuccess(OSPI_Handle handle)
This function fetches the phyEnableSuccess field in OSPI_Object.
int32_t OSPI_phyTuneDDR(OSPI_Handle handle, uint32_t flashOffset)
This function tunes the OSPI PHY for DDR mode to set optimal PHY parameters.
int32_t OSPI_readCmd(OSPI_Handle handle, OSPI_ReadCmdParams *rdParams)
Function to send specific commands and receive related data from flash.
OSPI_PhyConfiguration phyConfiguration
Definition: ospi/v0/ospi.h:130
OSPI_Object * object
Definition: ospi/v0/ospi.h:176
int32_t OSPI_readIndirect(OSPI_Handle handle, OSPI_Transaction *trans)
Function to perform indirect reads from the flash using INDAC controller.
void OSPI_cmdModeBitSet(OSPI_Handle handle, uint32_t enable)
This function sets command mode bit.
uint32_t decChipSelect
Definition: ospi/v0/ospi.h:121
void OSPI_rdModeBitSet(OSPI_Handle handle, uint32_t enable)
This function sets Read mode bit.
SemaphoreP_Object transferSemObj
Definition: ospi/v0/ospi.h:155