Other Parts Discussed in Thread: AM3358
Tool/software: TI-RTOS
Hello Everyone,
I have a problem receiving SPI data very fast in short intervals on SYS/BIOS with PDK device driver "QSPI-MCSPI". I want to send 32*16bit values every 50 microseconds at 20 MHz. For performance optimization I tried to buffer the data via dma but as soon I make use of a memcpy to store the data in another buffer I do lose some data. I tried as well not to use dma but I didn't work out either. Do you know if there is a performance limit which is smaller than my requirement? If so, do you have other ideas using the beaglebone black with AM3358 chip? I would be nice to know the limit of the dma buffering as well.
EDIT: When i set the invervall to every 90 microseconds I get correct data from dma buffers. Every interval below 90 microseconds leads to dataloss at specific indices of the buffer (index: 0xF, 0x20, 0x40) which are all multiples of 16. My buffer type is "uint16_t". I tested the positive and the negative scenario several times with same results.
EDIT: As an overview I am sending data from a stm32 board using a chipselect line. It would be interesting to know if the dma or the spi module is the bottlleneck. The data corruption happens before only between dma packets. I tried different dma buffers from 64 to 2048 16bit values (128 to 4096 byte dma buffer size).
EDIT: I am 100 percent sure that the data loss happens between two dma packets. When I increase the buffer to 4096 bytes I get 4096 correct bytes but the next dma buffer doesn't receive the first databytes. Is there any way to increase the dma performance?
Regards