* | Version | Changes | Reason for Change |
*
* | 2.100 |
* Updated slaveSelect validity check to allow Dual QSPI use case. |
* Bug fixes. |
*
*
* | 2.90 |
* Updated internal API |
* Bug fixes. |
*
*
* | 2.80 |
* Added hyperbus support to CAT1C family. |
* Code Enhancements. |
*
*
* | 2.70 |
* Added enhancements related to CAT1D family. |
* Support added for sending dummy cycles using RWDS line, selecting DLL speed options and RX Capture mode. |
*
*
* | Added API \ref Cy_SMIF_Reset_Memory, updated APIs \ref Cy_SMIF_MemInit,
* - \ref Cy_SMIF_MemOctalEnable, \ref Cy_SMIF_MemRead, \ref Cy_SMIF_MemWrite. |
* Support added for SMIF octal DDR with RWDS and bug fixes. |
*
*
* | 2.60 |
* Modified private APIs |
* MISRA-10.6 violation and Bug fixes. |
*
*
* | Added new API \ref Cy_SMIF_SetSelectedDelayTapSel and \ref Cy_SMIF_GetSelectedDelayTapSel. |
* Support for CAT1D devices. |
*
*
* | Modified \ref Cy_SMIF_MemWrite and \ref Cy_SMIF_MemDeInit APIs. |
* Code Enhancement. |
*
*
* | 2.50 |
* Future functionality support for Hyperbus devices. |
* Code Enhancements. |
*
*
* | 2.40 |
* Enhanced \ref Cy_SMIF_MemEraseSector to compute sector boundary for erase operation and \n
* Minor Bug fixes.
* |
* Code Enhancements. |
*
*
* | Added new API \ref Cy_SMIF_MemCmdPowerDown and \ref Cy_SMIF_MemCmdReleasePowerDown. |
* Reduce power consumption. |
*
*
* | Added new API \ref Cy_SMIF_DeviceTransfer_SetMergeTimeout and \ref Cy_SMIF_DeviceTransfer_ClearMergeTimeout. |
* Allow user to configure merge timeout. |
*
*
* | Removed Bridge API support. |
* Removed feature not supported in existing devices. |
*
*
* | 2.30 |
* Octal SDR and DDR support using SFDP mode. |
* Octal device support. |
*
*
* | Move SFDP related functionality to cy_smif_sfdp.c. |
* Code Enhancements. |
*
*
* | Added support for new product families |
* Support for CAT1B and CAT1C devices. |
*
*
* | Added new API's:\n
* \ref Cy_SMIF_MemInitSfdpMode()\n
* \ref Cy_SMIF_SetCryptoIV()\n
* \ref Cy_SMIF_SetCryptoKey()\n
* \ref Cy_SMIF_ConvertSlaveSlotToIndex()\n
* \ref Cy_SMIF_SetCryptoEnable()\n
* \ref Cy_SMIF_SetCryptoDisable()\n
* \ref Cy_SMIF_SetReadyPollingDelay()\n
*
* Following macros renamed:\n
* CY_SMIF_WRITE_STATUS_REG2_CMD to CY_SMIF_WRITE_STATUS_REG2_T1_CMD. |
* Support for SFDP 1.0 devices. |
*
*
* | Added new API's for CAT1D devices\n
* \ref Cy_SMIF_SetRxCaptureMode()\n
* Cy_SMIF_Bridge_Enable()\n
* Cy_SMIF_Bridge_SetPortPriority()\n
* Cy_SMIF_Bridge_SetSimpleRemapRegion()\n
* Cy_SMIF_Bridge_SetInterleavingRemapRegion()\n
* \ref Cy_SMIF_MemOctalEnable()\n
* |
* Support for CAT1D devices. |
*
*
* | 2.20 |
* Bug fixes in \ref Cy_SMIF_MemEraseSector for Hybrid memory configuration.
* Updated \ref Cy_SMIF_MemIsReady to use \ref Cy_SysLib_Rtos_Delay and \ref Cy_SysLib_Rtos_DelayUs. |
* Code enhancement. |
*
*
* | 2.10 |
* New silicon family support. |
* Added extended API for DDR support. |
*
*
* | 2.0 |
* Reworked the \ref Cy_SMIF_MemRead and \ref Cy_SMIF_MemWrite functions to use polling instead of interrupts. |
* Extend the usability of these functions. |
*
*
* | Reworked the length-parameter check in the \ref Cy_SMIF_MemEraseSector function.
* The Erase operation is not performed and \ref CY_SMIF_SUCCESS is no longer returned when the sectors are not aligned. |
* Fix the user error-handling of the length parameter. |
*
*
* | Fixed the address-parameter check in the \ref Cy_SMIF_MemLocateHybridRegion function.
* \ref CY_SMIF_SUCCESS or \ref CY_SMIF_NOT_HYBRID_MEM is no longer returned when the address exceeds the memory size. |
* Address a defect. |
*
*
* | Fixed MISRA 2012 violations. |
* MISRA 2012 compliance. |
*
*
* | 1.50.1 |
* Minor documentation updates. |
* Documentation improvement. |
*
*
* | 1.50 |
* Added a new function: \ref Cy_SMIF_MemLocateHybridRegion.\n
* Added a new structure \ref cy_stc_smif_hybrid_region_info_t.\n
* Updated the \ref Cy_SMIF_MemEraseSector and \ref Cy_SMIF_MemCmdSectorErase functions.\n
* Updated the \ref Cy_SMIF_MemSfdpDetect function. \n
* Updated the \ref cy_stc_smif_mem_device_cfg_t structure. |
* Support for memories with hybrid regions. |
*
*
* | 1.40.1 |
* The \ref Cy_SMIF_MemInit is changed. |
* Corrected a false assertion during initialization in SFDP mode. |
*
*
* | Minor documentation updates. |
* |
*
*
* | 1.40 |
* The following functions are renamed:\n
* Cy_SMIF_GetTxfrStatus into Cy_SMIF_GetTransferStatus;\n
* Cy_SMIF_Memslot_Init into Cy_SMIF_MemInit;\n
* Cy_SMIF_Memslot_DeInit into Cy_SMIF_MemDeInit;\n
* Cy_SMIF_Memslot_CmdWriteEnable into Cy_SMIF_MemCmdWriteEnable;\n
* Cy_SMIF_Memslot_CmdWriteDisable into Cy_SMIF_MemCmdWriteDisable;\n
* Cy_SMIF_Memslot_IsBusy into Cy_SMIF_MemIsBusy;\n
* Cy_SMIF_Memslot_QuadEnable into Cy_SMIF_MemQuadEnable;\n
* Cy_SMIF_Memslot_CmdReadSts into Cy_SMIF_MemCmdReadStatus;\n
* Cy_SMIF_Memslot_CmdWriteSts into Cy_SMIF_MemCmdWriteStatus;\n
* Cy_SMIF_Memslot_CmdChipErase into Cy_SMIF_MemCmdChipErase;\n
* Cy_SMIF_Memslot_CmdSectorErase into Cy_SMIF_MemCmdSectorErase;\n
* Cy_SMIF_Memslot_SfdpDetect into Cy_SMIF_MemSfdpDetect;\n
* Cy_SMIF_Memslot_CmdProgram into Cy_SMIF_MemCmdProgram;\n
* Cy_SMIF_Memslot_CmdRead into Cy_SMIF_MemCmdRead.\n
* The following ENUMa are renamed:\n
* CY_SMIF_SEND_CMPLT into CY_SMIF_SEND_COMPLETE;\n
* CY_SMIF_REC_CMPLT into CY_SMIF_RX_COMPLETE;\n
* CY_SMIF_REC_BUSY into CY_SMIF_RX_BUSY;\n
* CY_SMIF_SEL_INV_INTERNAL_CLK into CY_SMIF_SEL_INVERTED_INTERNAL_CLK;\n
* CY_SMIF_SEL_INV_FEEDBACK_CLK into CY_SMIF_SEL_INVERTED_FEEDBACK_CLK;\n
* cy_en_smif_cache_en_t into cy_en_smif_cache_t.\n
* The following MACROs are renamed:\n
* CY_SMIF_FLAG_WR_EN into CY_SMIF_FLAG_WRITE_ENABLE;\n
* CY_SMIF_FLAG_CRYPTO_EN into CY_SMIF_FLAG_CRYPTO_ENABLE;\n
* CY_SMIF_SFDP_SING_BYTE_00 into CY_SMIF_SFDP_SIGNATURE_BYTE_00;\n
* CY_SMIF_SFDP_SING_BYTE_01 into CY_SMIF_SFDP_SIGNATURE_BYTE_01;\n
* CY_SMIF_SFDP_SING_BYTE_02 into CY_SMIF_SFDP_SIGNATURE_BYTE_02;\n
* CY_SMIF_SFDP_SING_BYTE_03 into CY_SMIF_SFDP_SIGNATURE_BYTE_03;\n
* CY_SMIF_WR_STS_REG1_CMD into CY_SMIF_WRITE_STATUS_REG1_CMD;\n
* CY_SMIF_WR_DISABLE_CMD into CY_SMIF_WRITE_DISABLE_CMD;\n
* CY_SMIF_RD_STS_REG1_CMD into CY_SMIF_READ_STATUS_REG1_CMD;\n
* CY_SMIF_WR_ENABLE_CMD into CY_SMIF_WRITE_ENABLE_CMD;\n
* CY_SMIF_RD_STS_REG2_T1_CMD into CY_SMIF_READ_STATUS_REG2_T1_CMD;\n
* CY_SMIF_WR_STS_REG2_CMD into CY_SMIF_WRITE_STATUS_REG2_CMD;\n
* CY_SMIF_RD_STS_REG2_T2_CMD into CY_SMIF_READ_STATUS_REG2_T2_CMD;\n
* CY_SMIF_QE_BIT_STS_REG2_T1 into CY_SMIF_QE_BIT_STATUS_REG2_T1;\n
* CY_SMIF_STS_REG_BUSY_MASK into CY_SMIF_STATUS_REG_BUSY_MASK.\n
* |
* Documentation improvement. |
*
*
* | Updated the description of the Cy_SMIF_MemInit() function.
* Updated the Cy_SMIF_Encrypt() function usage example.
* |
*
*
* | The type of arguments that are not modified by the functions are set to const.
* |
* Usability improvement.
* |
*
*
* | The Cy_SMIF_MemSfdpDetect() function is updated to support new
* commands for 4 bytes addressing.
* |
* Memory devices with new 4 byte addressing commands support.
* |
*
*
* | Added the blocking functions which take care of the
* busy-status check of the memory:
* - \ref Cy_SMIF_MemIsReady
* - \ref Cy_SMIF_MemIsQuadEnabled
* - \ref Cy_SMIF_MemEnableQuadMode
* - \ref Cy_SMIF_MemRead
* - \ref Cy_SMIF_MemWrite
* - \ref Cy_SMIF_MemEraseSector
* - \ref Cy_SMIF_MemEraseChip
* |
* Added new high-level blocking functions.
* |
*
*
* | 1.30 |
* The CY_SMIF_CMD_FIFO_WR_RX_COUNT_Msk value is changed to 0x0000FFFFUL. |
* Driver maintenance. |
*
*
* | Added the check of the size parameter in the Cy_SMIF_TransmitData() function. |
*
*
* | Added conditional check for presence of the SMIF hardware IP. |
*
*
* | Fixed the wrong erase command in the SFDP protocol for devices with Erase Type 3. |
*
*
* | Updated the General Description section with minor changes.
* Updated the ordering of the parameters descriptions for some functions.
* Added the text saying that the Cy_SMIF_MemInit() function is applicable
* to use the external memory as memory-mapped to PSoC (XIP mode).
* Added the snippet for the Cy_SMIF_Encrypt() function to show how to use this function.
* Added below the picture in the Low-Level Functions section the sequence of PDL
* functions required in a Read or Write transaction.
* Added the text below the picture about the address.
* Updated DUMMY COUNT in this picture.
* Added checking of the size parameter in the Cy_SMIF_TransmitData() function.
* |
* Documentation improvement. |
*
*
* | 1.20.1 |
* Added upper limit to size parameter in several functions. |
* Documentation improvement. |
*
*
* | 1.20 |
* Flattened the organization of the driver source code into the single
* source directory and the single include directory.
* |
* Driver library directory-structure simplification. |
*
*
* | Added a new return status and transfer width option for the case when the memory command is not supported. |
* Improved the memory command structure usability. |
*
*
* | Added register access layer. Use register access macros instead
* of direct register access using dereferenced pointers. |
* Makes register access device-independent, so that the PDL does
* not need to be recompiled for each supported part number. |
*
*
* | 1.11 |
* Fixed internal function that writes to the SMIF FIFO |
* The write function stuck in the loop when write speed in external
* memory is significantly lower than PSoC CPU core speed and write
* transfer is not finished during the single function call.
* |
*
*
* | Added optional mode part to the program command flow |
* Extend usability of program command |
*
*
* | 1.10.1 |
* Added Low Power Callback section |
* Documentation update and clarification |
*
*
* | 1.10 |
* Fix write to external memory from CM0+ core. Add checks of API input parameters.
* Minor documentation updates |
* |
*
*
* | 1.0 |
* Initial version |
* |
*
*
*
* \defgroup group_smif_macros Macros
* \{
* \defgroup group_smif_macros_status Status Macros
* \defgroup group_smif_macros_cmd Command Macros
* \defgroup group_smif_macros_flags External Memory Flags
* \defgroup group_smif_macros_sfdp SFDP Macros
* \defgroup group_smif_macros_isr Interrupt Macros
* \}
* \defgroup group_smif_functions Functions
* \{
* \defgroup group_smif_low_level_functions Low Level Functions
* \{
* The SMIF interface can be used to transmit different types of commands.
* Each command has different phases: command, dummy cycles, and transmit and receive data which require separate APIs.
*
* During the time that Slave Select line is active (LOW) the clock signal (CLK) is toggled while command information is first
* transferred on the data (IO) signals from the master to the slave. The clock continues to toggle during any period required for
* information access in the slave. The clock continues to toggle during the transfer of read data from the slave to the master
* or write data from the master to the slave. When the master has transferred the desired amount of data, the master drives the
* Slave Select line inactive (HIGH).
* Basic flow for read/write commands using \ref Cy_SMIF_TransmitCommand, \ref Cy_SMIF_TransmitData, \ref Cy_SMIF_ReceiveData and
* \ref Cy_SMIF_SendDummyCycles with a Quad SPI interface.
*
* \image html smif_1_0_p03_rw_cmd.png
*
* The sequence of the PDL functions required in a read or write transaction is:
* \ref Cy_SMIF_TransmitCommand() ->
* \ref Cy_SMIF_SendDummyCycles() ->
* \ref Cy_SMIF_ReceiveData() / \ref Cy_SMIF_TransmitData() ->
* \ref Cy_SMIF_BusyCheck().
* The address is sent as part of the Cy_SMIF_TransmitCommand() function.
* No separate function call is required.
*
* \}
* \defgroup group_smif_mem_slot_functions Memory Slot Functions
* \defgroup group_smif_functions_syspm_callback Low Power Callback
* \}
* \defgroup group_smif_data_structures Data Structures
* \{
* \defgroup group_smif_data_structures_memslot SMIF Memory Description Structures
* General hierarchy of memory structures are:
*
* \image html smif_3_0_p02_memslot_stc.png
*
* \note
* Above image is applicable only for SMIF v3 IP.
*
* \image html smif_1_0_p02_memslot_stc.png
*
* \note
* Above image is applicable only for SMIF v1 IP.
*
* Top structure is \ref cy_stc_smif_block_config_t, which could have links up to
* 4 \ref cy_stc_smif_mem_config_t which describes each connected to the SMIF
* external memory.
* \}
* \defgroup group_smif_enums Enumerated Types
*/
#if !defined (CY_SMIF_H)
#define CY_SMIF_H
#include "cy_device.h"
#if defined (CY_IP_MXSMIF)
#include