AnsweredAssumed Answered

SPI write problems on an own reflown FXOS8700

Question asked by Hans-Henrik Fuxelius on Sep 4, 2017
Latest reply on Sep 5, 2017 by Hans-Henrik Fuxelius

I have reflowed an FXOS8700 to my own development card as an breakout to be able to use it in a project. I am now unsure if it works proper or not.

 

 

Is the possibility to read but not write a sign of a burnt FXOS8700 in the reflow process????

 

 

SPI setting are CPOL=0 and CPHA=0:

 

I have no problem to read from an address, but problem to read back what was written.

 

This is my sequence of SPI commands:

 

    // WHO AM I
    SPI_ReadFXOS(WHO_AM_I, rbuf, 1);
    sprintf_P(buffer_0, PSTR("\r\n::WHO AM I = 0x%X\r\n\r\n"), rbuf[0]);
    uart_puts(buffer_0);

=> 0xC7

 

    // Temperature
    SPI_ReadFXOS(TEMP, rbuf, 1);
    sprintf_P(buffer_0, PSTR("\r\n::TEMP = %i\r\n\r\n"), rbuf[0]);
    uart_puts(buffer_0);

=> 21

 

Both above works as aspected!!!!

 

    // Acc + Mag TEST
    SPI_WriteFXOS(CTRL_REG1, 0x00);        // Set to standby mode
    SPI_ReadFXOS(CTRL_REG1, rbuf, 1);
    sprintf_P(buffer_0, PSTR("\r\n::CTRL_REG1 = 0x%X\r\n\r\n"), rbuf[0]);
    uart_puts(buffer_0);

 

    SPI_WriteFXOS(M_CTRL_REG1, 0x1F);    // 200 Hz hybrid mode
    SPI_ReadFXOS(M_CTRL_REG1, rbuf, 1);
    sprintf_P(buffer_0, PSTR("\r\n::M_CTRL_REG1 = 0x%X\r\n\r\n"), rbuf[0]);
    uart_puts(buffer_0);

=> 0x00

 

Writing to M_CTRL_REG1 does not work but gives 0x00 back ......

Outcomes