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:
jeromecoutant
Date:
Tue Sep 24 15:30:09 2019 +0200
Revision:
7:bfe8272ced90
Parent:
6:9dfa42666f03
Update BSP files with STM32Cube L4 V1.14.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 *
jeromecoutant 7:bfe8272ced90 10 * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
jeromecoutant 7:bfe8272ced90 11 * All rights reserved.</center></h2>
bcostm 3:c6b5944187d5 12 *
jeromecoutant 7:bfe8272ced90 13 * This software component is licensed by ST under BSD 3-Clause license,
jeromecoutant 7:bfe8272ced90 14 * the "License"; You may not use this file except in compliance with the
jeromecoutant 7:bfe8272ced90 15 * License. You may obtain a copy of the License at:
jeromecoutant 7:bfe8272ced90 16 * opensource.org/licenses/BSD-3-Clause
bcostm 3:c6b5944187d5 17 *
bcostm 3:c6b5944187d5 18 ******************************************************************************
bcostm 3:c6b5944187d5 19 */
bcostm 3:c6b5944187d5 20
bcostm 3:c6b5944187d5 21 /* Define to prevent recursive inclusion -------------------------------------*/
bcostm 3:c6b5944187d5 22 #ifndef __STM32L475E_IOT01_QSPI_H
bcostm 3:c6b5944187d5 23 #define __STM32L475E_IOT01_QSPI_H
bcostm 3:c6b5944187d5 24
bcostm 3:c6b5944187d5 25 #ifdef __cplusplus
bcostm 3:c6b5944187d5 26 extern "C" {
bcostm 3:c6b5944187d5 27 #endif
bcostm 3:c6b5944187d5 28
bcostm 3:c6b5944187d5 29 /* Includes ------------------------------------------------------------------*/
bcostm 3:c6b5944187d5 30 #include "stm32l4xx_hal.h"
bcostm 3:c6b5944187d5 31 #include "../Components/mx25r6435f/mx25r6435f.h"
bcostm 3:c6b5944187d5 32
bcostm 3:c6b5944187d5 33 /** @addtogroup BSP
bcostm 3:c6b5944187d5 34 * @{
bcostm 3:c6b5944187d5 35 */
bcostm 3:c6b5944187d5 36
bcostm 3:c6b5944187d5 37 /** @addtogroup STM32L475E_IOT01
bcostm 3:c6b5944187d5 38 * @{
bcostm 3:c6b5944187d5 39 */
bcostm 3:c6b5944187d5 40
bcostm 3:c6b5944187d5 41 /** @addtogroup STM32L475E_IOT01_QSPI
bcostm 3:c6b5944187d5 42 * @{
bcostm 3:c6b5944187d5 43 */
bcostm 3:c6b5944187d5 44
bcostm 3:c6b5944187d5 45 /* Exported constants --------------------------------------------------------*/
bcostm 3:c6b5944187d5 46 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Constants QSPI Exported Constants
bcostm 3:c6b5944187d5 47 * @{
bcostm 3:c6b5944187d5 48 */
bcostm 3:c6b5944187d5 49 /* QSPI Error codes */
bcostm 3:c6b5944187d5 50 #define QSPI_OK ((uint8_t)0x00)
bcostm 3:c6b5944187d5 51 #define QSPI_ERROR ((uint8_t)0x01)
bcostm 3:c6b5944187d5 52 #define QSPI_BUSY ((uint8_t)0x02)
bcostm 3:c6b5944187d5 53 #define QSPI_NOT_SUPPORTED ((uint8_t)0x04)
bcostm 3:c6b5944187d5 54 #define QSPI_SUSPENDED ((uint8_t)0x08)
bcostm 3:c6b5944187d5 55
bcostm 3:c6b5944187d5 56 /**
bcostm 3:c6b5944187d5 57 * @}
bcostm 3:c6b5944187d5 58 */
bcostm 3:c6b5944187d5 59
bcostm 3:c6b5944187d5 60 /* Exported types ------------------------------------------------------------*/
bcostm 3:c6b5944187d5 61 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Types QSPI Exported Types
bcostm 3:c6b5944187d5 62 * @{
bcostm 3:c6b5944187d5 63 */
bcostm 3:c6b5944187d5 64 /* QSPI Info */
bcostm 3:c6b5944187d5 65 typedef struct {
bcostm 3:c6b5944187d5 66 uint32_t FlashSize; /*!< Size of the flash */
bcostm 3:c6b5944187d5 67 uint32_t EraseSectorSize; /*!< Size of sectors for the erase operation */
bcostm 3:c6b5944187d5 68 uint32_t EraseSectorsNumber; /*!< Number of sectors for the erase operation */
bcostm 3:c6b5944187d5 69 uint32_t ProgPageSize; /*!< Size of pages for the program operation */
bcostm 3:c6b5944187d5 70 uint32_t ProgPagesNumber; /*!< Number of pages for the program operation */
bcostm 3:c6b5944187d5 71 } QSPI_Info;
bcostm 3:c6b5944187d5 72
bcostm 3:c6b5944187d5 73 /**
bcostm 3:c6b5944187d5 74 * @}
bcostm 3:c6b5944187d5 75 */
bcostm 3:c6b5944187d5 76
bcostm 3:c6b5944187d5 77 /* Exported functions --------------------------------------------------------*/
bcostm 3:c6b5944187d5 78 /** @defgroup STM32L475E_IOT01_QSPI_Exported_Functions QSPI Exported Functions
bcostm 3:c6b5944187d5 79 * @{
bcostm 3:c6b5944187d5 80 */
bcostm 3:c6b5944187d5 81 uint8_t BSP_QSPI_Init (void);
bcostm 3:c6b5944187d5 82 uint8_t BSP_QSPI_DeInit (void);
bcostm 3:c6b5944187d5 83 uint8_t BSP_QSPI_Read (uint8_t* pData, uint32_t ReadAddr, uint32_t Size);
bcostm 3:c6b5944187d5 84 uint8_t BSP_QSPI_Write (uint8_t* pData, uint32_t WriteAddr, uint32_t Size);
bcostm 3:c6b5944187d5 85 uint8_t BSP_QSPI_Erase_Block (uint32_t BlockAddress);
bcostm 3:c6b5944187d5 86 uint8_t BSP_QSPI_Erase_Sector (uint32_t Sector);
bcostm 3:c6b5944187d5 87 uint8_t BSP_QSPI_Erase_Chip (void);
bcostm 3:c6b5944187d5 88 uint8_t BSP_QSPI_GetStatus (void);
bcostm 3:c6b5944187d5 89 uint8_t BSP_QSPI_GetInfo (QSPI_Info* pInfo);
bcostm 3:c6b5944187d5 90 uint8_t BSP_QSPI_EnableMemoryMappedMode(void);
bcostm 3:c6b5944187d5 91 uint8_t BSP_QSPI_SuspendErase (void);
bcostm 3:c6b5944187d5 92 uint8_t BSP_QSPI_ResumeErase (void);
bcostm 3:c6b5944187d5 93 uint8_t BSP_QSPI_EnterDeepPowerDown (void);
bcostm 3:c6b5944187d5 94 uint8_t BSP_QSPI_LeaveDeepPowerDown (void);
bcostm 3:c6b5944187d5 95
bcostm 3:c6b5944187d5 96 void BSP_QSPI_MspInit(void);
bcostm 3:c6b5944187d5 97 void BSP_QSPI_MspDeInit(void);
bcostm 3:c6b5944187d5 98 /**
bcostm 3:c6b5944187d5 99 * @}
bcostm 3:c6b5944187d5 100 */
bcostm 3:c6b5944187d5 101
bcostm 3:c6b5944187d5 102 /**
bcostm 3:c6b5944187d5 103 * @}
bcostm 3:c6b5944187d5 104 */
bcostm 3:c6b5944187d5 105
bcostm 3:c6b5944187d5 106 /**
bcostm 3:c6b5944187d5 107 * @}
bcostm 3:c6b5944187d5 108 */
bcostm 3:c6b5944187d5 109
bcostm 3:c6b5944187d5 110 /**
bcostm 3:c6b5944187d5 111 * @}
bcostm 3:c6b5944187d5 112 */
bcostm 3:c6b5944187d5 113
bcostm 3:c6b5944187d5 114 #ifdef __cplusplus
bcostm 3:c6b5944187d5 115 }
bcostm 3:c6b5944187d5 116 #endif
bcostm 3:c6b5944187d5 117
bcostm 3:c6b5944187d5 118 #endif /* __STM32L475E_IOT01_QSPI_H */
bcostm 3:c6b5944187d5 119
bcostm 3:c6b5944187d5 120 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/