mma6900

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mma6900

1,084 Views
arunkumarg
Contributor II

Hi ,

I am using MMA6900 with freescale microcontroller. During Initialization of the Sensor, i m getting critical exception as the reponse for the register command operation and the response is similar to all the register command operation.

Could you please help me on this ..

0 Kudos
5 Replies

840 Views
voronin_mikhail
Contributor II

Have you solved this problem? I've got almost the same trying work with MMA6900.

1) MOSI: 0x1410;      MISO: 0xEA00;

2) MOSI: 0x2000;      MISO: 0xF281;

3) MOSI: 0x140E;      MISO: 0xEA00;

4) MOSI: 0x3020;      MISO: 0xFA0E;

5) MOSI: 0x1410;      MISO: 0xEA00;

6) MOSI: 0x2000;      MISO: 0xF680;

And then I'm trying to get acceleration value sending 0x4000, as a result get 0xFFFE, a critical exception. How to resolve this internal data error flag(IDE) error that occures in DEVSTAT register. Reset is not working. Help me please.

0 Kudos

840 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Arunkumar,

I assume it is a development issue. After POR, the DEVRES bit will be set in the DEVSTAT register. The bit will only be cleared by setting the CE bit in the DEVCTL register. So after POR, you should read the DEVSTAT register to confirm the DEVRES bit is set and then write to the DEVCTL register to set the CE bit. This will clear the DEVRES bit and the Critical Exception.

I hope it helps.

Best regards,

Tomas

0 Kudos

840 Views
arunkumarg
Contributor II

Hi Tomas,

Thank you for your reply,

After POR ,  Device status is read and CE bit is Set in the DEVCTL register, but still the same critical exception condition persists.

I have tried resetting the device through the DEVCTL register also.

            1. set Register Pointer to "DEVCTL" register
            2. clear "RES1" & "RES0" before triggering "Reset" sequence
            3. start "Reset" sequence :- Set "RES1" & Clear "RES0"
            4. "Reset" sequence :- Set "RES1" & Set "RES0"
            5. "Reset" sequence :- Clear "RES1" & Set "RES0"
            6. In received data for this state, if NO exception is detected then transit to "Init" state
In received data for this state, if NO exception is detected then transit to "Init" state to read the status of the DEVRES bit .

The exception condition is not cleared.

0 Kudos

840 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Arunkumar,

We need to know more to help you further. How many sensors have you tested? Is it one device failing and all others work? Can you post here a SPI data log from the device - MISO and MOSI with a timestamp? And also a scope shot of the SPI signals - just to verify the timing.

Best regards,

Tomas

0 Kudos

840 Views
arunkumarg
Contributor II

Hello Tomas,

 

Greetings for the day,

 

I have tested three sensors, all the three behave similar.

 

Please find the SPI log with time stamp.

Time [s],                  Packet ID, MOSI,    MISO
0.745160592000000,        0,        0x14,    0xEA
0.745172344000000,        0,        0x10,    0x00
0.745859968000000,        1,        0x20,    0xF6
0.745871720000000,        1,        0x00,    0x01
0.746583760000000,        2,        0x14,    0xEA
0.746595504000000,        2,        0x0E,    0x00
0.747309384000000,        3,        0x30,    0xFA
0.747321136000000,        3,        0x20,    0x0E
0.755194464000000,        4,        0x14,    0xFA
0.755206216000000,        4,        0x0E,   0x0E
 

During Initialization state we are neglecting the negative response considering the device response is not stable after reset. In the Self test the initial register command operation is giving a negative response .Because of that , I am not able to proceed.

 

I have skipped Self -Test and started fetching the Acceleration data , the data received is valid as per the look up table provided in the data sheet.

 

Could you please help me on this .

0 Kudos