STM32L476G_EVAL BSP User Manual
|
stm32l476g_eval_idd.h
Go to the documentation of this file.
00001 /** 00002 ****************************************************************************** 00003 * @file stm32l476g_eval_idd.h 00004 * @author MCD Application Team 00005 * @version $VERSION$ 00006 * @date $DATE$ 00007 * @brief Header file for stm32l476g_eval_idd.c module. 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> 00012 * 00013 * Redistribution and use in source and binary forms, with or without modification, 00014 * are permitted provided that the following conditions are met: 00015 * 1. Redistributions of source code must retain the above copyright notice, 00016 * this list of conditions and the following disclaimer. 00017 * 2. Redistributions in binary form must reproduce the above copyright notice, 00018 * this list of conditions and the following disclaimer in the documentation 00019 * and/or other materials provided with the distribution. 00020 * 3. Neither the name of STMicroelectronics nor the names of its contributors 00021 * may be used to endorse or promote products derived from this software 00022 * without specific prior written permission. 00023 * 00024 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00025 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00026 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00027 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 00028 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00029 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 00030 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00031 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 00032 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00033 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 * 00035 ****************************************************************************** 00036 */ 00037 00038 /* Define to prevent recursive inclusion -------------------------------------*/ 00039 #ifndef __STM32L476G_EVAL_IDD_H 00040 #define __STM32L476G_EVAL_IDD_H 00041 00042 #ifdef __cplusplus 00043 extern "C" { 00044 #endif 00045 00046 /* Includes ------------------------------------------------------------------*/ 00047 #include "stm32l476g_eval.h" 00048 00049 /** @addtogroup BSP 00050 * @{ 00051 */ 00052 00053 /** @addtogroup STM32L476G_EVAL 00054 * @{ 00055 */ 00056 00057 /** @addtogroup STM32L476G_EVAL_IDD 00058 * @{ 00059 */ 00060 00061 /** @defgroup STM32L476G_EVAL_IDD_Exported_Types Exported Types 00062 * @{ 00063 */ 00064 00065 /** @defgroup IDD_Config IDD Config 00066 * @{ 00067 */ 00068 typedef enum 00069 { 00070 BSP_IDD_OK = 0, 00071 BSP_IDD_TIMEOUT = 1, 00072 BSP_IDD_ERROR = 0xFF 00073 } 00074 IDD_StatusTypeDef; 00075 00076 typedef enum 00077 { 00078 BSP_IDD_MODE_CALIBRATION = 0, 00079 BSP_IDD_MODE_RUN, 00080 BSP_IDD_MODE_SLEEP, 00081 BSP_IDD_MODE_STOP, 00082 BSP_IDD_MODE_STANDBY, 00083 00084 }IDD_ModeTypdef; 00085 00086 /** 00087 * @} 00088 */ 00089 00090 /** 00091 * @} 00092 */ 00093 00094 /* Exported constants --------------------------------------------------------*/ 00095 /** @defgroup STM32L476G_EVAL_IDD_Exported_Constants Exported Constants 00096 * @{ 00097 */ 00098 /** 00099 * @brief Shunt values on evaluation board in ohms 00100 */ 00101 #define EVAL_IDD_SHUNT0_VALUE ((uint16_t) 1000) /*!< value in ohm */ 00102 #define EVAL_IDD_SHUNT1_VALUE ((uint16_t) 1) /*!< value in ohm */ 00103 00104 /** 00105 * @brief IDD Ampli Gain on evaluation board 00106 */ 00107 #define EVAL_IDD_AMPLI_GAIN ((uint16_t) 50) /*!< value is gain */ 00108 00109 /** 00110 * @brief IDD Full Scale Measure 00111 */ 00112 #define EVAL_IDD_FULL_SCALE ((uint16_t) 4096) /*!< value is adc max value */ 00113 00114 /** 00115 * @brief IDD Vdd Min on eval 00116 */ 00117 #define EVAL_IDD_VDD ((uint16_t) 3300) /*!< value in millivolt */ 00118 00119 /** 00120 * @} 00121 */ 00122 00123 /* Exported functions --------------------------------------------------------*/ 00124 /** @defgroup STM32L476G_EVAL_QSPI_Exported_Functions Exported Functions 00125 * @{ 00126 */ 00127 uint8_t BSP_IDD_Init(void); 00128 void BSP_IDD_EnterStopMode1(void); 00129 void BSP_IDD_EnterStopMode2(void); 00130 void BSP_IDD_ExitStopMode(void); 00131 void BSP_IDD_EnterSleepMode(void); 00132 void BSP_IDD_ExitSleepMode(void); 00133 void BSP_IDD_EnterRunMode(void); 00134 void BSP_IDD_EnterStandbyMode(void); 00135 uint32_t BSP_IDD_GetValue(IDD_ModeTypdef LowPowerMode, uint32_t Calibration, uint32_t *IddValue); 00136 00137 /** 00138 * @} 00139 */ 00140 00141 /** 00142 * @} 00143 */ 00144 00145 /** 00146 * @} 00147 */ 00148 00149 /** 00150 * @} 00151 */ 00152 00153 #ifdef __cplusplus 00154 } 00155 #endif 00156 00157 #endif /* __STM32L476G_EVAL_IDD_H */ 00158 00159 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Sun Jun 21 2015 23:46:41 for STM32L476G_EVAL BSP User Manual by
