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

[breaking] SPI library rework#2171

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 5 commits intostm32duino:mainfromfpistm:SPI_rework
Nov 15, 2023
Merged

Conversation

fpistm
Copy link
Member

@fpistmfpistm commentedNov 9, 2023
edited
Loading

  • chore(SPI): align with ArduinoCoreAPI
  • chore(SPI): remove non arduino transfer api with 2 buffer
  • chore(SPI): clean up internal CS pin managements
  • chore(SPI): remove deprecated WiFi library workaround

To be aligned with Arduino API:https://github.com/arduino/ArduinoCore-API/blob/master/api/HardwareSPI.h
Only Hardware CS pin support kept.
Allows to save memory space (arounf 1kB) and increase execution speed ( until 30%).

Fixes#257.
Supersede#2082.

Mainly follow recommendation from@matthijskooijman :#257 (comment)

Test old vs new

  • Done on all series withGraphicTests
  • Saved RAM space is 48 bytes for all series.
  • Time measured betweenfillScreen and end ofsetup(). (note that it include delay's value i.e. 11000 ms).
  • For STM32C0xx, all unnecessary features disabled to save space includingSerial. Adafruit libraries modified to remove dependencies within I2C. Time measured thanks a GPIO.
SeriesBoardFlash (old)Flash (new)delta (bytes)Delta (%)Time (old)Time (new)deltaDelta (%)
STM32C0xxNucleo C031C6302522921210403.44%2338419879350514.99%
STM32F0xxNucleo F091RC470484598410642.26%2504821226382215.26%
STM32F1xxNucleo F103RB36008350169922.75%104087984242423.29%
STM32F2xxNucleo F207ZG38692377009922.56%173151627410416.01%
STM32F3xxNucleo F303RE383323732410082.63%2096318721224210.70%
STM32F4xxNucleo F411RE35496345009962.81%174371631211256.45%
STM32F7xxNucleo F767ZI412604025610042.43%15252149772751.80%
STM32G0xxNucleo G071RB506004953610642.10%2266019665299513.22%
STM32G4xxNucleo G474RE410164000810082.46%16496157477494.54%
STM32H5xxNucleo H563ZI567525571610361.83%17429170663632.08%
STM32H7xxNucleo H723ZG512765024010362.02%634962311181.86%
STM32L0xxNucleo L010RB466004553610642.28%2998324746523717.47%
STM32L1xxNucleo L152RE37408364169922.65%2685222682417015.53%
STM32L4xxNucleo L476RG410684006010082.45%186551718214737.90%
STM32L5xxNucleo L552ZE442044320010042.27%16827159199085.40%
STM32U5xxNucleo U575ZI510795004310362.03%18710180716393.42%
STM32WBxxNucleo WB55RG402763926810082.50%2512421545357914.25%
STM32WLxxNucleo WL55JC1404123940410082.49%2134718967238011.15%

Test with Hardware CS managed by the library:

  • Done withGraphicTests
  • SetTFT_CS to-1 and addSPI.setSSEL(xx); before first call oftft.initR(INITR_BLACKTAB);

@fpistmfpistm added enhancementNew feature or request arduino compatibility labelsNov 9, 2023
@fpistmfpistm added this to the2.7.0 milestoneNov 9, 2023
@fpistmfpistm marked this pull request as draftNovember 9, 2023 16:09
@fpistmfpistmforce-pushed theSPI_rework branch 2 times, most recently fromde8dab9 toec472cdCompareNovember 9, 2023 16:33
@fpistmfpistm self-assigned thisNov 9, 2023
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
To be aligned with Arduino API.Only Hardware CS pin support kept.Allows to save memory space and increase execution speed.Fixesstm32duino#257.Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistmfpistm marked this pull request as ready for reviewNovember 14, 2023 13:23
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
@fpistmfpistm merged commit0038100 intostm32duino:mainNov 15, 2023
@fpistmfpistm deleted the SPI_rework branchNovember 15, 2023 13:45
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees

@fpistmfpistm

Labels
arduino compatibilityenhancementNew feature or request
Projects
Milestone
2.7.0
Development

Successfully merging this pull request may close these issues.

SPI library optimization
1 participant
@fpistm

[8]ページ先頭

©2009-2025 Movatter.jp