This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AFE031 programming

Other Parts Discussed in Thread: AFE031

I’m trying to program the AFE031 Analog Frontend with a F28069 Microcontroller. Unfortunately there is some information missing about SPI programming in the AFE031 datasheet.

Maybe somebody has already  experience in programming the AFE031?

It is written in the datasheet that a host SPI frame consists of a R/W bit, a 6-bit register address, and eight data bits.

First question: Is the following assumption correct?

R/W bit =1 performs Write Operation

R/W bit = 0 performs Read Operation

Second question: Each frame contains of 8 data bits. To write date to a AFE031 register do I have to transmit the MSB or the LSB first?

  • Hello 1890129,

    Your assumption is incorrect, table 8 (pag. 35) of the datasheet specifies that read is indicated by shifting a 1 whereas writing is indicated by shifting a 0. See the image below:

    For every SPI operation on the AFE031 the first bit that is shifted in the time domain into DIN (pin 4) is the MSB. Similarly, the first bit that is shifted out of DOUT (pin 5) is the MSB. For every write operation performed, the first bit asserted onto the MOSI line (DIN, pin 4) will be a zero. Similarly, For every read operation performed, the first bit asserted onto the MOSI line (DIN, pin 4) will be a one.

    Best regards,

    Jose

  • One thing that confused me about the document is that the SPI frame is listed as:

    1x R/W Bit
    + 6x Address Bits
    + 8x Data Bits
    ---------------------------
    = 15 Bits Total

    Shouldn't the address bit count be 7? The tables seem to show this correctly.

  • Hello Rowan Doherty,

    Indeed, the table is correct. The address bit count is 7; thanks for pointing that out.

    Best regards,

    Jose