Post Go back to editing

EVAL-AD7124-8-PMDZ with STM32L552ZET

Category: Hardware

Hello everyone!

I'm using the EVAL-AD7124-8-PMDZ with an STM32L552ZET Nucleo Board. I've used the code from https://github.com/analogdevicesinc/no-OS/tree/main/projects/ad7124-8pmdz and adapted the code to work with the boards SPI connection. Basically the SPI connection is working, I can alter channel setup, power mode, etc. I'm using the standard settings of the device, with channel 0 enabled and continuous conversion.

With a timer I'm trying to obtain the values from the ADC with 100 Hz. However, the sampling only works for the first time. When trying to obtain a sample for the second time, nothing happens. While debugging I found that that during the function call of "ad7124_wait_for_conv_ready" the RDY bit in the register is not reset. I have tried different conversion and power modes which also didn't help.

Could provide help regarding issues which can cause this behaviour?

I have connected P1 according to https://wiki.analog.com/resources/eval/user-guides/circuits-from-the-lab/eval-ad7124-8-pmdz and the voltage is 3.3V from the Nucleo board.

Thanks,

Jakob

  • Hi ,

    Assuming SPI connections are correct, I could try to help but it's pretty difficult without having your hardware.

    So the main issue seems to be the fact that you observe that the nRDY bit doesn't go to zero after the first successful conversion.

    1. Double check the conversion mode, maybe it's not continuous, maybe it's single shot.

    2. Are you sure you're reading the data register ? Do you get meaningful data on first sample ?

    3. Review the gain/filter settings, perhaps don't touch them, leave them as default after a reset and test like that just to be sure.

    4. Make sure ODR is not set too low. It could be that you're sampling faster than it converts due to ODR settings.

    5. Use the nRDY pin and monitor it with an oscilloscope/logic analyzer to see if you only have 1 spike or more.

    I'm kind of shooting in the dark here but hope this helps.