AM261x MCU+ SDK  11.01.00
ospi/v0/ospi.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021-24 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
50 #ifndef OSPI_H_
51 #define OSPI_H_
52 
53 /* ========================================================================== */
54 /* Include Files */
55 /* ========================================================================== */
56 
57 #include <stdint.h>
59 #include <kernel/dpl/SystemP.h>
60 #include <kernel/dpl/HwiP.h>
61 #include <kernel/dpl/SemaphoreP.h>
62 
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 /* ========================================================================== */
69 /* Macros & Typedefs */
70 /* ========================================================================== */
71 
72 struct OSPI_Config_s;
73 
75 typedef struct OSPI_Config_s *OSPI_Handle;
76 
77 /* ========================================================================== */
78 /* Structure Declarations */
79 /* ========================================================================== */
80 
82 typedef struct
83 {
84  /*
85  * SOC configuration
86  */
87  uint32_t baseAddr;
89  uint32_t dataBaseAddr;
91  uint32_t moduleId;
93  uint32_t clkId;
95  uint32_t inputClkFreq;
98  /*
99  * Driver configuration
100  */
101  uint32_t protocol;
108  uint32_t intrNum;
110  uint32_t intrEnable;
112  uint8_t intrPriority;
114  uint32_t dmaEnable;
116  uint32_t phyEnable;
118  uint32_t dacEnable;
120  uint32_t frmFmt;
122  uint32_t devDelays[4];
124  uint32_t chipSelect;
126  uint32_t decChipSelect;
128  uint32_t baudRateDiv;
130  uint32_t validateOtp;
140 } OSPI_Attrs;
141 
146 typedef struct
147 {
148  /*
149  * User params
150  */
153  /*
154  * State variables
155  */
156  uint32_t isOpen;
158  uint32_t isDacEnable;
160  SemaphoreP_Object lockObj;
162  SemaphoreP_Object transferSemObj;
170 
172  /* OSPI LLD Init Object and Handle */
173 
176  /* QSPI LLD Object and Handle */
177 } OSPI_Object;
178 
179 typedef struct OSPI_Config_s
180 {
185 } OSPI_Config;
186 
188 extern OSPI_Config gOspiConfig[];
190 extern uint32_t gOspiConfigNum;
191 
192 extern OSPI_DmaConfig gOspiDmaConfig[];
193 
194 /* ========================================================================== */
195 /* Internal/Private Structure Declarations */
196 /* ========================================================================== */
197 
198 /* ========================================================================== */
199 /* Function Declarations */
200 /* ========================================================================== */
201 
205 void OSPI_init(void);
206 
210 void OSPI_deinit(void);
211 
212 
218 void OSPI_Params_init( OSPI_Params *ospiParams);
219 
234 OSPI_Handle OSPI_open(uint32_t index, const OSPI_Params *openParams);
235 
245 void OSPI_close(OSPI_Handle handle);
246 
259 OSPI_Handle OSPI_getHandle(uint32_t index);
260 
279 
292 
305 
331 int32_t OSPI_readCmd(OSPI_Handle handle, OSPI_ReadCmdParams *rdParams);
332 
344 int32_t OSPI_writeCmd(OSPI_Handle handle, OSPI_WriteCmdParams *wrParams);
345 
354 
363 
372 
382 uint32_t OSPI_getInputClk(OSPI_Handle handle);
383 
393 uint32_t OSPI_isDacEnable(OSPI_Handle handle);
394 
404 uint32_t OSPI_isDmaEnable(OSPI_Handle handle);
405 
416 
426 uint32_t OSPI_isPhyEnable(OSPI_Handle handle);
427 
438 uint32_t OSPI_isDtrEnable(OSPI_Handle handle);
439 
449 int32_t OSPI_enableDDR(OSPI_Handle handle);
450 
460 int32_t OSPI_enableSDR(OSPI_Handle handle);
461 
472 
483 int32_t OSPI_setRdDataCaptureDelay(OSPI_Handle handle, uint32_t rdDataCapDelay);
484 
494 void OSPI_setNumAddrBytes(OSPI_Handle handle, uint32_t numAddrBytes);
495 
506 void OSPI_setDeviceSize(OSPI_Handle handle, uint32_t pageSize, uint32_t blkSize);
507 
517 void OSPI_setCmdDummyCycles(OSPI_Handle handle, uint32_t cmdDummyCycles);
518 
528 void OSPI_setReadDummyCycles(OSPI_Handle handle, uint32_t dummyCycles);
529 
539 void OSPI_setWriteDummyCycles(OSPI_Handle handle, uint32_t dummyCycles);
540 
550 void OSPI_setPhyEnableSuccess(OSPI_Handle handle, uint32_t success);
551 
561 void OSPI_setModeBits(OSPI_Handle handle, uint32_t modeBits);
562 
572 
582 
593 
603 void OSPI_cmdModeBitSet(OSPI_Handle handle, uint32_t enable);
604 
614 void OSPI_rdModeBitSet(OSPI_Handle handle, uint32_t enable);
615 
627 uint32_t OSPI_getProtocol(OSPI_Handle handle);
628 
639 void OSPI_setProtocol(OSPI_Handle handle, uint32_t protocol);
640 
650 
660 
671 void OSPI_setXferOpCodes(OSPI_Handle handle, uint8_t readCmd, uint8_t pageProgCmd);
672 
682 void OSPI_setCmdExtType(OSPI_Handle handle, uint32_t cmdExtType);
683 
694 
705 
716 
728 int32_t OSPI_phyTuneDDR(OSPI_Handle handle, uint32_t flashOffset);
729 
730 int32_t OSPI_phyTuneSDR(OSPI_Handle handle, uint32_t flashOffset);
731 
745 int32_t OSPI_phyTuneGrapher(OSPI_Handle handle, uint32_t flashOffset, uint8_t arrays[5][128][128]);
746 
754 void OSPI_phyGetTuningData(uint32_t *tuningData, uint32_t *tuningDataSize);
755 
765 int32_t OSPI_phyReadAttackVector(OSPI_Handle handle, uint32_t offset);
766 
776 int32_t OSPI_enablePhy(OSPI_Handle handle);
777 
787 int32_t OSPI_disablePhy(OSPI_Handle handle);
788 
799 
810 
811 
832 
845 void OSPI_norFlashSetCmds(uint8_t rdCmd, uint8_t wrCmd, uint8_t eraseCmd);
846 
858 int32_t OSPI_norFlashReadId(OSPI_Handle handle, uint32_t *manufacturerId, uint32_t *deviceId);
859 
872 int32_t OSPI_norFlashWrite(OSPI_Handle handle, uint32_t offset, uint8_t *buf, uint32_t len);
873 
886 int32_t OSPI_norFlashRead(OSPI_Handle handle, uint32_t offset, uint8_t *buf, uint32_t len);
887 
900 int32_t OSPI_norFlashReadSfdp(OSPI_Handle handle, uint32_t offset, uint8_t *buf, uint32_t len);
901 
912 int32_t OSPI_norFlashErase(OSPI_Handle handle, uint32_t address);
913 
914 
925 int32_t OSPI_configResetPin(OSPI_Handle handle, uint32_t config);
926 
927 
938 int32_t OSPI_configBaudrate(OSPI_Handle handle, uint32_t baud);
939 
950 int32_t OSPI_readBaudRateDivFromReg(OSPI_Handle handle, uint32_t *baudDiv);
951 
962 int32_t OSPI_getBaudRateDivFromObj(OSPI_Handle handle, uint32_t *baudDiv);
963 
974 int32_t OSPI_setResetPinStatus(OSPI_Handle handle, uint32_t pinStatus);
975 
989 int32_t OSPI_phyValidateTuningPoint(OSPI_Handle handle, uint32_t flashOffset);
990 
1002 
1014 int32_t OSPI_setFrequency(OSPI_Handle handle, uint64_t inputClkFreq);
1015 
1028 int32_t OSPI_setDelays(OSPI_Handle handle, uint32_t inputClkFreq);
1029 
1042 int32_t OSPI_setBaudRateDiv(OSPI_Handle handle, uint32_t baudRateDiv);
1043 
1048 #ifdef __cplusplus
1049 }
1050 #endif
1051 
1052 #endif /* #ifndef OSPI_H_ */
1053 
OSPI_norFlashWrite
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.
OSPI_setProtocol
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.h
OSPI LLD Driver API/interface file.
OSPI_isDacEnable
uint32_t OSPI_isDacEnable(OSPI_Handle handle)
This function checks if the Direct Access Controller mode is enabled.
OSPI_setCmdDummyCycles
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_ReadCmdParams
OSPI Instance Read Command Structure.
Definition: ospi_lld.h:477
OSPI_Transaction_init
void OSPI_Transaction_init(OSPI_Transaction *trans)
Function to initialize the OSPI_Transaction.
OSPI_setRdDataCaptureDelay
int32_t OSPI_setRdDataCaptureDelay(OSPI_Handle handle, uint32_t rdDataCapDelay)
This function sets read data capture cycles in the OSPI controller.
OSPI_WriteCmdParams
OSPI Instance Write Command Structure.
Definition: ospi_lld.h:458
OSPI_disablePhyPipeline
int32_t OSPI_disablePhyPipeline(OSPI_Handle handle)
This function disables the PHY Pipeline.
OSPI_ReadCmdParams_init
void OSPI_ReadCmdParams_init(OSPI_ReadCmdParams *rdParams)
Function to initialize the OSPI_ReadCmdParams structure.
OSPI_configBaudrate
int32_t OSPI_configBaudrate(OSPI_Handle handle, uint32_t baud)
Configures baud divider.
OSPI_enableSDR
int32_t OSPI_enableSDR(OSPI_Handle handle)
This function enables the Single Data Rate (SDR)
OSPI_Attrs::dacEnable
uint32_t dacEnable
Definition: ospi/v0/ospi.h:118
OSPI_readBaudRateDivFromReg
int32_t OSPI_readBaudRateDivFromReg(OSPI_Handle handle, uint32_t *baudDiv)
Return value of baudrate that is programmed in IP register.
OSPI_norFlashReadSfdp
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.
OSPI_Transaction
Data structure used with OSPI_Transfers - OSPI_lld_readDirect, OSPI_lld_writeDirect,...
Definition: ospi_lld.h:436
OSPI_phyReadAttackVector
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...
OSPI_norFlashRead
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.
OSPI_Attrs::intrPriority
uint8_t intrPriority
Definition: ospi/v0/ospi.h:112
OSPI_Attrs::protocol
uint32_t protocol
Definition: ospi/v0/ospi.h:101
OSPI_getInputClk
uint32_t OSPI_getInputClk(OSPI_Handle handle)
This function returns the input clk frequency OSPI was programmed at.
OSPI_phyTuneSDR
int32_t OSPI_phyTuneSDR(OSPI_Handle handle, uint32_t flashOffset)
SystemP.h
OSPI_init
void OSPI_init(void)
This function initializes the OSPI module.
OSPI_setBaudRateDiv
int32_t OSPI_setBaudRateDiv(OSPI_Handle handle, uint32_t baudRateDiv)
Sets the baud rate divider for OSPI communication.
OSPI_enableDdrRdCmds
int32_t OSPI_enableDdrRdCmds(OSPI_Handle handle)
This function sets DDR bit in INSTR_RD register for RD commands.
OSPI_PhyConfiguration
OSPI PHY Configuration.
Definition: ospi_lld.h:567
OSPI_phyValidateTuningPoint
int32_t OSPI_phyValidateTuningPoint(OSPI_Handle handle, uint32_t flashOffset)
Validates a specific tuning point for OSPI PHY.
OSPI_norFlashErase
int32_t OSPI_norFlashErase(OSPI_Handle handle, uint32_t address)
This function erases 1 block of data starting from a provided address.
OSPI_deinit
void OSPI_deinit(void)
This function de-initializes the OSPI module.
OSPI_setDualOpCodeMode
void OSPI_setDualOpCodeMode(OSPI_Handle handle)
This function sets OSPI controller to use dual byte opcodes.
OSPI_setDeviceSize
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.
OSPI_Params_init
void OSPI_Params_init(OSPI_Params *ospiParams)
Initialize data structure with defaults.
OSPI_isDtrEnable
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_Attrs::clkId
uint32_t clkId
Definition: ospi/v0/ospi.h:93
OSPI_Object::handle
OSPI_Handle handle
Definition: ospi/v0/ospi.h:151
OSPI_Attrs::dataBaseAddr
uint32_t dataBaseAddr
Definition: ospi/v0/ospi.h:89
OSPI_setResetPinStatus
int32_t OSPI_setResetPinStatus(OSPI_Handle handle, uint32_t pinStatus)
This function activates the RESET pin feature.
OSPI_Object::ospilldHandle
OSPILLD_Handle ospilldHandle
Definition: ospi/v0/ospi.h:175
OSPI_Handle
struct OSPI_Config_s * OSPI_Handle
A handle that is returned from a OSPI_open() call.
Definition: ospi/v0/ospi.h:75
OSPI_Attrs::baudRateDiv
uint32_t baudRateDiv
Definition: ospi/v0/ospi.h:128
OSPI_Params
OSPI Parameters.
Definition: ospi_lld.h:523
OSPI_norFlashReadId
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.
OSPI_setXferOpCodes
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_getHandle
OSPI_Handle OSPI_getHandle(uint32_t index)
This function returns the handle of an open OSPI Instance from the instance index.
SemaphoreP.h
OSPI_Attrs::moduleId
uint32_t moduleId
Definition: ospi/v0/ospi.h:91
OSPI_disableDacMode
int32_t OSPI_disableDacMode(OSPI_Handle handle)
This function disables the Direct Access Mode.
OSPI_Attrs::inputClkFreq
uint32_t inputClkFreq
Definition: ospi/v0/ospi.h:95
OSPI_Attrs::validateOtp
uint32_t validateOtp
Definition: ospi/v0/ospi.h:130
OSPI_getProtocol
uint32_t OSPI_getProtocol(OSPI_Handle handle)
This function returns the current protocol for which the transfer lines in OSPI driver is configured ...
OSPI_setDelays
int32_t OSPI_setDelays(OSPI_Handle handle, uint32_t inputClkFreq)
Sets timing delays for the OSPI interface based on input clock frequency.
OSPI_setNumAddrBytes
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.
OSPI_Attrs::dmaRestrictedRegions
const OSPI_AddrRegion * dmaRestrictedRegions
Definition: ospi/v0/ospi.h:132
OSPI_Attrs
OSPI instance attributes - used during init time.
Definition: ospi/v0/ospi.h:83
OSPI_getFlashDataBaseAddr
uint32_t OSPI_getFlashDataBaseAddr(OSPI_Handle handle)
This function gets the SOC mapped data base address of the flash.
OSPI_isValidateOtpEnable
uint32_t OSPI_isValidateOtpEnable(OSPI_Handle handle)
Checks if Phy tuning point validation is enabled.
OSPI_Object
OSPI driver object.
Definition: ospi/v0/ospi.h:147
OSPILLD_Object
OSPI driver object.
Definition: ospi_lld.h:633
OSPI_readDirect
int32_t OSPI_readDirect(OSPI_Handle handle, OSPI_Transaction *trans)
Function to perform direct reads from the flash using DAC controller.
OSPI_phyGetTuningData
void OSPI_phyGetTuningData(uint32_t *tuningData, uint32_t *tuningDataSize)
This function returns the address to the attack vector buf required for tuning the PHY.
OSPI_clearDualOpCodeMode
void OSPI_clearDualOpCodeMode(OSPI_Handle handle)
This function sets OSPI controller to not use dual byte opcodes.
OSPI_Attrs::chipSelect
uint32_t chipSelect
Definition: ospi/v0/ospi.h:124
OSPI_Object::isOpen
uint32_t isOpen
Definition: ospi/v0/ospi.h:156
OSPI_writeIndirect
int32_t OSPI_writeIndirect(OSPI_Handle handle, OSPI_Transaction *trans)
Function to perform indirect writes to the flash using INDAC controller.
OSPI_enablePhyPipeline
int32_t OSPI_enablePhyPipeline(OSPI_Handle handle)
This function enables the PHY Pipeline.
OSPI_norFlashInit1s1s1s
int32_t OSPI_norFlashInit1s1s1s(OSPI_Handle handle)
This function initializes the NOR flash to work in 1-1-1 mode.
OSPI_isPhyEnable
uint32_t OSPI_isPhyEnable(OSPI_Handle handle)
This function checks if the OSPI PHY controller is enabled.
OSPI_Object::isDacEnable
uint32_t isDacEnable
Definition: ospi/v0/ospi.h:158
HwiP.h
OSPI_setFrequency
int32_t OSPI_setFrequency(OSPI_Handle handle, uint64_t inputClkFreq)
Sets the operating frequency for the OSPI peripheral.
OSPI_writeCmd
int32_t OSPI_writeCmd(OSPI_Handle handle, OSPI_WriteCmdParams *wrParams)
Function to send specific commands and related data to flash.
OSPI_setPhyEnableSuccess
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.
gOspiDmaConfig
OSPI_DmaConfig gOspiDmaConfig[]
OSPI_enablePhy
int32_t OSPI_enablePhy(OSPI_Handle handle)
This function enables the PHY.
OSPI_disablePhy
int32_t OSPI_disablePhy(OSPI_Handle handle)
This function disables the PHY.
OSPI_enableDDR
int32_t OSPI_enableDDR(OSPI_Handle handle)
This function enables the Dual Data Rate (DDR)
OSPI_Config
Definition: ospi/v0/ospi.h:180
OSPI_AddrRegion
OSPI Address Region.
Definition: ospi_lld.h:504
OSPI_Attrs::intrNum
uint32_t intrNum
Definition: ospi/v0/ospi.h:108
OSPI_configResetPin
int32_t OSPI_configResetPin(OSPI_Handle handle, uint32_t config)
This function configures reset functionality.
OSPI_close
void OSPI_close(OSPI_Handle handle)
Function to close a OSPI peripheral specified by the OSPI handle.
OSPI_enableModeBitsRead
void OSPI_enableModeBitsRead(OSPI_Handle handle)
This function enables mode bits transmission while reading.
OSPI_Object::ospilldInitObject
OSPILLD_InitObject ospilldInitObject
Definition: ospi/v0/ospi.h:171
OSPI_Object::lockObj
SemaphoreP_Object lockObj
Definition: ospi/v0/ospi.h:160
OSPI_isDmaEnable
uint32_t OSPI_isDmaEnable(OSPI_Handle handle)
This function checks if DMA is enabled for reads.
OSPI_enableModeBitsCmd
void OSPI_enableModeBitsCmd(OSPI_Handle handle)
This function enables mode bits transmission while sending CMDs.
HwiP_Object
Opaque Hwi object used with the Hwi APIs.
Definition: HwiP.h:142
OSPI_Object::hwiObj
HwiP_Object hwiObj
Definition: ospi/v0/ospi.h:164
OSPI_setWriteDummyCycles
void OSPI_setWriteDummyCycles(OSPI_Handle handle, uint32_t dummyCycles)
This function sets appropriate dummy cycles for flash write.
OSPI_norFlashSetCmds
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....
OSPI_setReadDummyCycles
void OSPI_setReadDummyCycles(OSPI_Handle handle, uint32_t dummyCycles)
This function sets appropriate dummy cycles for flash read.
OSPI_Object::ospiDmaHandle
void * ospiDmaHandle
Definition: ospi/v0/ospi.h:169
gOspiConfig
OSPI_Config gOspiConfig[]
Externally defined driver configuration array.
OSPI_phyTuneGrapher
int32_t OSPI_phyTuneGrapher(OSPI_Handle handle, uint32_t flashOffset, uint8_t arrays[5][128][128])
This function takes a 4x128x128 array and fills it with TX RX DLL data for graphing purpose.
OSPI_isIntrEnable
uint32_t OSPI_isIntrEnable(OSPI_Handle handle)
This function checks if interrupts are enabled.
OSPI_Attrs::dmaEnable
uint32_t dmaEnable
Definition: ospi/v0/ospi.h:114
OSPI_Attrs::phyEnable
uint32_t phyEnable
Definition: ospi/v0/ospi.h:116
OSPI_Object::ospilldObject
OSPILLD_Object ospilldObject
Definition: ospi/v0/ospi.h:174
OSPI_getBaudRateDivFromObj
int32_t OSPI_getBaudRateDivFromObj(OSPI_Handle handle, uint32_t *baudDiv)
Return value of baudrate that is saved in OSPI Object.
OSPI_WriteCmdParams_init
void OSPI_WriteCmdParams_init(OSPI_WriteCmdParams *wrParams)
Function to initialize the OSPI_WriteCmdParams structure.
OSPI_setCmdExtType
void OSPI_setCmdExtType(OSPI_Handle handle, uint32_t cmdExtType)
This function sets the type of command extension used in dual byte opcode mode.
OSPILLD_InitObject
OSPI driver initialization object.
Definition: ospi_lld.h:578
OSPI_open
OSPI_Handle OSPI_open(uint32_t index, const OSPI_Params *openParams)
This function opens a given OSPI peripheral.
OSPI_Object::currTrans
OSPI_Transaction * currTrans
Definition: ospi/v0/ospi.h:167
OSPI_Attrs::intrEnable
uint32_t intrEnable
Definition: ospi/v0/ospi.h:110
OSPI_enableDacMode
int32_t OSPI_enableDacMode(OSPI_Handle handle)
This function enables the Direct Access Mode.
OSPI_Attrs::baseAddr
uint32_t baseAddr
Definition: ospi/v0/ospi.h:87
OSPI_Attrs::frmFmt
uint32_t frmFmt
Definition: ospi/v0/ospi.h:120
gOspiConfigNum
uint32_t gOspiConfigNum
Externally defined driver configuration array size.
OSPI_writeDirect
int32_t OSPI_writeDirect(OSPI_Handle handle, OSPI_Transaction *trans)
Function to perform direct writes to the flash using DAC controller.
OSPI_setModeBits
void OSPI_setModeBits(OSPI_Handle handle, uint32_t modeBits)
This function sets mode bits in the mode bit field of OSPI config register.
OSPI_Config::attrs
const OSPI_Attrs * attrs
Definition: ospi/v0/ospi.h:181
OSPI_getPhyEnableSuccess
uint32_t OSPI_getPhyEnableSuccess(OSPI_Handle handle)
This function fetches the phyEnableSuccess field in OSPI_Object.
OSPI_phyTuneDDR
int32_t OSPI_phyTuneDDR(OSPI_Handle handle, uint32_t flashOffset)
This function tunes the OSPI PHY for DDR mode to set optimal PHY parameters.
OSPI_readCmd
int32_t OSPI_readCmd(OSPI_Handle handle, OSPI_ReadCmdParams *rdParams)
Function to send specific commands and receive related data from flash.
OSPI_Attrs::phyConfiguration
OSPI_PhyConfiguration phyConfiguration
Definition: ospi/v0/ospi.h:137
OSPI_Config::object
OSPI_Object * object
Definition: ospi/v0/ospi.h:183
OSPI_readIndirect
int32_t OSPI_readIndirect(OSPI_Handle handle, OSPI_Transaction *trans)
Function to perform indirect reads from the flash using INDAC controller.
OSPI_cmdModeBitSet
void OSPI_cmdModeBitSet(OSPI_Handle handle, uint32_t enable)
This function sets command mode bit.
OSPI_Attrs::decChipSelect
uint32_t decChipSelect
Definition: ospi/v0/ospi.h:126
OSPI_rdModeBitSet
void OSPI_rdModeBitSet(OSPI_Handle handle, uint32_t enable)
This function sets Read mode bit.
OSPI_Object::transferSemObj
SemaphoreP_Object transferSemObj
Definition: ospi/v0/ospi.h:162