Issue in spi 24-bit read and write operation

218 views Asked by At

I have interfaced a sensor to my imx6 processor which has a linux kernel. I am using spi protocol. the driver code for spi operation i am using is this_link . But my sensor registers are of 24-bits. I am trying to use the same code for reading and writing data to my sensors. I am not getting the proper values after reading. I have written a value of 6000 into a register then when i am trying to read it, i got a value 16777215 (i.e. all 3bytes are high). Can anyone please let me know where i am going wrong? And could anyone tell me how can i check what data is written in the registers other that using read()?

Regards,

Sathya Prasad P

0

There are 0 answers