1
\$\begingroup\$

I'm working with the board STM32F4DISCOVERY from ST microcontrollers. I'm trying to read acceleration on the 3 axes from the accelerometer LIS3DSH via I2C communication. The code is working on one board, but on another one, I constantly read the same constant values, even though I'm moving the accelerometer (turning it around, for instance). Does that mean that the accelerometer does not work properly ? Is it possible that the component have been damaged by a connection to an external supply voltage of 5V on the STM board ? If not damaged, is there a way to reset the module and get the corrrect values ? (datasheet of the component) Thanks in advance

\$\endgroup\$
  • \$\begingroup\$ Double check that both of your STM32 Discovery boards have the LIS3DSH. The board can come with the LIS3DSH OR the LIS302DL. It looks like those two chips are not interchangeable from my brief look at the datasheets. It's in the middle of the "Key Features" section here: st.com/en/evaluation-tools/stm32f4discovery.html \$\endgroup\$ – CHendrix Jan 17 '17 at 12:49
  • \$\begingroup\$ I have to add that it was working and that I plugged in a UART-USB converter, and specifically the pins GND and 5V of the converter to the GND and VCC pins of the board respectively. I'm affraid that the 5V voltage output of the converter damaged the accelerometer. In any case, the device is the LIS3DSH, because I'm getting the value 0b00111111 from the register WHO_AM_I. \$\endgroup\$ – Armand Chocron Jan 17 '17 at 13:03
  • \$\begingroup\$ It depends on where exactly you connected the UART-USB converter and what else was connected at the time. The datasheet on the LIS3DSH specifies an absolute max of 4.8V on any of the I/O pins. You may or may not have damaged something. Have you tried going to back to the exact configuration when it worked? \$\endgroup\$ – CHendrix Jan 17 '17 at 13:12
  • \$\begingroup\$ Yes, I don't think that I damaged anything because now I connected back the other board (which worked before) and the same issue occures... \$\endgroup\$ – Armand Chocron Jan 17 '17 at 13:33
  • \$\begingroup\$ Double check your code. Sounds like something changed. \$\endgroup\$ – CHendrix Jan 17 '17 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.