ST意法半导体官网最近新闻
2020-03-06 15:57
ST意法半导体意法半导体
2022-12-12 10:02
电子发烧友网讯 [翻译/vincent] 本周四(11月15日)消息,针对某国际新闻社关于公司正在计划进行拆分的报道,芯片供应商意法半导体发表了一份声明,有力地否定了拆分之说。
2012-11-16 16:59
STM32H725ZGT6,ST/意法半导体,Arm®Cortex®-M7 32位550 MHz MCU,最高1 MB闪存,564 KB,RAM、以太网、USB、3个F
2023-10-16 15:52 深圳市金和信科技有限公司 企业号
ST意法半导体推出了三款MasterGaN器件,MasterGaN器件内部集成了两颗GaN开关管及驱动器,组成半桥器件,是一款先进的系统级功率封装,可输入逻辑电压信号轻
2021-04-30 16:44
ST(意法半导体)V2X技术资料
2017-03-10 14:27
ST(意法半导体)V2X开发板
2017-03-10 14:27
[C] 纯文本查看 复制代码/** ****************************************************************************** * @file lsm6ds3.c * @authorMEMS Application Team * @version V1.2.0 * @date 28-May-2015 * @briefThis file provides a set of functions needed to manage the LSM6DS3 sensor ****************************************************************************** * @attention * * © COPYRIGHT(c) 2015 STMicroelectronics * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: *1. Redistributions of source code must retain the above copyright notice, *this list of conditions and the following disclaimer. *2. Redistributions in binary form must reproduce the above copyright notice, *this list of conditions and the following disclaimer in the documentation *and/or other materials provided with the distribution. *3. Neither the name of STMicroelectronics nor the names of its contributors *may be used to endorse or promote products derived from this software *without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************** *//* Includes ------------------------------------------------------------------*/#include \"lsm6ds3.h\"#include /** @addtogroup BSP * @{ *//** @addtogroup Components * @{ *//** @addtogroup LSM6DS3 * @{ */static IMU_6AXES_StatusTypeDef LSM6DS3_Init( IMU_6AXES_InitTypeDef *LSM6DS3_Init );static IMU_6AXES_StatusTypeDef LSM6DS3_Read_XG_ID( uint8_t *xg_id);static IMU_6AXES_StatusTypeDef LSM6DS3_X_GetAxes( int32_t *pData );static IMU_6AXES_StatusTypeDef LSM6DS3_X_GetAxesRaw(int16_t *pData);static IMU_6AXES_StatusTypeDef LSM6DS3_G_GetAxes( int32_t *pData );static IMU_6AXES_StatusTypeDef LSM6DS3_G_GetAxesRaw(int16_t *pData);static IMU_6AXES_StatusTypeDef LSM6DS3_X_Get_ODR( float *odr );static IMU_6AXES_StatusTypeDef LSM6DS3_X_Set_ODR( float odr );static IMU_6AXES_StatusTypeDef LSM6DS3_X_GetSensitivity( float *pfData );static IMU_6AXES_StatusTypeDef LSM6DS3_X_Get_FS( float *fullScale );static IMU_6AXES_StatusTypeDef LSM6DS3_X_Set_FS( float fullScale );static IMU_6AXES_StatusTypeDef LSM6DS3_G_Get_ODR( float *odr );static IMU_6AXES_StatusTypeDef LSM6DS3_G_Set_ODR( float odr );static IMU_6AXES_StatusTypeDef LSM6DS3_G_GetSensitivity( float *pfData );static IMU_6AXES_StatusTypeDef LSM6DS3_G_Get_FS( float *fullScale );static IMU_6AXES_StatusTypeDef LSM6DS3_G_Set_FS( float fullScale );static IMU_6AXES_StatusTypeDef LSM6DS3_Enable_Free_Fall_Detection( void );static IMU_6AXES_StatusTypeDef LSM6DS3_Disable_Free_Fall_Detection( void );static IMU_6AXES_StatusTypeDef LSM6DS3_Get_Status_Free_Fall_Detection( uint8_t *status );/** @addtogroup LSM6DS3_Private_Variables LSM6DS3_Private_Variables * @{ */IMU_6AXES_DrvTypeDef LSM6DS3Drv ={LSM6DS3_Init,LSM6DS3_Read_XG_ID,LSM6DS3_X_GetAxes,LSM6DS3_X_GetAxesRaw,LSM6DS3_G_GetAxes,LSM6DS3_G_GetAxesRaw,LSM6DS3_X_Get_ODR,LSM6DS3_X_Set_ODR,LSM6DS3_X_GetSensitivity,LSM6DS3_X_Get_FS,LSM6DS3_X_Set_FS,LSM6DS3_G_Get_ODR,LSM6DS3_G_Set_ODR,LSM6DS3_G_GetSensitivity,LSM6DS3_G_Get_FS,LSM6DS3_G_Set_FS,NULL};LSM6DS3_DrvExtTypeDef LSM6DS3Drv_ext_internal ={LSM6DS3_Enable_Free_Fall_Detection,LSM6DS3_Disable_Free_Fall_Detection,LSM6DS3_Get_Status_Free_Fall_Detection};IMU_6AXES_DrvExtTypeDef LSM6DS3Drv_ext ={IMU_6AXES_LSM6DS3_DIL24_COMPONENT, /* unique ID for LSM6DS3 in the IMU 6-axes driver class */&LSM6DS3Drv_ext_internal /* pointer to internal struct of extended features of LSM6DS3 */};/** * @} */static IMU_6AXES_StatusTypeDef LSM6DS3_Common_Sensor_Enable(void);static IMU_6AXES_StatusTypeDef LSM6DS3_X_Set_Axes_Status(uint8_t enableX, uint8_t enableY, uint8_t enableZ);static IMU_6AXES_StatusTypeDef LSM6DS3_G_Set_Axes_Status(uint8_t enableX, uint8_t enableY, uint8_t enableZ);/** @addtogroup LSM6DS3_Private_Functions LSM6DS3_Private_Functions * @{ *//** * @briefSet LSM6DS3 Initialization * @paramLSM6DS3_Init the configuration setting for the LSM6DS3 * @retval IMU_6AXES_OK in case of success, an error code otherwise */static IMU_6AXES_StatusTypeDef LSM6DS3_Init( IMU_6AXES_InitTypeDef *LSM6DS3_Init ){/*Here we have to add the check if the parameters are valid*/ /* Configure the low level interface -------------------------------------*/if(LSM6DS3_IO_Init() != IMU_6AXES_OK){ return IMU_6AXES_ERROR;}/******** Common init *********/ if(LSM6DS3_Common_Sensor_Enable() != IMU_6AXES_OK){ return IMU_6AXES_ERROR;}/******* Gyroscope init *******/ if(LSM6DS3_G_Set_ODR( LSM6DS3_Init->G_OutputDataRate ) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;} if(LSM6DS3_G_Set_FS( LSM6DS3_Init->G_FullScale ) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;} if(LSM6DS3_G_Set_Axes_Status(LSM6DS3_Init->G_X_Axis, LSM6DS3_Init->G_Y_Axis, LSM6DS3_Init->G_Z_Axis) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;}/***** Accelerometer init *****/ if(LSM6DS3_X_Set_ODR( LSM6DS3_Init->X_OutputDataRate ) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;} if(LSM6DS3_X_Set_FS( LSM6DS3_Init->X_FullScale ) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;} if(LSM6DS3_X_Set_Axes_Status(LSM6DS3_Init->X_X_Axis, LSM6DS3_Init->X_Y_Axis, LSM6DS3_Init->X_Z_Axis) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;} /* Configure interrupt lines */LSM6DS3_IO_ITConfig(); return IMU_6AXES_OK;}/** * @briefRead ID of LSM6DS3 Accelerometer and Gyroscope * @paramxg_id the pointer where the ID of the device is stored * @retval IMU_6AXES_OK in case of success, an error code otherwise */static IMU_6AXES_StatusTypeDef LSM6DS3_Read_XG_ID( uint8_t *xg_id){if(!xg_id){ return IMU_6AXES_ERROR;} return LSM6DS3_IO_Read(xg_id, LSM6DS3_XG_MEMS_ADDRESS, LSM6DS3_XG_WHO_AM_I_ADDR, 1);}/** * @briefSet LSM6DS3 common initialization * @retval IMU_6AXES_OK in case of success, an error code otherwise */static IMU_6AXES_StatusTypeDef LSM6DS3_Common_Sensor_Enable(void){uint8_t tmp1 = 0x00; if(LSM6DS3_IO_Read(&tmp1, LSM6DS3_XG_MEMS_ADDRESS, LSM6DS3_XG_CTRL3_C, 1) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;} /* Enable register address automatically incremented during a multiple byteaccess with a serial interface (I2C or SPI) */tmp1 &= ~(LSM6DS3_XG_IF_INC_MASK);tmp1 |= LSM6DS3_XG_IF_INC; if(LSM6DS3_IO_Write(&tmp1, LSM6DS3_XG_MEMS_ADDRESS, LSM6DS3_XG_CTRL3_C, 1) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;}if(LSM6DS3_IO_Read(&tmp1, LSM6DS3_XG_MEMS_ADDRESS, LSM6DS3_XG_FIFO_CTRL5, 1) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;} /* FIFO ODR selection */tmp1 &= ~(LSM6DS3_XG_FIFO_ODR_MASK);tmp1 |= LSM6DS3_XG_FIFO_ODR_NA; /* FIFO mode selection */tmp1 &= ~(LSM6DS3_XG_FIFO_MODE_MASK);tmp1 |= LSM6DS3_XG_FIFO_MODE_BYPASS; if(LSM6DS3_IO_Write(&tmp1, LSM6DS3_XG_MEMS_ADDRESS, LSM6DS3_XG_FIFO_CTRL5, 1) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;} return IMU_6AXES_OK;}/** * @briefRead raw data from LSM6DS3 Accelerometer output register * @parampData the pointer where the accelerometer raw data are stored * @retval IMU_6AXES_OK in case of success, an error code otherwise */static IMU_6AXES_StatusTypeDef LSM6DS3_X_GetAxesRaw( int16_t *pData ){/*Here we have to add the check if the parameters are valid*/ uint8_t tempReg[2] = {0, 0};if(LSM6DS3_IO_Read(&tempReg[0], LSM6DS3_XG_MEMS_ADDRESS, LSM6DS3_XG_OUT_X_L_XL, 2) != IMU_6AXES_OK){ return IMU_6AXES_ERROR;} pData[0] = ((((int16_t)tempReg[1])
2019-04-24 06:36
产生器;9.快速GPIO(翻转速率高达60MHZ) 型号封装程序存储器定时器功能 A/D转换器D/A转换器I/O 端口(大电流)串行接口供电电压(Vcc)(V)供电电流(Icc)温度Flash。ST意法
2012-12-13 10:04
随着mcu的市场需求不断扩大,导致MCU供应短缺,有机构预计2020年全球MCU市场规模将超过200亿美元。据报道,NXP将率先打响2018年MCU芯片涨价第一枪,ST意法半导
2017-12-22 10:14