AnsweredAssumed Answered

Simple Accelerometer Configuration

Question asked by sh.roman on May 8, 2013
Latest reply on May 11, 2013 by baird.hal.001

I'm trying to configure the accelerometer on my stm32f4 discovery board. I lost with all the configuration of LIS302DL and TIM4 (example code) and do I need to configure SPI1 separately???

I simply want to read the Z axe measurements for tilt calculation.
with this configuration:
1./* Set configuration of LIS302DL*/
2.  LIS302DL_InitStruct.Power_Mode = LIS302DL_LOWPOWERMODE_ACTIVE;
3.  LIS302DL_InitStruct.Output_DataRate = LIS302DL_DATARATE_100;
4.  LIS302DL_InitStruct.Axes_Enable = LIS302DL_Z_ENABLE;
5.  LIS302DL_InitStruct.Full_Scale = LIS302DL_FULLSCALE_2_3;
6.  LIS302DL_InitStruct.Self_Test = LIS302DL_SELFTEST_NORMAL;
7.  LIS302DL_Init(&LIS302DL_InitStruct);

How I configure it?