Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[chore] Speedup for simple SPI.transfer#2082

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
RudolphRiedel wants to merge2 commits intostm32duino:mainfromRudolphRiedel:main

Conversation

RudolphRiedel
Copy link

@RudolphRiedelRudolphRiedel commentedJul 22, 2023
edited by fpistm
Loading

Summary

This PR gives a speed boost to simple SPI.transfer(data) and SPI.transfer(buffer, count) operations
in which the user controls the chip-select by directly using only the necessary LL-HAL functions and not going thru the CS controlling functions and the spi_transfer() function.

With no DMA support in the SPI class the sending of a buffer takes a long time and with this modification
it takes at least less time.

Measured with STM32C031C6, SPI clock 8MHz and a buffer of 231 bytes:
digitalWrite(CS, LOW);
SPI.transfer(&buffer, 231);
digitalWrite(CS, HIGH);

original code: 587,26µs
this pr: 474.92µs

@fpistmfpistm added the enhancementNew feature or request labelAug 4, 2023
@fpistm
Copy link
Member

Hi@RudolphRiedel
I will not be able to review it soon but will get back to you when review it.

@fpistmfpistm self-requested a reviewOctober 19, 2023 15:12
@fpistmfpistm changed the title- major speedup for simple SPI.transfer(data) and SPI.transfer(buffer…[chore] Speedup for simple SPI.transferOct 31, 2023
@fpistm
Copy link
Member

Hi@RudolphRiedel
Thanks for this PR. When reviewed it, I though we can go further and remove some unused and over complicated internal CS management. That's why I've made this PR:#2171 .
Feel free to test ang give your feedback.
So I close this one as the new PR include your proposal.

@fpistmfpistm closed thisNov 9, 2023
@fpistmfpistm added the abandonedNo more work on this labelNov 9, 2023
@fpistmfpistm mentioned this pull requestNov 9, 2023
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fpistmfpistmAwaiting requested review from fpistm

Assignees
No one assigned
Labels
abandonedNo more work on thisenhancementNew feature or request
Projects
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@RudolphRiedel@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp