|
| 1 | +/******************************************************************************* |
| 2 | +* File Name: cycfg_qspi_memslot.c |
| 3 | +* |
| 4 | +* Description: |
| 5 | +* Provides definitions of the SMIF-driver memory configuration. |
| 6 | +* This file was automatically generated and should not be modified. |
| 7 | +* |
| 8 | +******************************************************************************** |
| 9 | +* Copyright 2017-2019 Cypress Semiconductor Corporation |
| 10 | +* SPDX-License-Identifier: Apache-2.0 |
| 11 | +* |
| 12 | +* Licensed under the Apache License, Version 2.0 (the "License"); |
| 13 | +* you may not use this file except in compliance with the License. |
| 14 | +* You may obtain a copy of the License at |
| 15 | +* |
| 16 | +* http://www.apache.org/licenses/LICENSE-2.0 |
| 17 | +* |
| 18 | +* Unless required by applicable law or agreed to in writing, software |
| 19 | +* distributed under the License is distributed on an "AS IS" BASIS, |
| 20 | +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 21 | +* See the License for the specific language governing permissions and |
| 22 | +* limitations under the License. |
| 23 | +********************************************************************************/ |
| 24 | + |
| 25 | +#include "cycfg_qspi_memslot.h" |
| 26 | + |
| 27 | +const cy_stc_smif_mem_cmd_t S25FL512S_SlaveSlot_0_readCmd = |
| 28 | +{ |
| 29 | + /* The 8-bit command. 1 x I/O read command. */ |
| 30 | + .command = 0xEBU, |
| 31 | + /* The width of the command transfer. */ |
| 32 | + .cmdWidth = CY_SMIF_WIDTH_SINGLE, |
| 33 | + /* The width of the address transfer. */ |
| 34 | + .addrWidth = CY_SMIF_WIDTH_QUAD, |
| 35 | + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ |
| 36 | + .mode = 0x01U, |
| 37 | + /* The width of the mode command transfer. */ |
| 38 | + .modeWidth = CY_SMIF_WIDTH_QUAD, |
| 39 | + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ |
| 40 | + .dummyCycles = 4U, |
| 41 | + /* The width of the data transfer. */ |
| 42 | + .dataWidth = CY_SMIF_WIDTH_QUAD |
| 43 | +}; |
| 44 | + |
| 45 | +const cy_stc_smif_mem_cmd_t S25FL512S_SlaveSlot_0_writeEnCmd = |
| 46 | +{ |
| 47 | + /* The 8-bit command. 1 x I/O read command. */ |
| 48 | + .command = 0x06U, |
| 49 | + /* The width of the command transfer. */ |
| 50 | + .cmdWidth = CY_SMIF_WIDTH_SINGLE, |
| 51 | + /* The width of the address transfer. */ |
| 52 | + .addrWidth = CY_SMIF_WIDTH_SINGLE, |
| 53 | + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ |
| 54 | + .mode = 0xFFFFFFFFU, |
| 55 | + /* The width of the mode command transfer. */ |
| 56 | + .modeWidth = CY_SMIF_WIDTH_SINGLE, |
| 57 | + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ |
| 58 | + .dummyCycles = 0U, |
| 59 | + /* The width of the data transfer. */ |
| 60 | + .dataWidth = CY_SMIF_WIDTH_SINGLE |
| 61 | +}; |
| 62 | + |
| 63 | +const cy_stc_smif_mem_cmd_t S25FL512S_SlaveSlot_0_writeDisCmd = |
| 64 | +{ |
| 65 | + /* The 8-bit command. 1 x I/O read command. */ |
| 66 | + .command = 0x04U, |
| 67 | + /* The width of the command transfer. */ |
| 68 | + .cmdWidth = CY_SMIF_WIDTH_SINGLE, |
| 69 | + /* The width of the address transfer. */ |
| 70 | + .addrWidth = CY_SMIF_WIDTH_SINGLE, |
| 71 | + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ |
| 72 | + .mode = 0xFFFFFFFFU, |
| 73 | + /* The width of the mode command transfer. */ |
| 74 | + .modeWidth = CY_SMIF_WIDTH_SINGLE, |
| 75 | + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ |
| 76 | + .dummyCycles = 0U, |
| 77 | + /* The width of the data transfer. */ |
| 78 | + .dataWidth = CY_SMIF_WIDTH_SINGLE |
| 79 | +}; |
| 80 | + |
| 81 | +const cy_stc_smif_mem_cmd_t S25FL512S_SlaveSlot_0_eraseCmd = |
| 82 | +{ |
| 83 | + /* The 8-bit command. 1 x I/O read command. */ |
| 84 | + .command = 0xD8U, |
| 85 | + /* The width of the command transfer. */ |
| 86 | + .cmdWidth = CY_SMIF_WIDTH_SINGLE, |
| 87 | + /* The width of the address transfer. */ |
| 88 | + .addrWidth = CY_SMIF_WIDTH_SINGLE, |
| 89 | + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ |
| 90 | + .mode = 0xFFFFFFFFU, |
| 91 | + /* The width of the mode command transfer. */ |
| 92 | + .modeWidth = CY_SMIF_WIDTH_SINGLE, |
| 93 | + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ |
| 94 | + .dummyCycles = 0U, |
| 95 | + /* The width of the data transfer. */ |
| 96 | + .dataWidth = CY_SMIF_WIDTH_SINGLE |
| 97 | +}; |
| 98 | + |
| 99 | +const cy_stc_smif_mem_cmd_t S25FL512S_SlaveSlot_0_chipEraseCmd = |
| 100 | +{ |
| 101 | + /* The 8-bit command. 1 x I/O read command. */ |
| 102 | + .command = 0x60U, |
| 103 | + /* The width of the command transfer. */ |
| 104 | + .cmdWidth = CY_SMIF_WIDTH_SINGLE, |
| 105 | + /* The width of the address transfer. */ |
| 106 | + .addrWidth = CY_SMIF_WIDTH_SINGLE, |
| 107 | + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ |
| 108 | + .mode = 0xFFFFFFFFU, |
| 109 | + /* The width of the mode command transfer. */ |
| 110 | + .modeWidth = CY_SMIF_WIDTH_SINGLE, |
| 111 | + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ |
| 112 | + .dummyCycles = 0U, |
| 113 | + /* The width of the data transfer. */ |
| 114 | + .dataWidth = CY_SMIF_WIDTH_SINGLE |
| 115 | +}; |
| 116 | + |
| 117 | +const cy_stc_smif_mem_cmd_t S25FL512S_SlaveSlot_0_programCmd = |
| 118 | +{ |
| 119 | + /* The 8-bit command. 1 x I/O read command. */ |
| 120 | + .command = 0x38U, |
| 121 | + /* The width of the command transfer. */ |
| 122 | + .cmdWidth = CY_SMIF_WIDTH_SINGLE, |
| 123 | + /* The width of the address transfer. */ |
| 124 | + .addrWidth = CY_SMIF_WIDTH_SINGLE, |
| 125 | + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ |
| 126 | + .mode = 0xFFFFFFFFU, |
| 127 | + /* The width of the mode command transfer. */ |
| 128 | + .modeWidth = CY_SMIF_WIDTH_QUAD, |
| 129 | + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ |
| 130 | + .dummyCycles = 0U, |
| 131 | + /* The width of the data transfer. */ |
| 132 | + .dataWidth = CY_SMIF_WIDTH_QUAD |
| 133 | +}; |
| 134 | + |
| 135 | +const cy_stc_smif_mem_cmd_t S25FL512S_SlaveSlot_0_readStsRegQeCmd = |
| 136 | +{ |
| 137 | + /* The 8-bit command. 1 x I/O read command. */ |
| 138 | + .command = 0x35U, |
| 139 | + /* The width of the command transfer. */ |
| 140 | + .cmdWidth = CY_SMIF_WIDTH_SINGLE, |
| 141 | + /* The width of the address transfer. */ |
| 142 | + .addrWidth = CY_SMIF_WIDTH_SINGLE, |
| 143 | + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ |
| 144 | + .mode = 0xFFFFFFFFU, |
| 145 | + /* The width of the mode command transfer. */ |
| 146 | + .modeWidth = CY_SMIF_WIDTH_SINGLE, |
| 147 | + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ |
| 148 | + .dummyCycles = 0U, |
| 149 | + /* The width of the data transfer. */ |
| 150 | + .dataWidth = CY_SMIF_WIDTH_SINGLE |
| 151 | +}; |
| 152 | + |
| 153 | +const cy_stc_smif_mem_cmd_t S25FL512S_SlaveSlot_0_readStsRegWipCmd = |
| 154 | +{ |
| 155 | + /* The 8-bit command. 1 x I/O read command. */ |
| 156 | + .command = 0x05U, |
| 157 | + /* The width of the command transfer. */ |
| 158 | + .cmdWidth = CY_SMIF_WIDTH_SINGLE, |
| 159 | + /* The width of the address transfer. */ |
| 160 | + .addrWidth = CY_SMIF_WIDTH_SINGLE, |
| 161 | + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ |
| 162 | + .mode = 0xFFFFFFFFU, |
| 163 | + /* The width of the mode command transfer. */ |
| 164 | + .modeWidth = CY_SMIF_WIDTH_SINGLE, |
| 165 | + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ |
| 166 | + .dummyCycles = 0U, |
| 167 | + /* The width of the data transfer. */ |
| 168 | + .dataWidth = CY_SMIF_WIDTH_SINGLE |
| 169 | +}; |
| 170 | + |
| 171 | +const cy_stc_smif_mem_cmd_t S25FL512S_SlaveSlot_0_writeStsRegQeCmd = |
| 172 | +{ |
| 173 | + /* The 8-bit command. 1 x I/O read command. */ |
| 174 | + .command = 0x01U, |
| 175 | + /* The width of the command transfer. */ |
| 176 | + .cmdWidth = CY_SMIF_WIDTH_SINGLE, |
| 177 | + /* The width of the address transfer. */ |
| 178 | + .addrWidth = CY_SMIF_WIDTH_SINGLE, |
| 179 | + /* The 8-bit mode byte. This value is 0xFFFFFFFF when there is no mode present. */ |
| 180 | + .mode = 0xFFFFFFFFU, |
| 181 | + /* The width of the mode command transfer. */ |
| 182 | + .modeWidth = CY_SMIF_WIDTH_SINGLE, |
| 183 | + /* The number of dummy cycles. A zero value suggests no dummy cycles. */ |
| 184 | + .dummyCycles = 0U, |
| 185 | + /* The width of the data transfer. */ |
| 186 | + .dataWidth = CY_SMIF_WIDTH_SINGLE |
| 187 | +}; |
| 188 | + |
| 189 | +const cy_stc_smif_mem_device_cfg_t deviceCfg_S25FL512S_SlaveSlot_0 = |
| 190 | +{ |
| 191 | + /* Specifies the number of address bytes used by the memory slave device. */ |
| 192 | + .numOfAddrBytes = 0x03U, |
| 193 | + /* The size of the memory. */ |
| 194 | + .memSize = 0x04000000U, |
| 195 | + /* Specifies the Read command. */ |
| 196 | + .readCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_SlaveSlot_0_readCmd, |
| 197 | + /* Specifies the Write Enable command. */ |
| 198 | + .writeEnCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_SlaveSlot_0_writeEnCmd, |
| 199 | + /* Specifies the Write Disable command. */ |
| 200 | + .writeDisCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_SlaveSlot_0_writeDisCmd, |
| 201 | + /* Specifies the Erase command. */ |
| 202 | + .eraseCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_SlaveSlot_0_eraseCmd, |
| 203 | + /* Specifies the sector size of each erase. */ |
| 204 | + .eraseSize = 0x00040000U, |
| 205 | + /* Specifies the Chip Erase command. */ |
| 206 | + .chipEraseCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_SlaveSlot_0_chipEraseCmd, |
| 207 | + /* Specifies the Program command. */ |
| 208 | + .programCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_SlaveSlot_0_programCmd, |
| 209 | + /* Specifies the page size for programming. */ |
| 210 | + .programSize = 0x00000200U, |
| 211 | + /* Specifies the command to read the QE-containing status register. */ |
| 212 | + .readStsRegQeCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_SlaveSlot_0_readStsRegQeCmd, |
| 213 | + /* Specifies the command to read the WIP-containing status register. */ |
| 214 | + .readStsRegWipCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_SlaveSlot_0_readStsRegWipCmd, |
| 215 | + /* Specifies the command to write into the QE-containing status register. */ |
| 216 | + .writeStsRegQeCmd = (cy_stc_smif_mem_cmd_t*)&S25FL512S_SlaveSlot_0_writeStsRegQeCmd, |
| 217 | + /* The mask for the status register. */ |
| 218 | + .stsRegBusyMask = 0x01U, |
| 219 | + /* The mask for the status register. */ |
| 220 | + .stsRegQuadEnableMask = 0x02U, |
| 221 | + /* The max time for the erase type-1 cycle-time in ms. */ |
| 222 | + .eraseTime = 520U, |
| 223 | + /* The max time for the chip-erase cycle-time in ms. */ |
| 224 | + .chipEraseTime = 134000U, |
| 225 | + /* The max time for the page-program cycle-time in us. */ |
| 226 | + .programTime = 340U |
| 227 | +}; |
| 228 | + |
| 229 | +const cy_stc_smif_mem_config_t S25FL512S_SlaveSlot_0 = |
| 230 | +{ |
| 231 | + /* Determines the slot number where the memory device is placed. */ |
| 232 | + .slaveSelect = CY_SMIF_SLAVE_SELECT_0, |
| 233 | + /* Flags. */ |
| 234 | + .flags = CY_SMIF_FLAG_MEMORY_MAPPED | CY_SMIF_FLAG_WR_EN, |
| 235 | + /* The data-line selection options for a slave device. */ |
| 236 | + .dataSelect = CY_SMIF_DATA_SEL0, |
| 237 | + /* The base address the memory slave is mapped to in the PSoC memory map. |
| 238 | + Valid when the memory-mapped mode is enabled. */ |
| 239 | + .baseAddress = 0x18000000U, |
| 240 | + /* The size allocated in the PSoC memory map, for the memory slave device. |
| 241 | + The size is allocated from the base address. Valid when the memory mapped mode is enabled. */ |
| 242 | + .memMappedSize = 0x10000U, |
| 243 | + /* If this memory device is one of the devices in the dual quad SPI configuration. |
| 244 | + Valid when the memory mapped mode is enabled. */ |
| 245 | + .dualQuadSlots = 0, |
| 246 | + /* The configuration of the device. */ |
| 247 | + .deviceCfg = (cy_stc_smif_mem_device_cfg_t*)&deviceCfg_S25FL512S_SlaveSlot_0 |
| 248 | +}; |
| 249 | + |
| 250 | +const cy_stc_smif_mem_config_t* const smifMemConfigs[] = { |
| 251 | + &S25FL512S_SlaveSlot_0 |
| 252 | +}; |
| 253 | + |
| 254 | +const cy_stc_smif_block_config_t smifBlockConfig = |
| 255 | +{ |
| 256 | + /* The number of SMIF memories defined. */ |
| 257 | + .memCount = CY_SMIF_DEVICE_NUM, |
| 258 | + /* The pointer to the array of memory config structures of size memCount. */ |
| 259 | + .memConfig = (cy_stc_smif_mem_config_t**)smifMemConfigs, |
| 260 | + /* The version of the SMIF driver. */ |
| 261 | + .majorVersion = CY_SMIF_DRV_VERSION_MAJOR, |
| 262 | + /* The version of the SMIF driver. */ |
| 263 | + .minorVersion = CY_SMIF_DRV_VERSION_MINOR |
| 264 | +}; |
0 commit comments