Hal Drivers for L4

Dependents:   BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo

Fork of STM32L4xx_HAL_Driver by Senior Design: Sound Monitor

Committer:
EricLew
Date:
Mon Nov 02 19:37:23 2015 +0000
Revision:
0:80ee8f3b695e
Errors are with definitions of LCD and QSPI functions. I believe all .h and .c files are  uploaded, but there may need to be certain functions called.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
EricLew 0:80ee8f3b695e 1 /**
EricLew 0:80ee8f3b695e 2 ******************************************************************************
EricLew 0:80ee8f3b695e 3 * @file stm32l4xx_hal_flash_ramfunc.c
EricLew 0:80ee8f3b695e 4 * @author MCD Application Team
EricLew 0:80ee8f3b695e 5 * @version V1.1.0
EricLew 0:80ee8f3b695e 6 * @date 16-September-2015
EricLew 0:80ee8f3b695e 7 * @brief FLASH RAMFUNC driver.
EricLew 0:80ee8f3b695e 8 * This file provides a Flash firmware functions which should be
EricLew 0:80ee8f3b695e 9 * executed from internal SRAM
EricLew 0:80ee8f3b695e 10 * + FLASH HalfPage Programming
EricLew 0:80ee8f3b695e 11 * + FLASH Power Down in Run mode
EricLew 0:80ee8f3b695e 12 *
EricLew 0:80ee8f3b695e 13 * @verbatim
EricLew 0:80ee8f3b695e 14 ==============================================================================
EricLew 0:80ee8f3b695e 15 ##### Flash RAM functions #####
EricLew 0:80ee8f3b695e 16 ==============================================================================
EricLew 0:80ee8f3b695e 17
EricLew 0:80ee8f3b695e 18 *** ARM Compiler ***
EricLew 0:80ee8f3b695e 19 --------------------
EricLew 0:80ee8f3b695e 20 [..] RAM functions are defined using the toolchain options.
EricLew 0:80ee8f3b695e 21 Functions that are executed in RAM should reside in a separate
EricLew 0:80ee8f3b695e 22 source module. Using the 'Options for File' dialog you can simply change
EricLew 0:80ee8f3b695e 23 the 'Code / Const' area of a module to a memory space in physical RAM.
EricLew 0:80ee8f3b695e 24 Available memory areas are declared in the 'Target' tab of the
EricLew 0:80ee8f3b695e 25 Options for Target' dialog.
EricLew 0:80ee8f3b695e 26
EricLew 0:80ee8f3b695e 27 *** ICCARM Compiler ***
EricLew 0:80ee8f3b695e 28 -----------------------
EricLew 0:80ee8f3b695e 29 [..] RAM functions are defined using a specific toolchain keyword "__ramfunc".
EricLew 0:80ee8f3b695e 30
EricLew 0:80ee8f3b695e 31 *** GNU Compiler ***
EricLew 0:80ee8f3b695e 32 --------------------
EricLew 0:80ee8f3b695e 33 [..] RAM functions are defined using a specific toolchain attribute
EricLew 0:80ee8f3b695e 34 "__attribute__((section(".RamFunc")))".
EricLew 0:80ee8f3b695e 35
EricLew 0:80ee8f3b695e 36 @endverbatim
EricLew 0:80ee8f3b695e 37 ******************************************************************************
EricLew 0:80ee8f3b695e 38 * @attention
EricLew 0:80ee8f3b695e 39 *
EricLew 0:80ee8f3b695e 40 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
EricLew 0:80ee8f3b695e 41 *
EricLew 0:80ee8f3b695e 42 * Redistribution and use in source and binary forms, with or without modification,
EricLew 0:80ee8f3b695e 43 * are permitted provided that the following conditions are met:
EricLew 0:80ee8f3b695e 44 * 1. Redistributions of source code must retain the above copyright notice,
EricLew 0:80ee8f3b695e 45 * this list of conditions and the following disclaimer.
EricLew 0:80ee8f3b695e 46 * 2. Redistributions in binary form must reproduce the above copyright notice,
EricLew 0:80ee8f3b695e 47 * this list of conditions and the following disclaimer in the documentation
EricLew 0:80ee8f3b695e 48 * and/or other materials provided with the distribution.
EricLew 0:80ee8f3b695e 49 * 3. Neither the name of STMicroelectronics nor the names of its contributors
EricLew 0:80ee8f3b695e 50 * may be used to endorse or promote products derived from this software
EricLew 0:80ee8f3b695e 51 * without specific prior written permission.
EricLew 0:80ee8f3b695e 52 *
EricLew 0:80ee8f3b695e 53 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
EricLew 0:80ee8f3b695e 54 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
EricLew 0:80ee8f3b695e 55 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
EricLew 0:80ee8f3b695e 56 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
EricLew 0:80ee8f3b695e 57 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
EricLew 0:80ee8f3b695e 58 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
EricLew 0:80ee8f3b695e 59 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
EricLew 0:80ee8f3b695e 60 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
EricLew 0:80ee8f3b695e 61 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
EricLew 0:80ee8f3b695e 62 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
EricLew 0:80ee8f3b695e 63 *
EricLew 0:80ee8f3b695e 64 ******************************************************************************
EricLew 0:80ee8f3b695e 65 */
EricLew 0:80ee8f3b695e 66
EricLew 0:80ee8f3b695e 67 /* Includes ------------------------------------------------------------------*/
EricLew 0:80ee8f3b695e 68 #include "stm32l4xx_hal.h"
EricLew 0:80ee8f3b695e 69
EricLew 0:80ee8f3b695e 70 /** @addtogroup STM32L4xx_HAL_Driver
EricLew 0:80ee8f3b695e 71 * @{
EricLew 0:80ee8f3b695e 72 */
EricLew 0:80ee8f3b695e 73
EricLew 0:80ee8f3b695e 74 /** @defgroup FLASH_RAMFUNC FLASH_RAMFUNC
EricLew 0:80ee8f3b695e 75 * @brief FLASH functions executed from RAM
EricLew 0:80ee8f3b695e 76 * @{
EricLew 0:80ee8f3b695e 77 */
EricLew 0:80ee8f3b695e 78
EricLew 0:80ee8f3b695e 79 #ifdef HAL_FLASH_MODULE_ENABLED
EricLew 0:80ee8f3b695e 80
EricLew 0:80ee8f3b695e 81 /* Private typedef -----------------------------------------------------------*/
EricLew 0:80ee8f3b695e 82 /* Private define ------------------------------------------------------------*/
EricLew 0:80ee8f3b695e 83 /* Private macro -------------------------------------------------------------*/
EricLew 0:80ee8f3b695e 84 /* Private variables ---------------------------------------------------------*/
EricLew 0:80ee8f3b695e 85 /* Private function prototypes -----------------------------------------------*/
EricLew 0:80ee8f3b695e 86 /* Exported functions -------------------------------------------------------*/
EricLew 0:80ee8f3b695e 87
EricLew 0:80ee8f3b695e 88 /** @defgroup FLASH_RAMFUNC_Exported_Functions FLASH in RAM function Exported Functions
EricLew 0:80ee8f3b695e 89 * @{
EricLew 0:80ee8f3b695e 90 */
EricLew 0:80ee8f3b695e 91
EricLew 0:80ee8f3b695e 92 /** @defgroup FLASH_RAMFUNC_Exported_Functions_Group1 Peripheral features functions
EricLew 0:80ee8f3b695e 93 * @brief Data transfers functions
EricLew 0:80ee8f3b695e 94 *
EricLew 0:80ee8f3b695e 95 @verbatim
EricLew 0:80ee8f3b695e 96 ===============================================================================
EricLew 0:80ee8f3b695e 97 ##### ramfunc functions #####
EricLew 0:80ee8f3b695e 98 ===============================================================================
EricLew 0:80ee8f3b695e 99 [..]
EricLew 0:80ee8f3b695e 100 This subsection provides a set of functions that should be executed from RAM.
EricLew 0:80ee8f3b695e 101
EricLew 0:80ee8f3b695e 102 @endverbatim
EricLew 0:80ee8f3b695e 103 * @{
EricLew 0:80ee8f3b695e 104 */
EricLew 0:80ee8f3b695e 105
EricLew 0:80ee8f3b695e 106 /**
EricLew 0:80ee8f3b695e 107 * @brief Enable the Power down in Run Mode
EricLew 0:80ee8f3b695e 108 * @note This function should be called and executed from SRAM memory
EricLew 0:80ee8f3b695e 109 * @retval None
EricLew 0:80ee8f3b695e 110 */
EricLew 0:80ee8f3b695e 111 __RAM_FUNC HAL_FLASHEx_EnableRunPowerDown(void)
EricLew 0:80ee8f3b695e 112 {
EricLew 0:80ee8f3b695e 113 /* Enable the Power Down in Run mode*/
EricLew 0:80ee8f3b695e 114 __HAL_FLASH_POWER_DOWN_ENABLE();
EricLew 0:80ee8f3b695e 115
EricLew 0:80ee8f3b695e 116 return HAL_OK;
EricLew 0:80ee8f3b695e 117
EricLew 0:80ee8f3b695e 118 }
EricLew 0:80ee8f3b695e 119
EricLew 0:80ee8f3b695e 120 /**
EricLew 0:80ee8f3b695e 121 * @brief Disable the Power down in Run Mode
EricLew 0:80ee8f3b695e 122 * @note This function should be called and executed from SRAM memory
EricLew 0:80ee8f3b695e 123 * @retval None
EricLew 0:80ee8f3b695e 124 */
EricLew 0:80ee8f3b695e 125 __RAM_FUNC HAL_FLASHEx_DisableRunPowerDown(void)
EricLew 0:80ee8f3b695e 126 {
EricLew 0:80ee8f3b695e 127 /* Disable the Power Down in Run mode*/
EricLew 0:80ee8f3b695e 128 __HAL_FLASH_POWER_DOWN_DISABLE();
EricLew 0:80ee8f3b695e 129
EricLew 0:80ee8f3b695e 130 return HAL_OK;
EricLew 0:80ee8f3b695e 131 }
EricLew 0:80ee8f3b695e 132
EricLew 0:80ee8f3b695e 133 /**
EricLew 0:80ee8f3b695e 134 * @}
EricLew 0:80ee8f3b695e 135 */
EricLew 0:80ee8f3b695e 136
EricLew 0:80ee8f3b695e 137 /**
EricLew 0:80ee8f3b695e 138 * @}
EricLew 0:80ee8f3b695e 139 */
EricLew 0:80ee8f3b695e 140 #endif /* HAL_FLASH_MODULE_ENABLED */
EricLew 0:80ee8f3b695e 141
EricLew 0:80ee8f3b695e 142
EricLew 0:80ee8f3b695e 143
EricLew 0:80ee8f3b695e 144 /**
EricLew 0:80ee8f3b695e 145 * @}
EricLew 0:80ee8f3b695e 146 */
EricLew 0:80ee8f3b695e 147
EricLew 0:80ee8f3b695e 148 /**
EricLew 0:80ee8f3b695e 149 * @}
EricLew 0:80ee8f3b695e 150 */
EricLew 0:80ee8f3b695e 151
EricLew 0:80ee8f3b695e 152
EricLew 0:80ee8f3b695e 153 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
EricLew 0:80ee8f3b695e 154
EricLew 0:80ee8f3b695e 155
EricLew 0:80ee8f3b695e 156