Post Go back to editing

AD7134 SPI registers and ODR

Regarding spi registers and the AD7134 data sheet:

  • I'm trying to figure out how to modify the ADC conversion rate
  • It seems that right now the existing no-os code is converting at about a 10-11 kHz rate.  I've connected a 1kHz sin wave on the input and I'm getting about 11 unique values per cycle

  • I want to convert at a much higher rate, so I'm trying to figure out which SPI registers need to change in order to do so
  • Reading the data sheet, it seems that the ODR registers (0x16 - 0x1C) will control the output data rate
  • When I try to change these values using a spi write and spi read command, nothing changes.  I still read back the default value...

  • I did verify that both of these commands work properly by writing and reading the SCRATCH_PAD register (0x0A)
  • I also tried setting the MASTER_SLAVE_TX_BIT beforehand but same result

Thanks.

Parents
  • After setting the ODR_VAL_INT_x And the MASTER_SLAVE_TX_BIT, can you do a readback and see if the MASTER_SLAVE_TX_BIT was cleared?

    Also, are you setting the ODR_RATE_SEL_CHx for your specific channel?

  • I solved the write to ODR registers by a continual loop that sets the MASTER_SLAVE_TX_BIT, then checks the value, then writes again if it hasn't changed.  This seems flukey but it works for now.  Please provide a detailed procedure for the proper method.

    Regarding the ODR_RATE_SEL_CHx , I'm leaving them all at the default value of 0x0.

    Now I'm running into a different problem.  I am able to set the ODR to 750kHz rate, but the ADC is only sampling a few times each cycle.  I'm only getting back about 10 samples instead of around 750.

  • Hello,

    The correct way to change the ODR should be to first write registers 0x16 to 0x1C with the desired values and then writing 1 to the 0xF register. This should update the data rate.

    Is the ODR changed correctly when you do it like this? If you are using the example on github then you should see the ODR increase. 

    Regards,
    Andrei

Reply Children