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.

ADS1262: SYOCAL1 command does not take effect

Part Number: ADS1262

Step by step I'm trying to take confidence with my ADS1262. Now it's time for SYOCAL1.
- at first, I set Gain & SPS:

ADS126xWriteRegister(MODE2, DR_1200_SPS+GAIN_32);

I read my register and everything is OK


-then I set AIN0+ e AIN1-:

ADS126xWriteRegister(INPMUX,0x01);

-CS and SCLK are LOW:

ADS126xSetCS(0);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_10, GPIO_PIN_RESET);

-Finally I sent SYOCAL1 (0x16) by SPI2

uint8_t reg_address=0x16;
while(hspi2.State == HAL_SPI_STATE_BUSY);
HAL_SPI_Transmit( &hspi2, &reg_address, 1, 0xffff);
HAL_Delay(3000);

Now, if I read the Register Map, I can see all my parameters set correctly, with the exception of OFCAL0-1-2 (0x07-0x08-0x09), all equal to zero.

  • Hi Mario,

    Do you have an oscilloscope capture of this SPI communication?

    Make sure to wait for /DRDY to go low before reading back the OFCAL[0:2] registers. These registers will not be updated before then.
  • I connected my logic analyzer and realized no "0x16" code reach the ADS1262, due a function that set CS High before SYOCAL.

    This is my correct code:

    	set_adc_START(0);
    	HAL_Delay(50);
    
    	uint8_t AdcRegData[ADS126x_NUM_REG];
    
    	ADS126xWriteRegister(MODE1,FILTER_SINC4);
    	ADS126xWriteRegister(MODE2, DR_1200_SPS+GAIN_32);
    	ADS126xWriteRegister(INPMUX,0x01); //Set AIN0+ AIN1-
    	HAL_GPIO_WritePin(GPIOB, GPIO_PIN_15, GPIO_PIN_SET);//trigger for logic analyzer
    	ADS126xSetCS(0); //Set CS LOW
    	HAL_GPIO_WritePin(GPIOB, GPIO_PIN_10, GPIO_PIN_RESET);
    
    	uint8_t reg_address=0x16;
    	HAL_GPIO_WritePin(ADC_START_GPIO_Port, ADC_START_Pin, GPIO_PIN_SET);
    
    	while(hspi2.State == HAL_SPI_STATE_BUSY);
    				HAL_SPI_Transmit( &hspi2,&reg_address, 1, 0xffff);
    				HAL_Delay(300);
    
    	ADS126xReadRegister(ID, ADS126x_NUM_REG, &AdcRegData[0]);//Read ALL registers
    

    Thanks a lot, Christopher!

  • Hi Mario,

    Thanks for letting us know what the issue was and I'm glad to hear that you resolved it!