Post Go back to editing

Bf609 and ad4001 spi comminication problem

i'm working on BF609 Dsp and Ad4001(adc chip) . i try to connect them with spi . partly i achived but i have some problems
My first problem is that: i couldn't recive 2Msps continous data. i read spi device driver manual in CCES 2.6 for Bf60x spi but i couldn't find any appropriate mode for ad4001.
My spi configuration are below:
/* transceiver buffers */
uint8_t TxBuffer;
uint8_t RxBuffer[2];
/* transceiver configurations */
ADI_SPI_TRANSCEIVER Transceiver1 = {NULL, 0, NULL, 0, &RxBuffer[0], 2};
adi_spi_Open(1, SPIDriverMemory, (uint32_t)ADI_SPI_DMA_MEMORY_SIZE, &hDevice);
adi_spi_SetMaster(hDevice, true);
adi_spi_SetHwSlaveSelect(hDevice, false);
adi_spi_SetTransmitUnderflow(hDevice, false);
adi_spi_SetClockPhase(hDevice, false);
adi_spi_SetClock(hDevice, 7);// sclk0,sclk1 and sck=250Mhz
adi_spi_SetSlaveSelect(hDevice, ADI_SPI_SSEL_ENABLE1);
adi_spi_SetWordSize(hDevice, ADI_SPI_TRANSFER_16BIT);
adi_spi_RegisterCallback(hDevice, SpiCallback, NULL)
adi_spi_EnableDmaMode(hDevice, true);
adi_spi_SetDmaTransferSize(hDevice, ADI_SPI_DMA_TRANSFER_16BIT);

and i always have to write this comment to start spi for data transfers "adi_spi_SubmitBuffer(hDevice, &Transceiver1);" But "adi_spi_SubmitBuffer" takes 4u second and i couldn't find anyway to trig spi transfers without submitBuffer function . i tried "adi_spi_ConfigRxTrigger" but result is same i have to always write SubmitBuffer function. And i attached my c code "Ccode1"

Second problem : CS (Yellow) timing when i use 35MHz SpiClk (Green) and 1Mhz SpClk , it has very unstable characteristic. i couldn't find any reason , i'm sharing screenshots "Picture1"=35mhz SpiClk , "Picture2"=1mhz SpiClk. Related code about that "Ccode1.c" and SlaveSelect has controled by Spi, not manuel. And i also tried manel spi_cs(Slevselect) , İ'm sharing result "Picture3"=35mhz spiclk and "Picture4" 1Mhz spiclk and related code "Ccode2".

Parents Reply Children
No Data