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.

ADS131A02: ADS131A02-Failed to read ADC conversion data

Part Number: ADS131A02
Other Parts Discussed in Thread: ADS131A04, , ADS131A04EVM

Hi Team,

The customer is experiencing below issue and needs your help.

Code: ADC conversion data read function

void Read_ADC_Data(uint8_t *pBuffer, uint8_t Num_Byte)

{

uint8_t channel_1,channel_2;

uint32_t receive_status;

ADS_DRDY_LOW();

SPI2_CS_LOW();

receive_status =  (uint32_t) ADS131A02_Write_CMD(ADS_CMD_NULL);

pBuffer[0] = (uint8_t ) (receive_status>>24);// 4-byte status response

pBuffer[1] = (uint8_t ) (receive_status>>16);

pBuffer[2] = (uint8_t ) (receive_status>>8);

pBuffer[3] = (uint8_t ) (receive_status&0X0000FFFF);

for(channel_1=4; channel_1<(Num_Byte-4); channel_1++)  pBuffer[channel_1] = SPI2_Write_Read(0X00);

for(channel_2=8; channel_2<Num_Byte; channel_2++)  pBuffer[channel_2] = SPI2_Write_Read(0X00);

delay_ms(1);

SPI2_CS_HIGH();

ADS_DRDY_HIGH();

}

Question: Customer is using a 32-bit data format with CRC and Hamming disabled. After the initialization is completed, the channel conversion data is read. Totally there are12 bytes (4-byte status response, 4-byte channel 1 conversion data, 4-byte channel 2 conversion data). Why is the 4 bytes of the status 0X2274 normal, and the remaining 8 bytes of channel data is 0?

Thanks.

  • Annie,

    I'll need a bit more information to help debug this. It may be helpful for the customer to list the commands used to initialize the device. On top of that, they may want to use a logic analyzer to look at the resulting communication. This would include the SCLK, DIN, and DOUT. The response for each will help show what the device is responding to.

    This device is a bit complicated to use, and the communication must be precise. I would note that to operate the ADS131A04, it does requires some initialization to start conversions. If you look at the ADS131A04EVM (I don't think there is an EVM specific to the ADS131A02), there is a basic startup script. It starts with the following commands:

    UNLOCK

    WAKEUP

    WREG 0F0F (this is to enable all of the ADCs in the device).

    The ADS131A02 will have a similar startup procedure.

    Joseph Wu

  • Annie,

    I haven't heard from you for a while, and I wanted to see if your customer was able to solve the communication problem. I did suggest using the UNLOCK command to get the device started. I also suggested using a logic analyzer or oscilloscope to check the SPI communication.

    I'll close this post for now. However, if your customer continues to have problems, post back and we'll continue to work on this problem.

    Joseph Wu