Secure Aware SMIF
Some SMIF APIs are marked as Secure Aware. This means that if the SMIF is marked as a secure resource in the Peripheral Protection Controller (PPC) and these APIs are called from a non-secure CPU state, the PDL will submit a request to the Secure Request Framework (SRF) middleware to transition to a secure CPU state to perform the operation. From the application's perspective, the API will behave the same whether it is called from a secure or non-secure CPU state albeit slower.
This functionality is automatically enabled on devices with ARM TrustZone processors. To disable, set the DEFINE+=CY_PDL_ENABLE_SECURE_AWARE_SMIF=0 in the application Makefile.
For more information on Secure Aware PDL behavior, see Secure Aware PDL.
|
|
#define | CY_SMIF_MAX_HYBRID_REGION (5U) |
| |
|
#define | CY_SMIF_SUB_BLOCK_0 (0UL) |
| |
|
#define | CY_SMIF_SUB_BLOCK_1 (1UL) |
| |
|
#define | CY_SMIF_FLAG_SPI_DEVICE (1UL) |
| |
|
#define | CY_SMIF_FLAG_HYPERBUS_DEVICE (2UL) |
| |
|
|
SMIF_Type * | cy_stc_smif_mem_context_t::base |
| | This stores the pointer to the base address of the SMIF instance.
|
| |
|
cy_stc_smif_block_config_t const * | cy_stc_smif_mem_context_t::block_config |
| | This stores the pointer to the block config where applicable.
|
| |
|
cy_stc_smif_context_t | cy_stc_smif_mem_context_t::smif_context |
| | This stores the info on the smif driver context.
|
| |
|
bool | cy_stc_smif_mem_context_t::requires_secure_call |
| | This specifies whether secure calls are needed.
|
| |
|
uint32_t | cy_stc_smif_hyb_sectors_info_t::regionStartAddress |
| | This specifies the address where a region starts.
|
| |
|
uint32_t | cy_stc_smif_hyb_sectors_info_t::regionEndAddress |
| | This specifies the address where a region ends
|
| |
|
uint32_t | cy_stc_smif_hyb_sectors_info_t::eraseSize |
| | This specifies the erase size of one sector.
|
| |
|
uint32_t | cy_stc_smif_mem_info_t::flags |
| |
| uint32_t | cy_stc_smif_mem_info_t::memSize |
| | Determines if the device is SPI/HyperBus. More...
|
| |
|
uint32_t | cy_stc_smif_mem_info_t::eraseSize |
| | This specifies the sector size of each Erase.
|
| |
|
uint32_t | cy_stc_smif_mem_info_t::programSize |
| | This specifies the page size for programming.
|
| |
|
uint32_t | cy_stc_smif_mem_info_t::hybridRegionCount |
| | This specifies the number of regions for memory with hybrid sectors.
|
| |
|
cy_stc_smif_hyb_sectors_info_t | cy_stc_smif_mem_info_t::hybridRegionInfo [CY_SMIF_MAX_HYBRID_REGION] |
| | This stores the information for the hybrid regions.
|
| |
◆ cy_stc_smif_mem_context_t
| struct cy_stc_smif_mem_context_t |
| Data Fields |
|
SMIF_Type * |
base |
This stores the pointer to the base address of the SMIF instance. |
|
cy_stc_smif_block_config_t const * |
block_config |
This stores the pointer to the block config where applicable. |
|
cy_stc_smif_context_t |
smif_context |
This stores the info on the smif driver context. |
|
bool |
requires_secure_call |
This specifies whether secure calls are needed. |
◆ cy_stc_smif_hyb_sectors_info_t
| struct cy_stc_smif_hyb_sectors_info_t |
| Data Fields |
|
uint32_t |
regionStartAddress |
This specifies the address where a region starts. |
|
uint32_t |
regionEndAddress |
This specifies the address where a region ends
|
|
uint32_t |
eraseSize |
This specifies the erase size of one sector. |
◆ cy_stc_smif_mem_info_t
| struct cy_stc_smif_mem_info_t |
| Data Fields |
|
uint32_t |
flags |
|
|
uint32_t |
memSize |
Determines if the device is SPI/HyperBus. 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.
|
|
uint32_t |
eraseSize |
This specifies the sector size of each Erase. |
|
uint32_t |
programSize |
This specifies the page size for programming. |
|
uint32_t |
hybridRegionCount |
This specifies the number of regions for memory with hybrid sectors. |
|
cy_stc_smif_hyb_sectors_info_t |
hybridRegionInfo[CY_SMIF_MAX_HYBRID_REGION] |
This stores the information for the hybrid regions. |
◆ base
| SMIF_Type* cy_stc_smif_mem_context_t::base |
This stores the pointer to the base address of the SMIF instance.
◆ block_config
This stores the pointer to the block config where applicable.
◆ smif_context
This stores the info on the smif driver context.
◆ requires_secure_call
| bool cy_stc_smif_mem_context_t::requires_secure_call |
This specifies whether secure calls are needed.
◆ regionStartAddress
| uint32_t cy_stc_smif_hyb_sectors_info_t::regionStartAddress |
This specifies the address where a region starts.
◆ regionEndAddress
| uint32_t cy_stc_smif_hyb_sectors_info_t::regionEndAddress |
This specifies the address where a region ends
◆ eraseSize [1/2]
| uint32_t cy_stc_smif_hyb_sectors_info_t::eraseSize |
This specifies the erase size of one sector.
◆ flags
| uint32_t cy_stc_smif_mem_info_t::flags |
◆ memSize
| uint32_t cy_stc_smif_mem_info_t::memSize |
Determines if the device is SPI/HyperBus.
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.
◆ eraseSize [2/2]
| uint32_t cy_stc_smif_mem_info_t::eraseSize |
This specifies the sector size of each Erase.
◆ programSize
| uint32_t cy_stc_smif_mem_info_t::programSize |
This specifies the page size for programming.
◆ hybridRegionCount
| uint32_t cy_stc_smif_mem_info_t::hybridRegionCount |
This specifies the number of regions for memory with hybrid sectors.
◆ hybridRegionInfo
This stores the information for the hybrid regions.