SMIF Memory Description Structures

group group_smif_data_structures_memslot

General hierarchy of memory structures are:

../../../_images/smif_3_0_p02_memslot_stc.png

note

Above image is applicable only for SMIF v3 IP.

../../../_images/smif_1_0_p02_memslot_stc.png

note

Above image is applicable only for SMIF v1 IP.

Top structure is

cy_stc_smif_block_config_t, which could have links up to 4 cy_stc_smif_mem_config_t which describes each connected to the SMIF external memory.

struct cy_stc_smif_mem_cmd_t
#include <cy_smif_memslot.h>

This command structure is used to store the Read/Write command configuration.

Public Members

uint32_t command

The 8-bit command.

This value is 0xFFFFFFFF when there is no command present

cy_en_smif_txfr_width_t cmdWidth

The width of the command transfer.

cy_en_smif_txfr_width_t addrWidth

The width of the address transfer.

uint32_t mode

The 8-bit mode byte.

This value is 0xFFFFFFFF when there is no mode present

cy_en_smif_txfr_width_t modeWidth

The width of the mode transfer.

uint32_t dummyCycles

The number of the dummy cycles.

A zero value suggests no dummy cycles

cy_en_smif_txfr_width_t dataWidth

The width of the data transfer.

cy_en_smif_data_rate_t dataRate

The Data rate of data.

note

This parameter is available for CAT1B devices.

cy_en_smif_field_presence_t dummyCyclesPresence

This specifies the presence of the dummy field.

note

This parameter is available for CAT1B devices.

cy_en_smif_field_presence_t modePresence

This specifies the presence of the mode field.

note

This parameter is available for CAT1B devices.

uint32_t modeH

The 8-bit command.

note

This parameter is available for CAT1B devices. This value is 0x0 when there is no higher byte mode present

cy_en_smif_data_rate_t modeRate

The Data rate of mode.

note

This parameter is available for CAT1B devices.

cy_en_smif_data_rate_t addrRate

The Data rate of address.

note

This parameter is available for CAT1B devices.

cy_en_smif_field_presence_t cmdPresence

This specifies the presence of the command field.

note

This parameter is available for CAT1B devices.

uint32_t commandH

The 8-bit command.

note

This parameter is available for CAT1B devices. This value is 0x0 when there is no higher byte command present

cy_en_smif_data_rate_t cmdRate

The Data rate of command.

note

This parameter is available for CAT1B devices.

struct cy_stc_smif_hybrid_region_info_t
#include <cy_smif_memslot.h>

This structure specifies data used for memory with hybrid sectors.

Public Members

uint32_t regionAddress

This specifies the address where a region starts.

uint32_t sectorsCount

This specifies the number of sectors in the region.

uint32_t eraseCmd

This specifies the region specific erase instruction.

uint32_t eraseSize

This specifies the size of one sector.

uint32_t eraseTime

Max time for sector erase type 1 cycle time in ms.

struct cy_stc_smif_mem_device_cfg_t
#include <cy_smif_memslot.h>

This configuration structure of the SMIF memory device is used to store device-specific parameters.

These parameters are used to set up the memory mode initialization and the memory API.

Public Members

uint32_t numOfAddrBytes

This specifies the number of address bytes used by the memory slave device, valid values 1-4.

uint32_t memSize

The memory size: For densities of 2 gigabits or less - the size in bytes; For densities 4 gigabits and above - bit-31 is set to 1b to define that this memory is 4 gigabits and above; and other 30:0 bits define N where the density is computed as 2^N bytes.

For example, 0x80000021 corresponds to 2^30 = 1 gigabyte.

cy_stc_smif_mem_cmd_t *readCmd

This specifies the Read command.

cy_stc_smif_mem_cmd_t *writeEnCmd

This specifies the Write Enable command.

cy_stc_smif_mem_cmd_t *writeDisCmd

This specifies the Write Disable command.

cy_stc_smif_mem_cmd_t *eraseCmd

This specifies the Erase command.

uint32_t eraseSize

This specifies the sector size of each Erase.

cy_stc_smif_mem_cmd_t *chipEraseCmd

This specifies the Chip Erase command.

cy_stc_smif_mem_cmd_t *programCmd

This specifies the Program command.

uint32_t programSize

This specifies the page size for programming.

cy_stc_smif_mem_cmd_t *readStsRegWipCmd

This specifies the command to read the WIP-containing status register.

cy_stc_smif_mem_cmd_t *readStsRegQeCmd

This specifies the command to read the QE-containing status register.

cy_stc_smif_mem_cmd_t *writeStsRegQeCmd

This specifies the command to write into the QE-containing status register.

cy_stc_smif_mem_cmd_t *readSfdpCmd

This specifies the read SFDP command.

uint32_t stsRegBusyMask

The Busy mask for the status registers.

uint32_t stsRegQuadEnableMask

The QE mask for the status registers.

uint32_t eraseTime

Max time for erase type 1 cycle time in ms.

uint32_t chipEraseTime

Max time for chip erase cycle time in ms.

uint32_t programTime

Max time for page program cycle time in us.

uint32_t hybridRegionCount

This specifies the number of regions for memory with hybrid sectors.

cy_stc_smif_hybrid_region_info_t **hybridRegionInfo

This specifies data for memory with hybrid sectors.

struct cy_stc_smif_mem_config_t
#include <cy_smif_memslot.h>

This SMIF memory configuration structure is used to store the memory configuration for the memory mode of operation.

This data structure is stored in a fixed location in the flash. The data structure is required for the initialization of the SMIF in the SystemInit.

Public Members

cy_en_smif_slave_select_t slaveSelect

Determines the slave select where the memory device is placed.

uint32_t flags

Determines if the device is memory-mapped, enables the Autodetect using the SFDP, enables the write capability, or enables the crypto support for this memory slave.

cy_en_smif_data_select_t dataSelect

The data-line selection options for a slave device.

uint32_t baseAddress

The base address the memory slave is mapped to in the PSoC memory map.

This address must be a multiple of the SMIF XIP memory size/capacity. The SMIF XIP memory region should NOT overlap with other memory regions (with exception to dual quad mode). Valid when the memory-mapped mode is enabled.

uint32_t memMappedSize

The size/capacity allocated in the PSoC memory map for the memory slave device.

The capacity is allocated from the base address. The capacity must be a power of 2 and greater or equal than 64 KB. Valid when memory-mapped mode is enabled

uint32_t dualQuadSlots

Defines if this memory device is one of the devices in the dual quad SPI configuration.

Equals the sum of the slave-slot numbers.

cy_stc_smif_mem_device_cfg_t *deviceCfg

The configuration of the device.

struct cy_stc_smif_block_config_t
#include <cy_smif_memslot.h>

This SMIF memory configuration structure is used to store the memory configuration for the memory mode of operation.

This data structure is stored in a fixed location in the flash. The data structure is required for the initialization of the SMIF in the SystemInit.

Public Members

uint32_t memCount

The number of SMIF memory defined.

cy_stc_smif_mem_config_t **memConfig

The pointer to the array of the memory configuration structures of size Memory_count.

uint32_t majorVersion

The version of the SMIF driver.

uint32_t minorVersion

The version of the SMIF Driver.