Other Parts Discussed in Thread: ADS131E08
Hi,
I am using ADS131E06 on stm32f4 microcontroller. After sending RESET to ADS131E06, ADC is initialized to 1K data sampling rate. But some time during powering up power adc sets default baud rate to 32k.
Here is my code
#define ADC_CMD_DELAY 10 #define ADC_SPI_DELAY 5 tx[0]=ADS_CMD_RESET; HAL_GPIO_WritePin(ADC_CS1_GPIO_Port,ADC_CS1_Pin,GPIO_PIN_RESET); HAL_Delay(ADC_CMD_DELAY*10); tx[0]=ADS_CMD_SDATAC; tx[1]=ADS_CMD_WCONFIG1; tx[2]=0; tx[3]=0x90|CMD_MULT_RD|DATA_1K; tx[4]=ADS_CMD_WCONFIG2; tx[5]=0; tx[6]=0xE0; tx[7]=ADS_CMD_WCONFIG3; tx[8]=0; tx[9]=0xE0; tx[10]=ADS_CMD_WCH1SET; tx[11]=0; tx[12]=gain; tx[13]=ADS_CMD_WCH2SET; tx[14]=0; tx[15]=gain; tx[16]=ADS_CMD_WCH3SET; tx[17]=0; tx[18]=gain; tx[19]=ADS_CMD_WCH4SET; tx[20]=0; tx[21]=gain; tx[22]=ADS_CMD_WCH5SET; tx[23]=0; tx[24]=gain; tx[25]=ADS_CMD_WCH6SET; tx[26]=0; tx[27]=gain; tx[28]=ADS_CMD_WCH7SET; tx[29]=0; tx[30]=gain; tx[31]=ADS_CMD_WCH8SET; tx[32]=0; tx[33]=gain; for(tmp=0;tmp<=33;tmp++){ HAL_SPI_TransmitReceive(&hspi2, data, rx, 1, ADC_SPI_DELAY); delay_ms(10); } HAL_Delay(ADC_CMD_DELAY); HAL_GPIO_WritePin(ADC_CS1_GPIO_Port,ADC_CS1_Pin,GPIO_PIN_SET);
Can anyone tell me the reason? in which condition. It will sets its baud rate to 32K baud.
Thanks & Regards,