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

https://os.mbed.com/platforms/ST-Discovery-L475E-IOT01A/

Committer:
bcostm
Date:
Fri Jan 19 14:27:51 2018 +0100
Revision:
6:9dfa42666f03
Parent:
5:0c70bc6d2dc0
Child:
7:bfe8272ced90
Update BSP files with STM32Cube L4 V1.11.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 3:c6b5944187d5 1 /**
bcostm 3:c6b5944187d5 2 ******************************************************************************
bcostm 3:c6b5944187d5 3 * @file stm32l475e_iot01_qspi.h
bcostm 3:c6b5944187d5 4 * @author MCD Application Team
bcostm 3:c6b5944187d5 5 * @brief This file contains the common defines and functions prototypes for
bcostm 3:c6b5944187d5 6 * the stm32l475e_iot01_qspi.c driver.
bcostm 3:c6b5944187d5 7 ******************************************************************************
bcostm 3:c6b5944187d5 8 * @attention
bcostm 3:c6b5944187d5 9 *
bcostm 3:c6b5944187d5 10 * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
bcostm 3:c6b5944187d5 11 *
bcostm 3:c6b5944187d5 12 * Redistribution and use in source and binary forms, with or without modification,
bcostm 3:c6b5944187d5 13 * are permitted provided that the following conditions are met:
bcostm 3:c6b5944187d5 14 * 1. Redistributions of source code must retain the above copyright notice,
bcostm 3:c6b5944187d5 15 * this list of conditions and the following disclaimer.
bcostm 3:c6b5944187d5 16 * 2. Redistributions in binary form must reproduce the above copyright notice,
bcostm 3:c6b5944187d5 17 * this list of conditions and the following disclaimer in the documentation
bcostm 3:c6b5944187d5 18 * and/or other materials provided with the distribution.
bcostm 3:c6b5944187d5 19 * 3. Neither the name of STMicroelectronics nor the names of its contributors
bcostm 3:c6b5944187d5 20 * may be used to endorse or promote products derived from this software
bcostm 3:c6b5944187d5 21 * without specific prior written permission.
bcostm 3:c6b5944187d5 22 *
bcostm 3:c6b5944187d5 23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
bcostm 3:c6b5944187d5 24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
bcostm 3:c6b5944187d5 25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
bcostm 3:c6b5944187d5 26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
bcostm 3:c6b5944187d5 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
bcostm 3:c6b5944187d5 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
bcostm 3:c6b5944187d5 29 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
bcostm 3:c6b5944187d5 30 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
bcostm 3:c6b5944187d5 31 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
bcostm 3:c6b5944187d5 32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
bcostm 3:c6b5944187d5 33 *
bcostm 3:c6b5944187d5 34 ******************************************************************************
bcostm 3:c6b5944187d5 35 */
bcostm 3:c6b5944187d5 36
bcostm 3:c6b5944187d5 37 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 3:c6b5944187d5 38 #ifndef __STM32L475E_IOT01_QSPI_H
bcostm 3:c6b5944187d5 39 #define __STM32L475E_IOT01_QSPI_H
bcostm 3:c6b5944187d5 40
bcostm 3:c6b5944187d5 41 #ifdef __cplusplus
bcostm 3:c6b5944187d5 42 extern "C" {
bcostm 3:c6b5944187d5 43 #endif
bcostm 3:c6b5944187d5 44
bcostm 3:c6b5944187d5 45 /* Includes ------------------------------------------------------------------*/
bcostm 3:c6b5944187d5 46 #include "stm32l4xx_hal.h"
bcostm 3:c6b5944187d5 47 #include "../Components/mx25r6435f/mx25r6435f.h"
bcostm 3:c6b5944187d5 48
bcostm 3:c6b5944187d5 49 /** @addtogroup BSP
bcostm 3:c6b5944187d5 50 * @{
bcostm 3:c6b5944187d5 51 */
bcostm 3:c6b5944187d5 52
bcostm 3:c6b5944187d5 53 /** @addtogroup STM32L475E_IOT01
bcostm 3:c6b5944187d5 54 * @{
bcostm 3:c6b5944187d5 55 */
bcostm 3:c6b5944187d5 56
bcostm 3:c6b5944187d5 57 /** @addtogroup STM32L475E_IOT01_QSPI
bcostm 3:c6b5944187d5 58 * @{
bcostm 3:c6b5944187d5 59 */
bcostm 3:c6b5944187d5 60
bcostm 3:c6b5944187d5 61 /* Exported constants --------------------------------------------------------*/
bcostm 3:c6b5944187d5 62 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Constants QSPI Exported Constants
bcostm 3:c6b5944187d5 63 * @{
bcostm 3:c6b5944187d5 64 */
bcostm 3:c6b5944187d5 65 /* QSPI Error codes */
bcostm 3:c6b5944187d5 66 #define QSPI_OK ((uint8_t)0x00)
bcostm 3:c6b5944187d5 67 #define QSPI_ERROR ((uint8_t)0x01)
bcostm 3:c6b5944187d5 68 #define QSPI_BUSY ((uint8_t)0x02)
bcostm 3:c6b5944187d5 69 #define QSPI_NOT_SUPPORTED ((uint8_t)0x04)
bcostm 3:c6b5944187d5 70 #define QSPI_SUSPENDED ((uint8_t)0x08)
bcostm 3:c6b5944187d5 71
bcostm 3:c6b5944187d5 72 /**
bcostm 3:c6b5944187d5 73 * @}
bcostm 3:c6b5944187d5 74 */
bcostm 3:c6b5944187d5 75
bcostm 3:c6b5944187d5 76 /* Exported types ------------------------------------------------------------*/
bcostm 3:c6b5944187d5 77 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Types QSPI Exported Types
bcostm 3:c6b5944187d5 78 * @{
bcostm 3:c6b5944187d5 79 */
bcostm 3:c6b5944187d5 80 /* QSPI Info */
bcostm 3:c6b5944187d5 81 typedef struct {
bcostm 3:c6b5944187d5 82 uint32_t FlashSize; /*!< Size of the flash */
bcostm 3:c6b5944187d5 83 uint32_t EraseSectorSize; /*!< Size of sectors for the erase operation */
bcostm 3:c6b5944187d5 84 uint32_t EraseSectorsNumber; /*!< Number of sectors for the erase operation */
bcostm 3:c6b5944187d5 85 uint32_t ProgPageSize; /*!< Size of pages for the program operation */
bcostm 3:c6b5944187d5 86 uint32_t ProgPagesNumber; /*!< Number of pages for the program operation */
bcostm 3:c6b5944187d5 87 } QSPI_Info;
bcostm 3:c6b5944187d5 88
bcostm 3:c6b5944187d5 89 /**
bcostm 3:c6b5944187d5 90 * @}
bcostm 3:c6b5944187d5 91 */
bcostm 3:c6b5944187d5 92
bcostm 3:c6b5944187d5 93 /* Exported functions --------------------------------------------------------*/
bcostm 3:c6b5944187d5 94 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Functions QSPI Exported Functions
bcostm 3:c6b5944187d5 95 * @{
bcostm 3:c6b5944187d5 96 */
bcostm 3:c6b5944187d5 97 uint8_t BSP_QSPI_Init (void);
bcostm 3:c6b5944187d5 98 uint8_t BSP_QSPI_DeInit (void);
bcostm 3:c6b5944187d5 99 uint8_t BSP_QSPI_Read (uint8_t* pData, uint32_t ReadAddr, uint32_t Size);
bcostm 3:c6b5944187d5 100 uint8_t BSP_QSPI_Write (uint8_t* pData, uint32_t WriteAddr, uint32_t Size);
bcostm 3:c6b5944187d5 101 uint8_t BSP_QSPI_Erase_Block (uint32_t BlockAddress);
bcostm 3:c6b5944187d5 102 uint8_t BSP_QSPI_Erase_Sector (uint32_t Sector);
bcostm 3:c6b5944187d5 103 uint8_t BSP_QSPI_Erase_Chip (void);
bcostm 3:c6b5944187d5 104 uint8_t BSP_QSPI_GetStatus (void);
bcostm 3:c6b5944187d5 105 uint8_t BSP_QSPI_GetInfo (QSPI_Info* pInfo);
bcostm 3:c6b5944187d5 106 uint8_t BSP_QSPI_EnableMemoryMappedMode(void);
bcostm 3:c6b5944187d5 107 uint8_t BSP_QSPI_SuspendErase (void);
bcostm 3:c6b5944187d5 108 uint8_t BSP_QSPI_ResumeErase (void);
bcostm 3:c6b5944187d5 109 uint8_t BSP_QSPI_EnterDeepPowerDown (void);
bcostm 3:c6b5944187d5 110 uint8_t BSP_QSPI_LeaveDeepPowerDown (void);
bcostm 3:c6b5944187d5 111
bcostm 3:c6b5944187d5 112 void BSP_QSPI_MspInit(void);
bcostm 3:c6b5944187d5 113 void BSP_QSPI_MspDeInit(void);
bcostm 3:c6b5944187d5 114 /**
bcostm 3:c6b5944187d5 115 * @}
bcostm 3:c6b5944187d5 116 */
bcostm 3:c6b5944187d5 117
bcostm 3:c6b5944187d5 118 /**
bcostm 3:c6b5944187d5 119 * @}
bcostm 3:c6b5944187d5 120 */
bcostm 3:c6b5944187d5 121
bcostm 3:c6b5944187d5 122 /**
bcostm 3:c6b5944187d5 123 * @}
bcostm 3:c6b5944187d5 124 */
bcostm 3:c6b5944187d5 125
bcostm 3:c6b5944187d5 126 /**
bcostm 3:c6b5944187d5 127 * @}
bcostm 3:c6b5944187d5 128 */
bcostm 3:c6b5944187d5 129
bcostm 3:c6b5944187d5 130 #ifdef __cplusplus
bcostm 3:c6b5944187d5 131 }
bcostm 3:c6b5944187d5 132 #endif
bcostm 3:c6b5944187d5 133
bcostm 3:c6b5944187d5 134 #endif /* __STM32L475E_IOT01_QSPI_H */
bcostm 3:c6b5944187d5 135
bcostm 3:c6b5944187d5 136 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/