2017-07-27 04:23 AM
Hi,
I communicate with ADS1299(24bit, 8CH ADC chip) by SPI.
ADS1299 SPI specification is
CPOL=0 CPHA= 1
Max SCLK = 20MHz
and command flow is
1) send read command(0x12)
2) send dummy(x00) to make SCLK and receive 27 byte data.
unsigned char rdata[27];
unsigned char Dummy_buff[27]={0x00};HAL_SPI_TransmitReceive(&hspi1,Dummy_buff,rdata,27,5000);
The error is occurring ♯ 4,7,10,13,16,19,22,25 bytes LSB bit.
For example,
ADS1299 send 0xC0 0x00 0x00 0x45 0x20 0xD0 0x00 0x00 0x00 ......... 0x00(27th byte)
STM32 SPI receive
0xC0 0x00 0x00 0x44 0x20 0xD0 0x01 0x00 0x00 ......... 0x00(27th byte)
The 4th and 7th byte change or not change randomly.......
I check ADS1299 output data using logic analyzer. MISO data is fine.
Do you have any idea or tip to solve this problem?
I attach my code and sreenshot.
#stm32 #spiSolved! Go to Solution.
2017-07-27 04:34 AM
See erratum titled Corrupted last bit of data and/or CRC, received in Master mode with delayed SCK feedback
JW
2017-07-27 04:34 AM
See erratum titled Corrupted last bit of data and/or CRC, received in Master mode with delayed SCK feedback
JW
2017-07-27 07:51 AM
Thank you
Waclawek.Jan
I solve the problem by you answer.