MCUSW
Loading...
Searching...
No Matches
Fls_NOR_Device.h
Go to the documentation of this file.
1/*
2*
3* Copyright (c) 2024 Texas Instruments Incorporated
4*
5* All rights reserved not granted herein.
6*
7* Limited License.
8*
9* Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10* license under copyrights and patents it now or hereafter owns or controls to make,
11* have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12* terms herein. With respect to the foregoing patent license, such license is granted
13* solely to the extent that any such patent is necessary to Utilize the software alone.
14* The patent license shall not apply to any combinations which include this software,
15* other than combinations with devices manufactured by or for TI ("TI Devices").
16* No hardware patent is licensed hereunder.
17*
18* Redistributions must preserve existing copyright notices and reproduce this license
19* (including the above copyright notice and the disclaimer and (if applicable) source
20* code license limitations below) in the documentation and/or other materials provided
21* with the distribution
22*
23* Redistribution and use in binary form, without modification, are permitted provided
24* that the following conditions are met:
25*
26* No reverse engineering, decompilation, or disassembly of this software is
27* permitted with respect to any software provided in binary form.
28*
29* any redistribution and use are licensed by TI for use only with TI Devices.
30*
31* Nothing shall obligate TI to provide you with source code for the software
32* licensed and provided to you in object code.
33*
34* If software source code is provided to you, modification and redistribution of the
35* source code are permitted provided that the following conditions are met:
36*
37* any redistribution and use of the source code, including any resulting derivative
38* works, are licensed by TI for use only with TI Devices.
39*
40* any redistribution and use of any object code compiled from the source code
41* and any resulting derivative works, are licensed by TI for use only with TI Devices.
42*
43* Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44*
45* may be used to endorse or promote products derived from this software without
46* specific prior written permission.
47*
48* DISCLAIMER.
49*
50* THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53* IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59* OF THE POSSIBILITY OF SUCH DAMAGE.
60*
61*/
62
71 /*****************************************************************************
72 Project: FLS_J721E
73 Date : 2024-09-30 07:37:25
74 This file is generated by EB Tresos
75 Do not modify this file, otherwise the software may behave in unexpected way.
76 ******************************************************************************/
77
78#ifndef FLS_NOR_DEVICE_H_
79#define FLS_NOR_DEVICE_H_
80
81/**************************************************************************
82 Macro Definitions
83 **************************************************************************/
87/* Selected Flash M35XU512_3BYTE_ADDRESSING */
88
89
90
91/* NOR Block Size in bytes. */
92#define NOR_BLOCK_SIZE (131072U)
93
94/* NOR Sector Size in bytes */
95#define NOR_UNIFORM_SECTOR_SIZE (4096U)
96
97/* NOR Hybrid Sector Size in bytes. Uniform Address space consists of all 256 KB Sectors */
98#define NOR_SECTOR_SIZE (4096U)
99
100/* Total NOR Size in bytes */
101#define NOR_SIZE (67108864U)
102
103/* Number of 4K sectors in the NOR flash */
104#define NOR_NUM_4K_SECTORS (16384U)
105
106
107/* Total number of sectors in the NOR flash */
108#define NOR_NUM_SECTORS (NOR_SIZE / NOR_UNIFORM_SECTOR_SIZE)
109
110
111/* Total number of blocks in the NOR flash */
112#define NOR_NUM_BLOCKS (NOR_SIZE / NOR_BLOCK_SIZE)
113
114/* Page size of the NOR flash in bytes */
115#define NOR_PAGE_SIZE (256U)
116
117/* Number of pages per sector */
118#define NOR_NUM_PAGES_PER_SECTOR (NOR_SECTOR_SIZE / NOR_PAGE_SIZE)
119
120/* Number of pages per block */
121#define NOR_NUM_PAGES_PER_BLOCK (NOR_BLOCK_SIZE / NOR_PAGE_SIZE)
122
123/* Value of erased data */
124#define NOR_ERASED_DATA (0xffU)
125
126/* Offset for the bottom of the 4K sector */
127#define NOR_4K_SECT_BOT_END_OFFSET (0x0U)
128
129/* Number of sectors in the BE (Block Erase) region */
130#define NOR_BE_SECTOR_NUM (-1U)
131
132/* Bulk Erase command for the NOR flash */
133#define NOR_CMD_BULK_ERASE (0x60U)
134
135/* Write Register command */
136#define NOR_CMD_WRREG (0x1U)
137
138/* Write Enable command */
139#define NOR_CMD_WREN (0x6U)
140
141/* Write Disable command */
142#define NOR_CMD_WRDIS (0x0U)
143
144/* Read Status Register command */
145#define NOR_CMD_RDSR (0x5U)
146
147/* Read Status Register 2 command */
148#define NOR_CMD_RDSR2 (0x0U)
149
150/* Register Read command */
151#define NOR_CMD_RDREG (0x0U)
152
153/* Read Configuration Register command */
154#define NOR_CMD_RDCR (0x0U)
155
156#define NOR_CMD_RDID (0x9fU)
157
158/* Software Reset Enable command */
159#define NOR_CMD_SRSTE (0x66U)
160
161/* Software Reset command */
162#define NOR_CMD_SFRST (0x99U)
163
164/* Block Erase command */
165#define NOR_CMD_BLOCK_ERASE (0xd8U)
166
167/* Sector Erase command */
168#define NOR_CMD_SECTOR_ERASE (0x20U)
169
170/* Standard Read command */
171#define NOR_CMD_READ (0x3U)
172
173/* Fast Read command */
174#define NOR_CMD_FAST_READ (0xbU)
175
176/* Octal Read command (calculated based on sector size) */
177#define NOR_CMD_OCTAL_READ (0x8bU)
178
179/* Octal DDR Read command (calculated based on NOR size and sector size) */
180#define NOR_CMD_OCTAL_DDR_READ (0x0U)
181
182/* Page Program command */
183#define NOR_CMD_PAGE_PROG (0x2U)
184
185/* Octal Program command */
186#define NOR_CMD_OCTAL_PROG (0x82U)
187
188/* Write VCR (Volatile Configuration Register) command */
189#define NOR_CMD_WRITE_VCR (0x81U)
190
191/* Read VCR (Volatile Configuration Register) command */
192#define NOR_CMD_READ_VCR (0x85U)
193
194/* Offset for the volatile register */
195#define NOR_VREG_OFFSET (0x0U)
196
197/* Offset for the non-volatile register */
198#define NOR_NVREG_OFFSET (0x0U)
199
200/* Non-Volatile Status Register 1 address */
201#define NOR_STS1_NVREG_ADDR (0x0U)
202
203/* Non-Volatile Status Register 2 address */
204#define NOR_STS2_NVREG_ADDR (0x0U)
205
206/* Non-Volatile Configuration Register 1 address */
207#define NOR_CFG1_NVREG_ADDR (0x0U)
208
209/* Non-Volatile Configuration Register 2 address */
210#define NOR_CFG2_NVREG_ADDR (0x0U)
211
212/* Non-Volatile Configuration Register 3 address */
213#define NOR_CFG3_NVREG_ADDR (0x0U)
214
215/* Non-Volatile Configuration Register 4 address */
216#define NOR_CFG4_NVREG_ADDR (0x0U)
217
218/* Non-Volatile Configuration Register 5 address */
219#define NOR_CFG5_NVREG_ADDR (0x0U)
220
221/* Volatile Status Register 1 address */
222#define NOR_STS1_VREG_ADDR (0x0U)
223
224/* Volatile Status Register 2 address */
225#define NOR_STS2_VREG_ADDR (0x0U)
226
227/* Volatile Configuration Register 1 address */
228#define NOR_CFG1_VREG_ADDR (0x0U)
229
230/* Volatile Configuration Register 2 address */
231#define NOR_CFG2_VREG_ADDR (0x0U)
232
233/* Volatile Configuration Register 3 address */
234#define NOR_CFG3_VREG_ADDR (0x0U)
235
236/* Volatile Configuration Register 4 address */
237#define NOR_CFG4_VREG_ADDR (0x0U)
238
239/* Volatile Configuration Register 5 address */
240#define NOR_CFG5_VREG_ADDR (0x0U)
241
243#define NOR_RDID_NUM_BYTES (0x3U)
244#define NOR_MANF_ID (0x2cU) /* Manufacturer ID */
245#define NOR_DEVICE_ID (0x5b1aU) /* Device ID */
246
248#define NOR_SR_WIP ((1U) << 0U)
249
251#define NOR_SR_WRPGEN ((1U) << 1U)
252
254#define NOR_CR_TBPARM ((1U) << 2U)
255
256#define NOR_CMD_RDCR_VOL (0x85U)
257#define NOR_CMD_RDCR_NVOL (0xb5U)
258#define NOR_CMD_OCTAL_O_FAST_RD (0x8bU)
259#define NOR_CMD_OCTAL_IO_FAST_RD (0xcbU)
260#define NOR_CMD_OCTAL_FAST_PROG (0x82U)
261#define NOR_CMD_EXT_OCTAL_FAST_PROG (0xc2U)
262#define NOR_CMD_QUAD_O_FAST_RD (0x6bU)
263#define NOR_CMD_QUAD_IO_FAST_RD (0xebU)
264#define NOR_CMD_QUAD_DDR_O_FAST_RD (0x6dU)
265#define NOR_CMD_QUAD_FAST_PROG (0x32U)
266#define NOR_CMD_EXT_QUAD_FAST_PROG (0x38U)
267#define NOR_CMD_OCTAL_DDR_O_FAST_RD (0x9DU)
268#define NOR_CMD_OCTAL_DDR_IO_FAST_RD (0xFDU)
269
270#define NOR_CMD_READ_ENVCR (0x65U)
271
272#define NOR_CMD_WRITE_NVCR (0xb1U)
273#define NOR_CMD_READ_NVCR (0xb5U)
274#define NOR_CMD_WRITE_ENVCR (0x61U)
275
277#define NOR_SINGLE_READ_DUMMY_CYCLE ((0U))
278#define NOR_SINGLE_CMD_READ_DUMMY_CYCLE (1U)
279#define NOR_OCTAL_SDR_CMD_READ_DUMMY_CYCLE (3U)
280#define NOR_OCTAL_DDR_CMD_READ_DUMMY_CYCLE (4U)
281#define NOR_OCTAL_READ_DUMMY_CYCLE (30U)
282#define NOR_OCTAL_READ_DUMMY_CYCLE_LC (0x0U)
283#define NOR_OCTAL_READ_DUMMY_CYCLE_INDAC (0U)
284#define NOR_OCTAL_READ_DUMMY_CYCLE_LC_INDAC (0x0U)
285#define NOR_QUAD_READ_DUMMY_CYCLE (10U)
286
288#define NOR_RDID_CMD_LENGTH_SINGLE (0U)
289#define NOR_RDID_CMD_LENGTH_OCTAL (0U)
290
292#define NOR_PAGE_PROG_TIMEOUT (400U)
293#define NOR_SECTOR_ERASE_TIMEOUT (600000U)
294#define NOR_WRR_WRITE_TIMEOUT (600000U)
295#define NOR_BULK_ERASE_TIMEOUT (110000000U)
296
297
298#endif /* DEVICE_H_ */
299
300/* Nothing past this point */