cancel
Showing results for 
Search instead for 
Did you mean: 

STM32h745 ADXL355

fru999
Associate III

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 ?

3 REPLIES 3
fru999
Associate III

My mac delay is now = 100 but 

I am always is HAL_TIMEOUT I don't understand why

 

Pavel A.
Evangelist III

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

 

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