2023-05-23 10:59 AM - edited 2023-11-20 04:46 AM
Hi,
I'm trying to get the LIS2HH12 accelerometer to work via SPI. The message I'm sending seems correct to me, and all the timings are within the minimum and maximum specifications that I have found in the datasheet. I have tried multiple SPI configurations without much luck. Below is what I get on the my logic analyzer.
I have managed to talk to this exact chip on this board via I2C via bodge wires. The SPI driver I'm using is part of TI-RTOS.
Solved! Go to Solution.
2023-05-25 04:56 AM
Hi @TSnym.2 ,
Welcome to ST Community :)
The single SPI read is performed with 16 clock pulses with low CS signal.
In the image there is one pulse of CS then the first byte transmitted, try to avoid it.
Check the SPI configuration it should be:
If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Select as Best" button, this can be helpful for Community users to find this solution faster.
2023-05-25 04:56 AM
Hi @TSnym.2 ,
Welcome to ST Community :)
The single SPI read is performed with 16 clock pulses with low CS signal.
In the image there is one pulse of CS then the first byte transmitted, try to avoid it.
Check the SPI configuration it should be:
If this solves your problem, please mark my answer as "Best Answer" by clicking on the "Select as Best" button, this can be helpful for Community users to find this solution faster.
2023-05-31 05:35 AM
Hi Federica,
Thank you for the response. I can confirm that little bump on the chip select line between the two bytes does cause a problem. I'm not sure why the TI-RTOS SPI driver does that. I fixed it by just taking manual control of the the CS line.