cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4Discovery MEMS example won't output values

jim
Associate II
Posted on January 28, 2014 at 21:37

I'm running the MEMs example from

STM32F4-Discovery_FW_V1.1.0\Project\Peripheral_Examples\MEMS

using uVision / MDK-ARM and I'm not getting any changing values when the read function is being called on the SysTick interrupt. I am waving it around and tapping on it but not getting anything.

LIS302DL_Read(Buffer, LIS302DL_OUT_X_ADDR, 6);

printf(''values : %d %d\n'', Buffer[0], Buffer[2]);

values : 171 198

0xAB, 0xC6

These are the values that come through all the time. I've stepped into 

LIS302DL_Init

and 

LIS302DL_LowLevel_Init

but there's not conditional or information on how to see if it's failed. I have two of these board so I also tested on another board and it's the same. I think when I first got the board this was the application running on it so I don't think there is a hardware issue. 

Thanks,

Jim.

#stm32f4discovery-mems
4 REPLIES 4
tinymanta
Associate II
Posted on March 13, 2014 at 12:30

Hi Jim,

I've tested this application available under:

STM32F4-Discovery_FW_V1.1.0\Project\Peripheral_Examples\MEMS

the discribed issue is not detected. Just follow the following steps:

View menu - Watch Windows - Watch 1

View menu - Periodic Window Update (Should be enabled)

and try to view the Buffer[] variable content (see attached file)

Values are changing when moving the board embedding the MEMSaccelerometer.

With regards,

MPTun

________________

Attachments :

KEIL_Live_Watch.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0gt&d=%2Fa%2F0X0000000bck%2F4CvIJlgSAEl0vJQA4UPTd9QLociPNwPw1bbj8ImVfPQ&asPdf=false
Posted on March 13, 2014 at 13:14

!me

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Amel NASRI
ST Employee
Posted on March 13, 2014 at 13:55

Clive2 & Jim,

I assume you are using different boards' revisions.

There should be an issue when using revC (wrong driver used in the library).

This issue was fixed in the STM32CubeF4 within the STM32F4-Discovery demonstration.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

tinymanta
Associate II
Posted on March 13, 2014 at 15:13

Jim,

Are using the STM32F4-Discovery RevC board ??

The RevC does not embedd the LIS302DL MEMS accelerometer :\