57 #define QSPI_SCBR(baudrate, masterClock) \ 58 ((uint32_t) (masterClock / baudrate) << 8) 61 #define QSPI_DLYBS(delay, masterClock) \ 62 ((uint32_t) (((masterClock / 1000000) * delay) / 1000) << 16) 65 #define QSPI_DLYBCT(delay, masterClock) \ 66 ((uint32_t) (((masterClock / 1000000) * delay) / 32000) << 24) 197 uint32_t dwClockCfg);
202 const pData, uint32_t NumOfBytes);
207 uint32_t NumOfBytes);
218 uint32_t dwConfiguration);
227 uint8_t ScrambleFlag);
QspidStatus_t QSPI_DisableIt(Qspi *pQspi, uint32_t dwSources)
Disables one or more interrupt sources of a QSPI peripheral.
Definition: qspi.c:275
QspidStatus_t QSPI_MultiWriteSPI(Qspid_t *pQspid, uint16_t const *pData, uint32_t NumOfBytes)
Sends multiple data through a SPI peripheral.
Definition: qspi.c:508
QspidStatus_t QSPI_SingleReadSPI(Qspid_t *pQspid, uint16_t *const pData)
Reads the data received by a SPI peripheral. This method must be called after a successful SPI_Write ...
Definition: qspi.c:383
QspidStatus_t QSPI_EnableMemAccess(Qspid_t *pQspi, uint8_t const KeepCfg, uint8_t ScrambleFlag)
Sends an instruction over QSPI and configures other related address like Addr , Frame and synchronise...
Definition: qspi.c:695
QspidStatus_t QSPI_EndTransfer(Qspi *pQspi)
Ends ongoing transfer by releasing CS of QSPI peripheral.
Definition: qspi.c:360
QspidStatus_t QSPI_ReadWriteMem(Qspid_t *pQspid, Access_t const ReadWrite)
Writes or reads the QSPI memory (0x80000000) to transmit or receive data from Flash memory.
Definition: qspi.c:730
QspidStatus_t QSPI_ReadCommand(Qspid_t *pQspi, uint8_t const KeepCfg)
Send instruction over QSPI to read data.
Definition: qspi.c:652
QspidStatus_t QSPI_MultiReadSPI(Qspid_t *pQspid, uint16_t *const pData, uint32_t NumOfBytes)
Reads multiple data received by a SPI peripheral. This method must be called after a successful SPI_W...
Definition: qspi.c:422
QspiClockMode_t
qspi clock modes , regarding clock phase and clock polarity
Definition: qspi.h:96
#define QSPI_SR_TDRE
(QSPI_SR) Transmit Data Register Empty
Definition: component_qspi.h:104
uint32_t QSPI_GetEnabledItStatus(Qspi *pQspi)
Returns enabled interrupt status.
Definition: qspi.c:298
Access_t
qspi access modes
Definition: qspi.h:80
QspidStatus_t QSPI_ConfigureInterface(Qspid_t *pQspid, QspiMode_t Mode, uint32_t dwConfiguration)
Configures QSPI/SPI.
Definition: qspi.c:339
qspi frame structure for QSPI mode
Definition: qspi.h:151
qspi buffer structure
Definition: qspi.h:141
uint32_t reserved2
Definition: qspi.h:155
#define QSPI_SR_QSPIENS
(QSPI_SR) QSPI Enable Status
Definition: component_qspi.h:110
#define QSPI_SR_CSR
(QSPI_SR) Chip Select Rise
Definition: component_qspi.h:107
#define QSPI_SR_RDRF
(QSPI_SR) Receive Data Register Full
Definition: component_qspi.h:103
qspi command structure
Definition: qspi.h:134
void QSPI_Disable(Qspi *pQspi)
Disables a QSPI peripheral.
Definition: qspi.c:237
qspi driver structure
Definition: qspi.h:176
#define QSPI_SR_TXEMPTY
(QSPI_SR) Transmission Registers Empty
Definition: component_qspi.h:105
void QSPI_ConfigureClock(Qspi *pQspi, QspiClockMode_t ClockMode, uint32_t dwClockCfg)
Configures peripheral clock of a QSPI/SPI peripheral.
Definition: qspi.c:324
uint32_t QSPI_GetItMask(Qspi *pQspi)
Return the interrupt mask register.
Definition: qspi.c:287
QspidStatus_t QSPI_SendCommand(Qspid_t *pQspi, uint8_t const KeepCfg)
Send an instruction over QSPI (oly a flash command no data)
Definition: qspi.c:560
QspiStatus_t
qspi status regiter bits
Definition: qspi.h:121
#define QSPI_SR_OVRES
(QSPI_SR) Overrun Error Status
Definition: component_qspi.h:106
QspidStatus_t
qspi status codes
Definition: qspi.h:106
QspidStatus_t QSPI_SendCommandWithData(Qspid_t *pQspi, uint8_t const KeepCfg)
Send instruction over QSPI with data.
Definition: qspi.c:610
QspiMode_t
qspi modes SPI or QSPI
Definition: qspi.h:88
QspidStatus_t QSPI_EnableIt(Qspi *pQspi, uint32_t dwSources)
Enables one or more interrupt sources of a QSPI peripheral.
Definition: qspi.c:262
Qspi hardware registers.
Definition: component_qspi.h:41
#define QSPI_SR_CSS
(QSPI_SR) Chip Select Status
Definition: component_qspi.h:108
uint32_t QSPI_GetStatus(Qspi *pQspi, const QspiStatus_t rStatus)
Get the current status register of the given QSPI peripheral.
Definition: qspi.c:312
void QSPI_SwReset(Qspi *pQspi)
Resets a QSPI peripheral.
Definition: qspi.c:250
#define QSPI_MR_SMM_MEMORY
(QSPI_MR) The QSPI is in Serial Memory mode.
Definition: component_qspi.h:71
QspidStatus_t QSPI_SingleWriteSPI(Qspid_t *pQspid, uint16_t const *pData)
Sends a single data through a SPI peripheral.
Definition: qspi.c:473
#define QSPI_SR_INSTRE
(QSPI_SR) Instruction End Status
Definition: component_qspi.h:109
#define QSPI_MR_SMM_SPI
(QSPI_MR) The QSPI is in SPI mode.
Definition: component_qspi.h:70
void QSPI_Enable(Qspi *pQspi)
Enables a QSPI peripheral.
Definition: qspi.c:224