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.

ADS122U04: ADC stops sending after a random interval of time

Part Number: ADS122U04

I have the ADS122u04 communicating to a STM32 and this works fine for a while, but after a random amount of time the communication stops, with a UART time out, and I am unable to get anything further from the UART.  Software reset, 0x55 0x06, fails and the only way I can get the board working again is to reload the program.  Attempts to read registers also fails.

Specs:

1.  Running single-shot mode with polling the DRDY flag in register 2.  Seeing that it goes low then high.

2.. Register setting delay of 10uS and reset delay of 100uS.  Communication baud rate is 115200.

3.  Data rate is set to the lowest speed, 20 samples per second in normal mode.

4.  Alternating between two PT100 sensors, switching the data input mux as appropriate.

5.  UART handler on the STM32 is created using STM32Cube so this is likely ok.   I'm using polling without interrupts or DMA.

Any idea as to what could cause the ADS122U04 to stop sending data?

  • Hi Lee,

    Can you please double check your digital timing with a logic analyzer? The possible reason to cause this issue is, you are are sending command/data to the ADC while the ADC is shifting out data or responding the previous command, so the bus is locked.

    Best regards,

    Dale

  • The problem appears to be on the STM side.  A work-around is to reinitialize the LPUART1 on the STM whenever I get a HAL_TIME_OUT.  The question remains, why is this happening?

    As far as I can tell, all communication is half-duplex; transmit a register change, wait 10uS, and then receive.

  • Actually, upon further investigation, the problem is back onto the ADS122U04.  What appears to be happening is that occasionally less than 3 bytes are sent out after RDATA.  The UART on the STM expects 3 bytes and upon receiving less than this the time out flag is set and never gets cleared.  Nothing more gets read.

    Here is psuedo-code of my reading sequence:

    1.  Send the start command

    2.  Wait 10uS

    3.  Poll DRDY in register 2 for DRDY low then high, waiting 10uS after each transmit

    3.  Send RDATA

    4.  wait 10uS

    5.  Read 3 bytes

  • Hi Lee Holeva,

    Your communication baud rate is 115200, so each command (START, RDATA...) will take 8*(1/115200)=86.8us to complete the data transfer. I'm not sure if you checked the UART buffer on your STM32 controller to make sure the buffer had been completely empty before doing next step for reading. I would suggest to change your 10us delay longer (e.g. 10ms) for test purpose.

    Also, this ADC's data rate is only 2ksps, so I would suggest to keep longer time interval for checking the DRDY bit in the CR register in your step 3, frequently reading the register and checking the bit may occupy the bus and cause the bus conflict.

    Can you please let me know your register configuration on the ADC?

    Regards,

    Dale

  • Ok, it appears that the polling of DRDY in register 2 was the cause of the problem.  I replaced the poll operation with a delay for the conversion time and the temperature conversion is now working without any hic-ups.  I kept the register settling delay at 10uS.