ADS124S06: Unable to communicate

Part Number: ADS124S06

Tool/software:

Hello everyone,

I'm working on a custom board that uses the ADS124S06 but I'm unable to communicate.

I've checked SPI CS/DIN/SCLK signals and it looks just fine despite that I'm unable to see any data in DOUT.

I guess timigs are ok, spi clock is 1MHz and CS delay is ~1us

I'm using my own driver, wrote following the user manual:

void ADS124S0X_send_read_command(void* spi, uint8_t start_adr, void* dest, uint8_t length)
{
  if(length == 0)
    return;

  uint8_t *p8_dest = (uint8_t*)dest;
  hal_spi_channel_t* hal_spi = (hal_spi_channel_t*)spi;
  hal_spi_result_t result = HAL_SPI_RESULT_OK;

  uint8_t command = CMD_RREG | (start_adr & 0x1F);
  uint8_t len = (length - 1) & 0x1F;

  HAL_SPI_Enable_slave(hal_spi);  

  HAL_SPI_exchange_byte(hal_spi, command, NULL);
  HAL_SPI_exchange_byte(hal_spi, len, NULL);

  while(length-- && result == HAL_SPI_RESULT_OK)
  {
    result = HAL_SPI_exchange_byte(hal_spi, 0, p8_dest);
    p8_dest++;
  }

  HAL_SPI_Disable_slave(hal_spi);
}

void ADS124S0X_send_write_command(void* spi, uint8_t start_adr, void* src, uint8_t length)
{
  if(length == 0)
    return;

  uint8_t *p8_src = (uint8_t*)src;
  hal_spi_channel_t* hal_spi = (hal_spi_channel_t*)spi;
  hal_spi_result_t result = HAL_SPI_RESULT_OK;

  uint8_t command = CMD_WREG | (start_adr & 0x1F);
  uint8_t len = (length - 1) & 0x1F;

  HAL_SPI_Enable_slave(hal_spi);  

  HAL_SPI_exchange_byte(hal_spi, command, NULL);
  HAL_SPI_exchange_byte(hal_spi, len, NULL);

  while(length-- && result == HAL_SPI_RESULT_OK)
  {
    result = HAL_SPI_exchange_byte(hal_spi, *p8_src, p8_src);
    p8_src++;
  }

  HAL_SPI_Disable_slave(hal_spi);
}

#define ID_ADS124S06 (0x01)
uint8_t AD124S0X_Init(void* hal_spi)
{
  uint8_t ads124s0x_id = 0;
  ADS124S0X_send_read_command(hal_spi, 0x00, &ads124s0x_id, 1);

  if(ads124s0x_id != ID_ADS124S06)
    return 1;
    
  return 0;
}

  • Hi Lorenzo Mariotti,

    Are you getting any data on DOUT? For example, if you read a register, are you getting the correct value?

    Can you provide logic analyzer captures showing the data communication? Please include CS, SCLK, DIN, DOUT, and DRDY so we can review

    -Bryan

  • Hi Bryan,

    DOUT stay fixed low, I’ve tried to read single register but nothing on DOUT line. 
    I’m sure that SPI is working fine because in the same bus there are 3 DACs that works just fine.

    I’ll try to share scope screen asap, but I’ve only 4 probes Sweat smile, is the DRDY really necessary?

    Thanks for your support

  • Hi Lorenzo Mariotti,

    This will be much easier with a logic analyzer, but a scope will also work. And yes for now you can omit DRDY, especially if you are not getting any response from the ADC i.e. this doesn't sound like an output data issue, it sounds like a larger issue with the ADC

    If you power up the ADC and pull the START pin high, you should be able to probe the dedicated DRDY pin and see this pin toggling at the default data rate (20SPS, or 50ms). If you do not see this behavior then you have a power supply, clocking, or grounding issue. 

    -Bryan