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.

ADS1259: wrong CONFIG0 data

Part Number: ADS1259

Hello.

Project details:

STM32L4 MCU

ADS1259 using Internal oscillator

SPI seems to be working. I am able to read registers but CONFIG0 contains 0x25(00100101) instead of expected 10XX0101.

If i write 00000100 to CONFIG0 i read back 00100100.

All other registers contains valid data.

Varying SPI baud rate in range from 625kbit/s to 5mbit/s does not affect problem.

Received data corresponds to DOUT waveform on oscilloscope.

HAL_Delay(1000);//wait 1000ms
HAL_GPIO_WritePin(START_GPIO_Port, START_Pin, GPIO_PIN_RESET);//START pin - low
HAL_GPIO_WritePin(RST_GPIO_Port, RST_Pin, GPIO_PIN_SET);//RESET pin - high
HAL_GPIO_WritePin(SPI1_CS_GPIO_Port, SPI1_CS_Pin, GPIO_PIN_SET);//CS pin - high
HAL_Delay(100);//wait 100ms
HAL_GPIO_WritePin(SPI1_CS_GPIO_Port, SPI1_CS_Pin, GPIO_PIN_RESET);//CS pin - low
HAL_Delay(100);//wait 100ms

TxBuf[0]=0x11;
HAL_SPI_Transmit(&hspi1, (uint8_t*)TxBuf, 1, 5000);//transmit SDATAC command
TxBuf[0]=0x40+0x00;
TxBuf[1]=0x00;
TxBuf[2]=0b00000100;
HAL_SPI_Transmit(&hspi1, (uint8_t*)TxBuf, 3, 5000);//write 1 byte at address 0x00
TxBuf[0]=0x20+0x00;
TxBuf[1]=0x08;
HAL_SPI_Transmit(&hspi1, (uint8_t*)TxBuf, 2, 5000);//RREG 9 bytes starting from 0x00 
HAL_SPI_Receive(&hspi1, (uint8_t*)RxBuf, 9, 5000);//read 9 registers

Thank you in advance.