PSOC E8XXGP Device Support Library

| PSOC E8XXGP Device Support Library

API Reference | Data Structures | Typedefs
Data Structures
PDL API Reference » SMIF (Serial Memory Interface)

## General Description

## API Reference
| SMIF Memory Description Structures
| General hierarchy of memory structures are:

## Data Structures
struct | cy_stc_smif_config_t
| The SMIF configuration structure. More...
struct | cy_stc_smif_context_t
| The SMIF internal context data. More...
struct | cy_stc_smif_crypto_region_config_t
| Specifies SMIF Crypto Region configuration. More...
struct | cy_stc_smif_cache_region_t
| Specifies SMIF cache region configuration. More...
struct | cy_stc_smif_cache_config_t
| Specifies SMIF cache configuration. More...

## Typedefs
typedef void(* | cy_smif_event_cb_t) (uint32_t event)
| The SMIF user callback function type called at the end of a transfer. More...

## Data Structure Documentation

## ◆ cy_stc_smif_config_t

struct cy_stc_smif_config_t

Data Fields
uint32_t | mode | Specifies the mode of operation cy_en_smif_mode_t.
uint32_t | deselectDelay | Specifies the minimum duration of SPI de-selection between SPI transfers: "0": 1 clock cycle. "1": 2 clock cycles. "2": 3 clock cycles. "3": 4 clock cycles. "4": 5 clock cycles. "5": 6 clock cycles. "6": 7 clock cycles. "7": 8 clock cycles.
uint32_t | rxClockSel | Specifies the clock source for the receiver clock cy_en_smif_clk_select_t.
uint32_t | blockEvent | Specifies what happens when there is a Read from an empty RX FIFO or a Write to a full TX FIFO. cy_en_smif_error_event_t.
cy_en_smif_delay_tap_t | delayTapEnable | Delay tap can be enabled or disabled cy_en_smif_delay_tap_t.
cy_en_smif_delay_line_t | delayLineSelect | set line selection which is input. cy_en_smif_delay_line_t
uint32_t | inputFrequencyMHz | Input frequency. Used when internal DLL is enabled for setting the speed mode
bool | enable_internal_dll | Enables internal DLL. Default value by passes DLL
cy_en_smif_dll_divider_t | dll_divider_value | Divider value for DLL.
cy_en_cy_smif_mdl_tap_sel_t | mdl_tap | Delay tap for DLL MDL.
cy_en_cy_smif_sdl_tap_sel_t | device0_sdl_tap | Delay tap (pos and neg) for DLL SDL timings on Device[0]. Only relevant in XIP mode.
cy_en_cy_smif_sdl_tap_sel_t | device1_sdl_tap | Delay tap (pos and neg) for DLL SDL timings on Device[1]. Only relevant in XIP mode.
cy_en_cy_smif_sdl_tap_sel_t | device2_sdl_tap | Delay tap (pos and neg) for DLL SDL timings on Device[2]. Only relevant in XIP mode.
cy_en_cy_smif_sdl_tap_sel_t | device3_sdl_tap | Delay tap (pos and neg) for DLL SDL timings on Device[3]. Only relevant in XIP mode.
cy_en_smif_capture_mode_t | rx_capture_mode | RX Capture mode.
cy_en_smif_tx_sdr_extra_t | tx_sdr_extra | TX SDR Extra.

## ◆ cy_stc_smif_context_t

struct cy_stc_smif_context_t

Data Fields
uint8_t const volatile *volatile | txBufferAddress | The pointer to the data to transfer.
uint32_t | txBufferSize | The size of the data to transmit in bytes.
uint32_t volatile | txBufferCounter | The transfer counter. The number of the transmitted bytes = txBufferSize - txBufferCounter
uint8_t volatile *volatile | rxBufferAddress | The pointer to the variable where the received data is stored.
uint32_t | rxBufferSize | The size of the data to be received in bytes.
uint32_t volatile | rxBufferCounter | The transfer counter. The number of the received bytes = rxBufferSize - rxBufferCounter
cy_en_smif_txfr_status_t volatile | transferStatus | The status of the transfer. The transmitting / receiving is completed / in progress
cy_smif_event_cb_t volatile | txCompleteCb | The user-defined callback executed at the completion of a transmission.
cy_smif_event_cb_t volatile | rxCompleteCb | The user-defined callback executed at the completion of a reception.
uint32_t | timeout | The timeout in microseconds for the blocking functions. This timeout value applies to all blocking APIs.
uint16_t | memReadyPollDelay | The timeout in microseconds for polling memory device on its readiness.
cy_en_smif_data_rate_t | preCmdDataRate | preferred command data rate
cy_en_smif_txfr_width_t | preCmdWidth | preferred command data rate
cy_en_smif_data_rate_t | preXIPDataRate | preferred XIP data rate
uint32_t | dummyCycles | preferred dummy cycles per transaction
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_stc_smif_crypto_region_config_t

struct cy_stc_smif_crypto_region_config_t

Data Fields
uint32_t | key[4] | Specifies the AES key application for the region.
uint32_t | iv[4] | Specifies the Crypto IV for the region.
uint32_t * | region_base_address | Specifies the base address for the region.
uint32_t | region_size | Specifies the size of the memory region.

## ◆ cy_stc_smif_cache_region_t

struct cy_stc_smif_cache_region_t

Data Fields
bool | enabled | Enable/Disable CACHE Region.
uint32_t | start_address | Start address of CACHE region.
uint32_t | end_address | End address of CACHE region.
cy_en_smif_cache_attribute_t | cache_attributes | CACHE Transaction attributes set for this region.

## ◆ cy_stc_smif_cache_config_t

struct cy_stc_smif_cache_config_t

Data Fields
bool | enabled | Enable/Disable SMIF Internal CACHE.
bool | cache_retention_on | If set, retains CACHE in DeepSleep mode. Not applicable in Deep Sleep OFF or Deep Sleep RAM mode.
cy_stc_smif_cache_region_t | cache_region_0 | CACHE region 0 configuration.
cy_stc_smif_cache_region_t | cache_region_1 | CACHE region 1 configuration.
cy_stc_smif_cache_region_t | cache_region_2 | CACHE region 2 configuration.
cy_stc_smif_cache_region_t | cache_region_3 | CACHE region 3 configuration.

## Typedef Documentation

## ◆ cy_smif_event_cb_t

typedef void(* cy_smif_event_cb_t) (uint32_t event)

The SMIF user callback function type called at the end of a transfer.

Parameters

  event | The event which caused a callback call.