STM32L073Z_EVAL BSP User Manual: stm32l073z_eval_idd.h Source File

STM32L073Z EVAL BSP Drivers

stm32l073z_eval_idd.h
Go to the documentation of this file.
00001  /**
00002   ******************************************************************************
00003   * @file    stm32l073z_eval_idd.h
00004   * @author  MCD Application Team
00005   * @brief   Header file for stm32l476g_discovery_idd.c module.
00006   ******************************************************************************
00007   * @attention
00008   *
00009   * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
00010   *
00011   * Redistribution and use in source and binary forms, with or without modification,
00012   * are permitted provided that the following conditions are met:
00013   *   1. Redistributions of source code must retain the above copyright notice,
00014   *      this list of conditions and the following disclaimer.
00015   *   2. Redistributions in binary form must reproduce the above copyright notice,
00016   *      this list of conditions and the following disclaimer in the documentation
00017   *      and/or other materials provided with the distribution.
00018   *   3. Neither the name of STMicroelectronics nor the names of its contributors
00019   *      may be used to endorse or promote products derived from this software
00020   *      without specific prior written permission.
00021   *
00022   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00023   * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00025   * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00026   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00027   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00028   * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00029   * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00030   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00031   * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00032   *
00033   ******************************************************************************
00034   */ 
00035 
00036 /** @addtogroup BSP
00037   * @{
00038   */
00039   
00040 /** @addtogroup STM32L073Z_EVAL
00041   * @{
00042   */
00043 
00044 /* Define to prevent recursive inclusion -------------------------------------*/
00045 #ifndef __STM32L073Z_EVAL_IDD_H
00046 #define __STM32L073Z_EVAL_IDD_H
00047 
00048 #ifdef __cplusplus
00049  extern "C" {
00050 #endif
00051 
00052 /* Includes ------------------------------------------------------------------*/
00053 #include "stm32l073z_eval.h"
00054 /* Include Idd measurement component driver */
00055 #include "../Components/mfxstm32l152/mfxstm32l152.h"
00056 #include "idd.h"
00057    
00058 
00059 /** @addtogroup STM32L073Z_EVAL
00060   * @{
00061   */
00062 
00063 /**
00064   * @}
00065   */
00066 
00067 /** @defgroup STM32L073Z_EVAL_IDD_Exported_Types  IDD Exported Types
00068   * @{
00069   */
00070 /** @defgroup IDD_Config  IDD Config
00071   * @{
00072   */
00073 typedef enum 
00074 {
00075   IDD_OK = 0,
00076   IDD_TIMEOUT = 1,
00077   IDD_ERROR = 0xFF
00078 } 
00079 IDD_StatusTypeDef;
00080 /**
00081   * @}
00082   */
00083 
00084 /** @defgroup STM32L073Z_EVAL_IDD_Exported_Defines  IDD Exported Defines
00085   * @{
00086   */
00087 /**
00088   * @brief  Shunt values on discovery in milli ohms
00089   */
00090 #define EVAL_IDD_SHUNT0_VALUE                  ((uint16_t) 1000)     /*!< value in milliohm */
00091 #define EVAL_IDD_SHUNT1_VALUE                  ((uint16_t) 10)       /*!< value in ohm */
00092 #define EVAL_IDD_SHUNT2_VALUE                  ((uint16_t) 100)      /*!< value in ohm */
00093 #define EVAL_IDD_SHUNT3_VALUE                  ((uint16_t) 1000)     /*!< value in ohm */
00094 #define EVAL_IDD_SHUNT4_VALUE                  ((uint16_t) 10000)    /*!< value in ohm */
00095 
00096 /**
00097   * @brief  Shunt stabdelay value
00098   */
00099 
00100 #define EVAL_IDD_SHUNT0_STABDELAY              ((uint16_t) 50)       /*!< value in millisec */
00101 #define EVAL_IDD_SHUNT1_STABDELAY              ((uint16_t) 50)       /*!< value in millisec */
00102 #define EVAL_IDD_SHUNT2_STABDELAY              ((uint16_t) 50)       /*!< value in millisec */
00103 #define EVAL_IDD_SHUNT3_STABDELAY              ((uint16_t) 50)       /*!< value in millisec */
00104 #define EVAL_IDD_SHUNT4_STABDELAY              ((uint16_t) 150)       /*!< value in millisec */
00105 
00106 
00107 /**
00108   * @brief  Shunt values on discovery in milli ohms
00109   */
00110 
00111 /**
00112   * @brief  IDD Ampli Gain on discovery 
00113   */
00114 #define EVAL_IDD_AMPLI_GAIN                    ((uint16_t) 4990)     /*!< value is gain * 100 */
00115 
00116 /**
00117   * @brief  IDD Vdd Min
00118   */
00119 #define EVAL_IDD_VDD_MIN                       ((uint16_t) 1700)     /*!< value in millivolt */
00120 
00121 /**
00122   * @}
00123   */
00124 
00125 
00126 /** @addtogroup STM32L073Z_EVAL_IDD_Exported_Functions  IDD Exported Functions
00127   * @{
00128   */
00129 uint8_t   BSP_IDD_Init(void);
00130 void      BSP_IDD_Reset(void);
00131 void      BSP_IDD_LowPower(void);
00132 void      BSP_IDD_WakeUp(void);
00133 void      BSP_IDD_StartMeasure(void);
00134 void      BSP_IDD_Config(IDD_ConfigTypeDef IddConfig);
00135 void      BSP_IDD_GetValue(uint32_t *IddValue);
00136 void      BSP_IDD_EnableIT(void);
00137 void      BSP_IDD_ClearIT(void);
00138 uint8_t   BSP_IDD_GetITStatus(void);
00139 void      BSP_IDD_DisableIT(void);
00140 uint8_t   BSP_IDD_ErrorGetCode(void);
00141 void      BSP_IDD_ErrorEnableIT(void);
00142 void      BSP_IDD_ErrorClearIT(void);
00143 uint8_t   BSP_IDD_ErrorGetITStatus(void);
00144 void      BSP_IDD_ErrorDisableIT(void);
00145 
00146 /**
00147   * @}
00148   */
00149 
00150 #ifdef __cplusplus
00151 }
00152 #endif
00153 
00154 #endif /* __STM32L073Z_EVAL_IDD_H */
00155 
00156 /**
00157   * @}
00158   */   
00159 
00160 /**
00161   * @}
00162   */   
00163 
00164 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
Generated on Mon Aug 28 2017 14:54:25 for STM32L073Z_EVAL BSP User Manual by   doxygen 1.7.6.1