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.

ADS1261: Communication issue while reading data; The LSB of the conversion result always returns 0xFF

Part Number: ADS1261


Hi all,

I wrote a piece of code to read out the ADS1261 data.

The send data via SPI is 0x12 0x02 0x00 0x00 0x00 0x00 0x00

the response data is 0xFF 0x08 0x03 0x11 0x88 0xFF 0x00, while the sixth byte should be LSB of conversion result. but I read out many times. the LSB alaway been 0xFF while the MSB and MID can change accordingly.

BTW. I tried to send out 6 Bytes each time as datasheet decribed, but cannot start conversion continously. when I send 7  Bytes, it works.

The registor read out data is 

0x81 0x01 0x04 0x01 0x00 0x00 0x05 0x00 0x00 0x00 0x00 0x00 0x40 0xFF 0x00 0x00 0x80 0xBB 0x00

Could anyone help me to solve this problem?

BR.

Hang Li.

uint32_t ADS1261_Read_Data()
{
uint32_t ADC_Data_Temp = 0;
ADC_Start;
while( HAL_GPIO_ReadPin(AD_DRDY_GPIO_Port, AD_DRDY_Pin)) {}
g_aSPI1_TxBuf[0] = 0x12;
g_aSPI1_TxBuf[1] = 0x02;
g_aSPI1_TxBuf[2] = 0x00;
g_aSPI1_TxBuf[3] = 0x00;
g_aSPI1_TxBuf[4] = 0x00;
g_aSPI1_TxBuf[5] = 0x00;
g_aSPI1_TxBuf[6] = 0x00;
MX_SPI1_TxRxData(g_aSPI1_TxBuf, g_aSPI1_RxBuf, 7);
ADC_Result_Temp[0]=g_aSPI1_RxBuf[3];
ADC_Result_Temp[1]=g_aSPI1_RxBuf[4];
ADC_Result_Temp[2]=g_aSPI1_RxBuf[5];
ADC_Result_Temp[3]=g_aSPI1_RxBuf[6];
ADC_Data_Temp = g_aSPI1_RxBuf[5] + (g_aSPI1_RxBuf[4] *0x100) +(g_aSPI1_RxBuf[3] * 0x10000);
return ADC_Data_Temp;
}

  • Already solved, Thanks.
  • Hi Hang Lee,

    Welcome to the TI E2E Forums!

    I'm glad to hear you were able to resolve your issue!

    If you run into a similar issues again, just keep in mind that the ADS1261 always responds with 0xFF when it is expecting a new command (in some infrequent cases 0xFF may also be a CRC byte), and then the device echoes back the command it received.

    In your case, it looks like the SPI mode may not have been configured for CPOL = 0, CPHA = 1, since the echoed back command didn't match the command you had sent.

    Let us know if you have any additional questions.

    Best regards,
    Chris