Other Parts Discussed in Thread: HALCOGEN
Tool/software: Code Composer Studio
Hello everyone,
I have been trying to interface accelerometer ADXL345 ( https://www.analog.com/media/en/technical-documentation/data-sheets/ADXL345.pdf ) with RM46L852 controller ( http://www.ti.com/lit/ds/spns185c/spns185c.pdf ) using SPI communication (SPI4) for acquiring the accelerometer data from ADXL345. I am using HALCoGen to generate the SPI driver. Code Composer Studio (CCS) is used.
The results that are obtained are inconsistent and it picks up negative values when I place the accelerometer in positive Z axis.
Please help me in this regard. Thank you.
The code in CCS is as follows:
The HALCoGen settings for the SPI4 driver is as follows: