Skip to content

Need help in improving SPI speed. #373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Vicky-S opened this issue Nov 18, 2018 · 3 comments
Closed

Need help in improving SPI speed. #373

Vicky-S opened this issue Nov 18, 2018 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@Vicky-S
Copy link

Vicky-S commented Nov 18, 2018

I have 38.4KSPS ADC(ADS1262) which have SPI interface. I'm trying to read the 38K samples in STM32F103C8t6. I need to send one byte command to get 4 bytes of data. So 5 bytes of data need to be transferred for each sample. Irrespective of SPI speed I can able to get max of 19K samples. I have tried to increase the SPI speed using clock divider function but the result is same.

For Single sample it took 45 micro seconds. but I need to get one sample with in 38us to get 38K samples. Initially my clock divider value was 16 then I increased it up to 2 but the time taken was same as 45us. How can it be?? Irrespective of clock speed the loop time remains same which is weird.

Is there a way to increase the speed of STM32F1? I can able to get 19k samples with 16MHz Arduino UNO but 72MHz STM32F1 gives the same output.

@fpistm
Copy link
Member

fpistm commented Nov 18, 2018

Right, linked to #257
Other improvement is to use DMA.
Have you tried SPI_CONTINUE for CS?
https://github.com/stm32duino/wiki/wiki/API#spi

@Vicky-S
Copy link
Author

Vicky-S commented Nov 18, 2018

Yep. I tried but it takes more time than usual for me.

And im using only one device now so im keeping my CS pin to low for all the time.

@fpistm
Copy link
Member

fpistm commented Feb 19, 2019

Close this one to track all SPI request on the same issue #257.
Mark it as duplicated.

@fpistm fpistm closed this as completed Feb 19, 2019
@fpistm fpistm added the duplicate This issue or pull request already exists label Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants