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.

ADS131M02: receive wrong register data

Part Number: ADS131M02

Hello.

I'm using ADS131M02 to convert photo diode's value with raspberry pi 4B+.

When read CLOCK register, Response data is 0x030E. That is default value.

And write CLOCK register that data is 0x030A, Response data is 0x4180. It also right.

But read CLOCK register again, Response data is 0x0264.

What's problem?

if __name__ == "__main__":

    ad_rst.off()
    ad_rst.on()

    spi = spidev.SpiDev()

    spi.open(0, 0)
    spi.max_speed_hz = 50000
    #spi.max_speed_hz = 8192000
    #spi.max_speed_hz = 1000000
    spi.mode = 0b01
    
    tmp = [0xA1,0x80]
    crcr = calCRC16(tmp,0,2)
    crcr1 = (crcr&0xFF00)>>8
    crcr2 = crcr&0x00FF
    tmp.extend([crcr1,crcr2])
    spi.xfer(tmp)
    rrr = spi.readbytes(24)
    print(rrr)

    tmp = [0x61,0x80,0x03,0x0A]
    crcr = calCRC16(tmp,0,4)
    crcr1 = (crcr&0xFF00)>>8
    crcr2 = crcr&0x00FF
    tmp.extend([crcr1,crcr2])
    spi.xfer(tmp)
    rrr = spi.readbytes(24)
    print(rrr)

    tmp = [0xA1,0x80]
    crcr = calCRC16(tmp,0,2)
    crcr1 = (crcr&0xFF00)>>8
    crcr2 = crcr&0x00FF
    tmp.extend([crcr1,crcr2])
    spi.xfer(tmp)
    rrr = spi.readbytes(24)
    print(rrr)