Other Parts Discussed in Thread: ADS1248
Hi Forum,
We have been using ads1248 with stm32 for 4 wire RTD measurement application. With the new design, we changed the ads1248 to ads124s08 and stm32 to stm32 different package. We have 14 ads124s08 in one board each 7 is connected with one SPI.
Now I am facing a problem that is DRDY pin never goes low. Below things are working though.
1. Able to communicate with the ads124s08.
2. Able to read and write registers as per design requirements
From the datasheet I understand DRDY must be low the moment RESET pin is help high along with START pin.
Here below my initialization code for ads124s08.
void ADS124s08_Initialize(void) { uint8_t i, j, adcchannelnumber; /* clear buffers */ for(j = eADC1; j < TotalNumberofADCs; j++) { for(i = 0; i < eTotalNumberOfRegADS124s08; i++) { ads124s08_register_data[j][i] = 0; } } for(i = 0; i < eTotalNumberOfRegADS124s08; i++) { ads124s08Registers[i] = 0; } for(i = 0; i < MAX_NO_OF_RTDs; i++) { ads124s08_raw_data[i] = 0; ads124s08_programmable_gain[i] = PGA_4; ads124s08_sample_rate[i] = DOR_400_0SPS; } for(channel = eADC1; channel < TotalNumberofADCs; channel ++) // START pin held high { HAL_GPIO_WritePin(ADS_START[channel].port, ADS_START[channel].pin, GPIO_PIN_SET); } ADS124s08_DeselectAll(); // All chip select help high for(j = eADC1; j < TotalNumberofADCs; j++) //Given a RESET to all ads124s08 { HAL_GPIO_WritePin(ADS_RESET[j].port, ADS_RESET[j].pin, GPIO_PIN_RESET); DelayMs(2); HAL_GPIO_WritePin(ADS_RESET[j].port, ADS_RESET[j].pin, GPIO_PIN_SET); } DelayMs(2); ADS124s08_reset_status_reg(); // Clear POR flag in status register __NOP(); for (adcchannelnumber = eADC1; adcchannelnumber < TotalNumberofADCs; adcchannelnumber ++) //Set registers { /* Set ADC for next MUX channel */ ADS124s08_Sensor_Set(kADCMuxChannelTable[adcchannelnumber][0], DEFAULT_EXC); __NOP(); } ADS124s08_ReadRegisters(eADC1); ADS124s08_ReadRegisters(eADC2); ADS124s08_ReadRegisters(eADC3); ADS124s08_ReadRegisters(eADC4); }