Hi,
I would like to check & review the circuit and code as to ADS7953,
the issue is,
if trying to read continuously the data of channels in the same IC,some data is not correct,
please help to review it,
memset(SPI2_RX0, 0, sizeof(SPI2_RX0));
SPI2_LS1_ManulMode(spi2_cmd0,SPI2_RX0);
Hal_DebugPrint("ADS7953 CH0 data is ");
Hal_DebugPrint("LS1: 0x%02x%02x ",SPI2_RX0[1],SPI2_RX0[0]);
Hal_DebugPrint("\r\n");
memset(SPI2_RX0, 0, sizeof(SPI2_RX0));
SPI2_LS2_ManulMode(spi2_cmd0,SPI2_RX0);
Hal_DebugPrint("ADS7953 CH0 data is ");
Hal_DebugPrint("LS2: 0x%02x%02x ",SPI2_RX0[1],SPI2_RX0[0]);
Hal_DebugPrint("\r\n");
// memset(SPI2_RX1, 0, sizeof(SPI2_RX1));
// SPI2_LS2_ManulMode(spi2_cmd1,SPI2_RX1);
// Hal_DebugPrint("ADS7953 CH1 data is ");
// Hal_DebugPrint("LS2: 0x%02x%02x ",SPI2_RX1[1],SPI2_RX1[0]);
// Hal_DebugPrint("\r\n");
void SPI2_HS1_ManulMode(uint8_t *cmd,uint8_t *data)
{
SPI2_HS1_H; ==> This is gpio PIN to control it as high ....
SPI2_HS2_H;
SPI2_HS3_H;
SPI2_HS4_H;
SPI2_LS1_H;
SPI2_LS2_H;
SPI2_LS3_H;
SPI2_LS4_H;
SPI2_NSS_L;
SPI2_HS1_L;
HAL_SPI_TransmitReceive(&hspi2, cmd, data, 2, 10);
SPI2_HS1_H;
SPI2_NSS_H;
}
=> if trying to read LS2 channel repeatedly(continously) with above code, I got the error : final data is not correct,
I attached all code to control SPI communication with STM32F429 (the attached code is using STM32F405)...
and I attached the circuit,