AnsweredAssumed Answered

MMA68xx initialization

Question asked by Steven Burck on Nov 14, 2012
Latest reply on May 5, 2015 by Anand Ritesh

I'm a software engineer working with a hardware engineer and firmware engineer, and we are adding an MMA68xx to a product.  The firmware engineer is doing the SPI via an FPGA, I'm writing via registers to the device - and we're trying to see why the response is always "Internal error/SPI error.".  I expect it is that I'm not properly bringing the device up, but there's plenty to go wrong at the firmware level, too, so I wanted to make sure.  I've searched for sample code, couldn't find any, so figured I'll ask here:

 

What I have done for initialization is sent the following 4 words:

 

0x4B10 - (write to DEVCFG register the value 0x10, meaning unsigned data and no arming).

0x4C00 - write to DEVCFG_X to use minimal filters and not in self-test

0xCD00 - same to DEVCFG_Y

0xCB30 - end initialization

 

Then, all the time, send 0x2005 and 0x6004 to get X and Y results.  What I get back, as I said earlier, is 0x1C00, which is "Internal error/SPI error."  Now, the datasheet says that this can come for a huge number of reasons - so I'm curious if there is a detailed description of the initialization process anywhere?

 

Thanks in advance,

 

Steve

Outcomes