Skip to main content
Visitor II
May 27, 2024
Question

STM32h745 ADXL355

  • May 27, 2024
  • 3 replies
  • 1134 views

Hi everyone

this is my code for reading X axis ADXL355 accelerometer thanks to STM32h745.

fru999_0-1716812358925.png

But when I run it, i keep being stuck if the HAL-SPIèTransmitReceive

 

Can you help me ?

    This topic has been closed for replies.

    3 replies

    fru999Author
    Visitor II
    May 27, 2024

    My mac delay is now = 100 but 

    I am always is HAL_TIMEOUT I don't understand why

     

    Super User
    May 28, 2024

    Can you post the actual code? In your post, returned value of HAL_SPI_TransmitReceive is not checked.

     

    Super User
    May 29, 2024

    Please use this button to properly post source code - not as an image:

    AndrewNeil_1-1716971934419.png

     

    You also need to show the definitions of your data and addr variables - are you sure they are correct?

    Have you used an oscilloscope to check what's actually happening on the wires?

    Please also post your schematic showing how the ADXL355 is connected. Have you double checked the connections?

    The ADXL355 can operate in either I2C or SPI - are you sure you have it correctly configured?

    https://www.analog.com/en/products/adxl355.html