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.

  • TI Thinks Resolved

ADS1299: Problem with Data Acquisition and SPI

Prodigy 30 points

Replies: 3

Views: 40

Part Number: ADS1299

Hello

I'm working in a project and I'm using the ADS1299 connected to microcontroller STM32WB55.Data is acquired with the ADS1299, this data is sent to the micrcontroller through the SPI bus and then, the micrcontroller sends the data through UART bus to a computer. To test the ADS1299 I use a 300 mV 10Hz sinusoidal wave, before getting data from an electrode. The problem is that when capturing data there are some data whose values are not the correct values, and the rest of data have the correct value. As a result, when I print the acquired data results like the image below:

In addition, when I use the internal test signal of the ADS1299 the acquired data seems to be also OK.

I also have checked the SPI communication with a logic analyzer and the communication seems to be OK, so I don't know if the problem comes from the communication or from the data acquisition. Here is a screenshoot of the SPI communication. The UART bus works perfectly. It has been tested independently.

The ADS1299 is configured this way:

CONFIG1 = 0xD6

CONFIG2 = 0xD5

CONFIG3 = 0xE0

CHnSET = 0x00

The other registers have the reset value.

My c code to read de MISO line is the code below. Lectura is an array to store the received data.

LL_SPI_Enable(SPI1);

HAL_GPIO_WritePin(GPIOA, CHIP_SELECT__Pin, GPIO_PIN_RESET);

for (unsigned int j=0; j<27; j+=4){

LL_SPI_TransmitData8(SPI1, 0x00);

LL_SPI_TransmitData8(SPI1, 0x00);

LL_SPI_TransmitData8(SPI1, 0x00);

LL_SPI_TransmitData8(SPI1, 0x00);

lectura[j] = SPI1->DR;

lectura[j+1] = SPI1->DR;

lectura[j+2] = SPI1->DR;

lectura[j+3] = SPI1->DR;

}

HAL_GPIO_WritePin(GPIOA, CHIP_SELECT__Pin, GPIO_PIN_SET);

LL_SPI_Disable(SPI1);

 

Does anybody know why this ADS1299 behavior is happening? Is this behavior related to the ADS1299 and the SPI communication or is it a problem of the microcontroller and how the data is stored?

If anybody need more information about the projecte, let me know and i'll post it.

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.