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

SPI: improvements for SPI library#912

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

Merged
fpistm merged 6 commits intostm32duino:masterfromstas2z:master
Feb 12, 2020
Merged

Conversation

@stas2z
Copy link
Contributor

My suggestion for#898

  • optimize spi_transfer routine to use LL instead of HAL
  • add SPISettings field for transmit only operations
  • replace spi_send with call to spi_transfer with SPI_TRANSMITONLY flag
  • allow SPI_TRANSFER_TIMEOUT redefinition

@stas2zstas2zforce-pushed themaster branch 2 times, most recently frombb18006 tob335b0cCompareFebruary 3, 2020 15:49
- optimize spi_transfer routine to use LL instead of HAL- add SPISettings field for transmit only operations- replace spi_send with call to spi_transfer with SPI_TRANSMITONLY flag- allow SPI_TRANSFER_TIMEOUT redefinitionSigned-off-by: Alexey Golyshin <stas2z@gmail.com>
@ABOSTM
Copy link
Contributor

Hi@stas2z
I review the PR
That is nice job and looks good to me.
Nevertheless I propose to factorize common code to improve readability and maintenance.
I does not impact performances. (tested on NUCLEO_L476RG with LCD/SD sadafruit shield).
See PR on your own forkstas2z#1

spi_tranfer: factorize common code to simplify maintenance
Copy link
Contributor

@ABOSTMABOSTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM waiting@fpistm feedback

@uzi18
Copy link

uzi18 commentedFeb 7, 2020
edited
Loading

such blind send should be possible with dma, but don't know if any compatibility issues will rise

@stas2z
Copy link
ContributorAuthor

stas2z commentedFeb 7, 2020
edited
Loading

such blind send should be possible with dma, but don't know if any compatibility issues wil rise

it's not a blind send, it checks for the state before DR register access, this is exactly what HAL_SPI_TransmitRecieve does, but shorter and much faster cuz much overhead stuff dropped.

But anyway, any compatibility tests are welcomed. Ive tested it with all my stm32 fleet available (f103/f401/f405/f051) but sure thats not enuff to be sure

Copy link
Member

@fpistmfpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Not compatible with H7 and MP1 series due to LL API usages.

Signed-off-by: Alexey Golyshin <stas2z@gmail.com>
@stas2z
Copy link
ContributorAuthor

Unfortunately i have no H7 or MP1 board to check

@ABOSTM
Copy link
Contributor

Thanks@stas2z I will test H7 and MP1

fpistm reacted with thumbs up emoji

@ABOSTM
Copy link
Contributor

@stas2z,
Tests on MP1 fails.
But here is the fix:
stas2z#2

fpistm reacted with rocket emoji

SPI: Dedicated start/stop transfer for STM32H7 and STM32MP1
Copy link
Member

@fpistmfpistm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@fpistmfpistm added the enhancementNew feature or request labelFeb 12, 2020
@fpistmfpistm added this to the1.9.0 milestoneFeb 12, 2020
@fpistmfpistm merged commitbbb0cf1 intostm32duino:masterFeb 12, 2020
@fpistmfpistm linked an issueFeb 12, 2020 that may beclosed by this pull request
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull requestNov 21, 2023
Linked tostm32duino#912.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull requestNov 23, 2023
Linked tostm32duino#912.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull requestNov 24, 2023
Linked tostm32duino#912.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this pull requestNov 24, 2023
Linked tostm32duino#912.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fpistmfpistmfpistm approved these changes

+1 more reviewer

@ABOSTMABOSTMABOSTM approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

enhancementNew feature or request

Projects

None yet

Milestone

1.9.0

Development

Successfully merging this pull request may close these issues.

Slow SPI speed with SPI library

4 participants

@stas2z@ABOSTM@uzi18@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp