Skip to content
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

Add a basic blocking QSPI interface #645

Merged
merged 2 commits into from
May 28, 2023
Merged

Add a basic blocking QSPI interface #645

merged 2 commits into from
May 28, 2023

Conversation

X-yl
Copy link
Contributor

@X-yl X-yl commented May 27, 2023

This module implements the QuadSPI interface which allows high speed communication with external flash memory.

Limitations:
- Interrupts are not supported.
- Status polling mode is not supported.

src/lib.rs Show resolved Hide resolved
src/qspi.rs Outdated Show resolved Hide resolved
src/qspi.rs Outdated Show resolved Hide resolved
@X-yl X-yl force-pushed the master branch 2 times, most recently from 44d40c0 to c922d4b Compare May 28, 2023 08:57
@X-yl
Copy link
Contributor Author

X-yl commented May 28, 2023

Thanks for your suggestions, I've amended the commit to incorporate them. Let me know if any other changes are required :)

@X-yl
Copy link
Contributor Author

X-yl commented May 28, 2023

Added #[cfg(feature = "quadspi")] to the RccBus stuff.

@burrbull
Copy link
Contributor

Could you add example?

@burrbull
Copy link
Contributor

Thanks for your suggestions, I've amended the commit to incorporate them. Let me know if any other changes are required :)

6650964

@X-yl
Copy link
Contributor Author

X-yl commented May 28, 2023

Applied your change and added an example using a W25Q series flash chip.

@X-yl X-yl force-pushed the master branch 2 times, most recently from 0301261 to e296118 Compare May 28, 2023 11:53
@X-yl
Copy link
Contributor Author

X-yl commented May 28, 2023

(Adjusted clock prescaler in example for max speed)

@burrbull
Copy link
Contributor

Is Speed::VeryHigh required by QSPI / default?

@X-yl
Copy link
Contributor Author

X-yl commented May 28, 2023

Is Speed::VeryHigh required by QSPI / default?

I don't think it's required, but that was the configuration generated by CubeMX so I used it as is. From my testing, VeryHigh is required for prescaler zero but it works without setting the speed for higher prescaler.

@burrbull
Copy link
Contributor

I don't think it's required, but that was the configuration generated by CubeMX so I used it as is. From my testing, VeryHigh is required for prescaler zero but it works without setting the speed for higher prescaler.

516a009

This module implements the QuadSPI interface which allows high speed
communication with external flash memory.

Limitations
    - Interrupts are not supported.
    - Status polling mode is not supported.
@X-yl
Copy link
Contributor Author

X-yl commented May 28, 2023

Fixed clippy suggestions

examples/qspi-w25q.rs Outdated Show resolved Hide resolved
@burrbull
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented May 28, 2023

@bors bors bot merged commit 0654d98 into stm32-rs:master May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants