MMA8541 driver for Linux 3.2?

cancel
Showing results for 
Search instead for 
Did you mean: 

MMA8541 driver for Linux 3.2?

406 Views
clappe
Contributor I

Hi, is there a MMA8541 driver for linux 3.2? In the support section, I only see one for 2.6.35

I've been trying to write a simple test program by following some examples, but whenever I try to read back any register, all I get is 0xFF. I have no problems talking to some other chips on the same i2c bus (rtc), so I think the problem has to do with the repeated-start.

Or, I could just compile in the driver and access it through that.

Thanks for the help!

0 Kudos
1 Reply

43 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Chris,

Yes, the MMA8451Q uses a combined I2C data transfer format and requires a repeated start condition after the second byte (register address).

For instance, a single byte read from the WHO_AM_I register 0x0D looks like this (note that it is for the MMA8652FC I have on my desk):

81392_81392.jpgWho_Am_I+register+read.JPG.jpg

Also make sure that you are using a correct 7-bit slave address, which is either 0x1C (SA0 = 0) or 0x1D (SA0 = 1).

Regarding Linux drivers, I would let others monitoring this forum comment it.

Regards,

Tomas

0 Kudos