AnsweredAssumed Answered

ADXL345 multi-byte read doesnt work

Question asked by pentelone on Feb 26, 2013

Hello everone,

i try to read values form ADXL345 in multi byte transmision.

Before reading i write some values to  ADXL345s registers and verify if they are correct. Next i try to read registers :

as i undarstand from datasheet (rev.c.) to read multiple byte i must set R value as high and MB high pass the address of register and then set 8 clock pulses to indicate next register so here's the code:

 

ADXL345_SELECT();

SSIDataPut(SSI0_BASE, 0xC000 | (reg<<8));

SSIDataGet(SSI0_BASE,&get_data);

SSIDataPut(SSI0_BASE,0x00);

SSIDataGet(SSI0_BASE,&get_data);

 

SSIDataPut(SSI0_BASE,0x00);

SSIDataGet(SSI0_BASE,&get_data);

ADXL345_DESELECT();

 

so the result is that i've got the same value during reading ADXL345's registers. uC is Stellaris LM4F120

 

Could you point me where is the problem ?

 

 

 

 

Outcomes