2024-05-27 05:20 AM
Hi everyone
this is my code for reading X axis ADXL355 accelerometer thanks to STM32h745.
But when I run it, i keep being stuck if the HAL-SPIèTransmitReceive
Can you help me ?
2024-05-27 06:27 AM
My mac delay is now = 100 but
I am always is HAL_TIMEOUT I don't understand why
2024-05-27 05:31 PM - edited 2024-05-27 05:32 PM
Can you post the actual code? In your post, returned value of HAL_SPI_TransmitReceive is not checked.
2024-05-29 01:47 AM
Please use this button to properly post source code - not as an image:
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