Skip to content

Fix issue on SPI for F0, F3, F7 and L4 platforms #143

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

Merged
merged 1 commit into from
Nov 6, 2017

Conversation

cparata
Copy link
Contributor

@cparata cparata commented Oct 31, 2017

Hi all,
I found a potential issue in the SPI library when the SPI instance is generated using dynamic allocation. In particular the "NSSPMode" field of the “Init” structure of the "SPI_HandleTypeDef" could be randomly initialized and it could cause troubles in the "HAL_SPI_Init". In order to avoid that we need to correctly initialized this field inside the spi_init.
I also fixed some compilation warnings (for Nucleo-L476RG) due to a misalignment in the .text section of the Linker Script. Probably this issue affects other platforms too.
Best Regards,
Carlo

Copy link
Member

@LMESTM LMESTM left a comment

Choose a reason for hiding this comment

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

hi - I think this would be best to have 2 separate commits. But the FIX is fine with me: +1

@fpistm
Copy link
Member

fpistm commented Oct 31, 2017

Hi @cparata,

It seems this field is not common to all series.
Greping HAL shows it is only available for: F0, F3, F7 and L4
So it should be under switch and check for other series if an equivalent field exists.
Fix for ld scipt should be in a separate commit.

Copy link
Member

@LMESTM LMESTM left a comment

Choose a reason for hiding this comment

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

Would you please just squash this into a single commit?

@cparata cparata changed the title Fix issue on SPI and remove compilation warnings for Nucleo-L476RG Fix issue on SPI for F0, F3, F7 and L4 platforms Nov 2, 2017
Copy link
Member

@LMESTM LMESTM left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks !

@fpistm fpistm added the bug 🐛 Something isn't working label Nov 6, 2017
@fpistm fpistm merged commit b17dd25 into stm32duino:master Nov 6, 2017
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull request Apr 10, 2019
Fix issue on SPI for F0, F3, F7 and L4 platforms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants