100K spi transactions per second
Posted: Sat Jul 27, 2019 8:17 am
Hi.
I want to sample from an MCP3002 SPI ADC 100K times per second.
I'm currently using the following code and only archiving about 40000 (20K for each ADC channel) samples per second.
https://gitlab.com/StefanRvO/light-equa ... /mcp3002.c
It seems that there is a large interval between each transaction, which is causing this.
According to the SPI driver specification, there is a 25µs interval between SPI transaction, so i guess it will not be possible to get much higher than that this way.
Does anyone know some tricks to decrease the time?
I'm considering to enable Quad SPI and using one of the additional signals to simulate the CS pin and thus doing multiple samples per transaction, but this will create chuncks of transaction whit a large interval between. Does anybody have any better ideas, optimally with equal time between samples?
Regards
Stefan
I want to sample from an MCP3002 SPI ADC 100K times per second.
I'm currently using the following code and only archiving about 40000 (20K for each ADC channel) samples per second.
https://gitlab.com/StefanRvO/light-equa ... /mcp3002.c
It seems that there is a large interval between each transaction, which is causing this.
According to the SPI driver specification, there is a 25µs interval between SPI transaction, so i guess it will not be possible to get much higher than that this way.
Does anyone know some tricks to decrease the time?
I'm considering to enable Quad SPI and using one of the additional signals to simulate the CS pin and thus doing multiple samples per transaction, but this will create chuncks of transaction whit a large interval between. Does anybody have any better ideas, optimally with equal time between samples?
Regards
Stefan