cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4Discovery LIS302DL or LIS3DSH

jim
Associate II
Posted on January 30, 2014 at 14:47

I've been running the demonstration code and it's been failing in the MEMS selftest.

The function call below puts 0x3F into temp whereas the value in the datasheet and in the function states it should be 0x3B. The value 0x3B is the correct value for the LIS3DSH and in the documentation for the discovery board it say's it can contain either the LIS3DSH or LIS302DL.

LIS302DL_Read(&temp, LIS302DL_WHO_AM_I_ADDR, 1);

This is a bit confusing for a newbie like myself but now I think I've figured out which MEMS chip is on the board the firmware or utilities are related to the LIS302DL. I've been through the data sheets for both and the register address maps are very different. 

So really my question is have I understood this correctly or is it in fact the LIS302DL and I've made a mistake.

If it is the LIS3DSH which I think it is, is there another download I've missed that provides utilities for the LIS3DSH or is it better to write my own driver which will be a good learning exercise anyway, but I would like to know if there is some other reference for it.

Thanks,

Jim.

#stm32f4discovery-lis302dl-lis3ds
4 REPLIES 4
jim
Associate II
Posted on January 31, 2014 at 10:15

For anyone else with a board with the LIS3DSH there are some open source drivers here.

http://www.coocox.org/driver_comp/lis3dsh-c1156.html?mc=1&sc=1

mogy
Associate II
Posted on February 12, 2014 at 06:38

Just what I needed - thanks.

avinashpkrishnan
Associate II
Posted on September 16, 2014 at 07:59

Hi, 

I am a beginner in STM32F4 Discovery. I am using STM32F4 Discovery

MB997C

board. The firmware STM32F4-Discovery_FW_V1.1.0 contains example for LIS320DL. But my board has

LIS3DSH

mems accelerometer. Is there any version of firmware  with

LIS3DSH

examples?

Thanks in advance

Posted on September 18, 2014 at 18:11

Hi Avinash.Punnadiyil,

There is no available STM32F4-Discovery_FW package till now that supports the STM32F4 Discovery MB997C board, embedding the LIS3DSH MEMS accelerometer instead of the LIS302DL one.

Otherwise the

http://www.st.com/web/en/catalog/tools/PF259243#

solution, offers the BSP appropriate drivers and the LIS3DSH accelerometer component that can help you to develop your application based on F4Cube FW.

  • STM32Cube_FW_F4_V1.3.0\Drivers\BSP\Components\lis3dsh\lis3dsh.c|.h
  • STM32Cube_FW_F4_V1.3.0\Drivers\BSP\STM32F4-Discovery\stm32f4_discovery_accelerometer.c|.h
Cheers,

Heisenberg.