Contains the BSP driver for the B-L475E-IOT01 board.
Dependents: mbed-os-example-ble-Thermometer DISCO_L475VG_IOT01-Telegram-BOT DISCO_L475VG_IOT01-sche_cheveux DISCO_L475VG_IOT01-QSPI_FLASH_FILE_SYSTEM ... more
mx25r6435f.h
00001 /** 00002 ****************************************************************************** 00003 * @file mx25r6435f.h 00004 * @author MCD Application Team 00005 * @brief This file contains all the description of the MX25R6435F QSPI memory. 00006 ****************************************************************************** 00007 * @attention 00008 * 00009 * <h2><center>© Copyright (c) 2017 STMicroelectronics. 00010 * All rights reserved.</center></h2> 00011 * 00012 * This software component is licensed by ST under BSD 3-Clause license, 00013 * the "License"; You may not use this file except in compliance with the 00014 * License. You may obtain a copy of the License at: 00015 * opensource.org/licenses/BSD-3-Clause 00016 * 00017 ****************************************************************************** 00018 */ 00019 00020 /* Define to prevent recursive inclusion -------------------------------------*/ 00021 #ifndef __MX25R6435F_H 00022 #define __MX25R6435F_H 00023 00024 #ifdef __cplusplus 00025 extern "C" { 00026 #endif 00027 00028 /* Includes ------------------------------------------------------------------*/ 00029 00030 /** @addtogroup BSP 00031 * @{ 00032 */ 00033 00034 /** @addtogroup Components 00035 * @{ 00036 */ 00037 00038 /** @addtogroup mx25r6435f 00039 * @{ 00040 */ 00041 00042 /** @defgroup MX25R6435F_Exported_Types 00043 * @{ 00044 */ 00045 00046 /** 00047 * @} 00048 */ 00049 00050 /** @defgroup MX25R6435F_Exported_Constants 00051 * @{ 00052 */ 00053 00054 /** 00055 * @brief MX25R6435F Configuration 00056 */ 00057 #define MX25R6435F_FLASH_SIZE 0x800000 /* 64 MBits => 8MBytes */ 00058 #define MX25R6435F_BLOCK_SIZE 0x10000 /* 128 blocks of 64KBytes */ 00059 #define MX25R6435F_SUBBLOCK_SIZE 0x8000 /* 256 blocks of 32KBytes */ 00060 #define MX25R6435F_SECTOR_SIZE 0x1000 /* 2048 sectors of 4kBytes */ 00061 #define MX25R6435F_PAGE_SIZE 0x100 /* 32768 pages of 256 bytes */ 00062 00063 #define MX25R6435F_DUMMY_CYCLES_READ 8 00064 #define MX25R6435F_DUMMY_CYCLES_READ_DUAL 4 00065 #define MX25R6435F_DUMMY_CYCLES_READ_QUAD 4 00066 #define MX25R6435F_DUMMY_CYCLES_2READ 2 00067 #define MX25R6435F_DUMMY_CYCLES_4READ 4 00068 00069 #define MX25R6435F_ALT_BYTES_PE_MODE 0xA5 00070 #define MX25R6435F_ALT_BYTES_NO_PE_MODE 0xAA 00071 00072 #define MX25R6435F_CHIP_ERASE_MAX_TIME 240000 00073 #define MX25R6435F_BLOCK_ERASE_MAX_TIME 3500 00074 #define MX25R6435F_SUBBLOCK_ERASE_MAX_TIME 3000 00075 #define MX25R6435F_SECTOR_ERASE_MAX_TIME 240 00076 00077 /** 00078 * @brief MX25R6435F Commands 00079 */ 00080 /* Read Operations */ 00081 #define READ_CMD 0x03 00082 #define FAST_READ_CMD 0x0B 00083 #define DUAL_OUT_READ_CMD 0x3B 00084 #define DUAL_INOUT_READ_CMD 0xBB 00085 #define QUAD_OUT_READ_CMD 0x6B 00086 #define QUAD_INOUT_READ_CMD 0xEB 00087 00088 /* Program Operations */ 00089 #define PAGE_PROG_CMD 0x02 00090 #define QUAD_PAGE_PROG_CMD 0x38 00091 00092 /* Erase Operations */ 00093 #define SECTOR_ERASE_CMD 0x20 00094 #define SUBBLOCK_ERASE_CMD 0x52 00095 #define BLOCK_ERASE_CMD 0xD8 00096 #define CHIP_ERASE_CMD 0x60 00097 #define CHIP_ERASE_CMD_2 0xC7 00098 00099 #define PROG_ERASE_RESUME_CMD 0x7A 00100 #define PROG_ERASE_RESUME_CMD_2 0x30 00101 #define PROG_ERASE_SUSPEND_CMD 0x75 00102 #define PROG_ERASE_SUSPEND_CMD_2 0xB0 00103 00104 /* Identification Operations */ 00105 #define READ_ID_CMD 0x9F 00106 #define READ_ELECTRONIC_ID_CMD 0xAB 00107 #define READ_ELEC_MANUFACTURER_DEVICE_ID_CMD 0x90 00108 #define READ_SERIAL_FLASH_DISCO_PARAM_CMD 0x5A 00109 00110 /* Write Operations */ 00111 #define WRITE_ENABLE_CMD 0x06 00112 #define WRITE_DISABLE_CMD 0x04 00113 00114 /* Register Operations */ 00115 #define READ_STATUS_REG_CMD 0x05 00116 #define READ_CFG_REG_CMD 0x15 00117 #define WRITE_STATUS_CFG_REG_CMD 0x01 00118 00119 #define READ_SEC_REG_CMD 0x2B 00120 #define WRITE_SEC_REG_CMD 0x2F 00121 00122 /* Power Down Operations */ 00123 #define DEEP_POWER_DOWN_CMD 0xB9 00124 00125 /* Burst Operations */ 00126 #define SET_BURST_LENGTH_CMD 0xC0 00127 00128 /* One-Time Programmable Operations */ 00129 #define ENTER_SECURED_OTP_CMD 0xB1 00130 #define EXIT_SECURED_OTP_CMD 0xC1 00131 00132 /* No Operation */ 00133 #define NO_OPERATION_CMD 0x00 00134 00135 /* Reset Operations */ 00136 #define RESET_ENABLE_CMD 0x66 00137 #define RESET_MEMORY_CMD 0x99 00138 #define RELEASE_READ_ENHANCED_CMD 0xFF 00139 00140 /** 00141 * @brief MX25R6435F Registers 00142 */ 00143 /* Status Register */ 00144 #define MX25R6435F_SR_WIP ((uint8_t)0x01) /*!< Write in progress */ 00145 #define MX25R6435F_SR_WEL ((uint8_t)0x02) /*!< Write enable latch */ 00146 #define MX25R6435F_SR_BP ((uint8_t)0x3C) /*!< Block protect */ 00147 #define MX25R6435F_SR_QE ((uint8_t)0x40) /*!< Quad enable */ 00148 #define MX25R6435F_SR_SRWD ((uint8_t)0x80) /*!< Status register write disable */ 00149 00150 /* Configuration Register 1 */ 00151 #define MX25R6435F_CR1_TB ((uint8_t)0x08) /*!< Top / bottom */ 00152 00153 /* Configuration Register 2 */ 00154 #define MX25R6435F_CR2_LH_SWITCH ((uint8_t)0x02) /*!< Low power / high performance switch */ 00155 00156 /* Security Register */ 00157 #define MX25R6435F_SECR_SOI ((uint8_t)0x01) /*!< Secured OTP indicator */ 00158 #define MX25R6435F_SECR_LDSO ((uint8_t)0x02) /*!< Lock-down secured OTP */ 00159 #define MX25R6435F_SECR_PSB ((uint8_t)0x04) /*!< Program suspend bit */ 00160 #define MX25R6435F_SECR_ESB ((uint8_t)0x08) /*!< Erase suspend bit */ 00161 #define MX25R6435F_SECR_P_FAIL ((uint8_t)0x20) /*!< Program fail flag */ 00162 #define MX25R6435F_SECR_E_FAIL ((uint8_t)0x40) /*!< Erase fail flag */ 00163 00164 /** 00165 * @} 00166 */ 00167 00168 /** @defgroup MX25R6435F_Exported_Functions 00169 * @{ 00170 */ 00171 /** 00172 * @} 00173 */ 00174 00175 /** 00176 * @} 00177 */ 00178 00179 /** 00180 * @} 00181 */ 00182 00183 /** 00184 * @} 00185 */ 00186 00187 #ifdef __cplusplus 00188 } 00189 #endif 00190 00191 #endif /* __MX25R6435F_H */ 00192 00193 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Tue Jul 12 2022 13:55:42 by 1.7.2