Other Parts Discussed in Thread: ADS1299, TMS320C6748
Hello,
I'm triying to connect a ADS1299 EEG-FE Rev A with a tms320C6748 (a DSP) using the SPI protocol, but i can't get data from the divice or any other information, i haven't use the DRDY yet, but even asking for the ID or the configuration of the channel , i haven't an answere from the DOUT (MISO).
i'm working with EEG Front-End Performance Demonstration Kit using the MMB0 board like energy board, and the control signals that it's send, are from the tms320C6748 throght the J3 conectors. The configuration of the ADS1299 EEG is JP21 on 2-3, to connect the cs to the pin 7, the JP22 on 1-2, i guess to free the start. The pins that i use to connect me are are J3-13 to MISO, j3-11 to MOSI, j3-7 to CS, j3-3 to CLK, j-18 to GND.
The code that i use is the following:
SPI_init();// here the is the spi initialization of the DSP
SPITransmitData1(SOC_SPI_1_REGS, ADS_SDATAC); // ADS_SDATAC = 0x11
Delay(40);
SPITransmitData1(SOC_SPI_1_REGS, ADS_SDATAC); // ADS_SDATAC = 0x11
Delay(8);
SPITransmitData1(SOC_SPI_1_REGS, ADS_STOP); // ADS_STOP = 0x0A
Delay(8);
unsigned int baseAdd=SOC_SPI_1_REGS;
while(1)
{
char data[]={ADS_RREG(0x05) ,0x00 ,0x00};
HWREG(baseAdd + SPI_SPIDAT1) = \
(HWREG(baseAdd + SPI_SPIDAT1) & ~ SPI_SPIDAT1_TXDATA) | (data[0] + 0x10000000); //here go the command for read the configuration of channel 1
HWREG(baseAdd + SPI_SPIDAT1) = \
(HWREG(baseAdd + SPI_SPIDAT1) & ~ SPI_SPIDAT1_TXDATA) | (data[1] + 0x10000000);
HWREG(baseAdd + SPI_SPIDAT1) = \
((HWREG(baseAdd + SPI_SPIDAT1) & ~ SPI_SPIDAT1_TXDATA) | data[2]) & 0xEFFFFFFF;
printf(" Valor %X \n", SPIDataReceive(SOC_SPI_1_REGS));
}