-
Notifications
You must be signed in to change notification settings - Fork 5
Qspi on STM32U5 #37
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
Draft
ArthurHeymans
wants to merge
8
commits into
main
Choose a base branch
from
QspiWithoutCallback
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Qspi on STM32U5 #37
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit introduces the `ChangeSpiFreq` trait to allow dynamic modification of SPI frequencies. Implementations for `StmSpi` and `RpSpi` are added, and the `Serprog` struct is updated to use this trait instead of a callback. This simplifies the code and ensures consistent handling of frequency changes across different SPI implementations. Signed-off-by: Arthur Heymans <[email protected]>
This commit modifies the `Serprog` struct to make the SPI field optional, allowing the program to run without SPI functionality. A new `NoSpi` module is added to provide a no-op SPI implementation for cases where SPI is not available. The `OSpiOp` and `SSpiFreq` commands now check for SPI availability and return appropriate responses if SPI is not present. Signed-off-by: Arthur Heymans <[email protected]>
This commit introduces new enums, structs, and bitfields to support Multi-IO SPI modes and operations. It includes the `MultiIOMode` enum, `MultiIOSpiHeader` and `QMultiIOSpiModesResponse` structs, and extends the `SerprogCommand` enum with `QMultiIOSpiModes` and `MultiIOSpiOp` commands. Additionally, it adds the `IOModeAndDirection` bitfield to handle IO mode and direction flags. Signed-off-by: Arthur Heymans <[email protected]>
ArthurHeymans
commented
Jun 20, 2025
flashcrab/.cargo/config.toml
Outdated
| [target.thumbv8m.main-none-eabihf] | ||
| linker = "flip-link" | ||
| #runner = 'probe-rs run --chip STM32U5A5ZJTxQ' | ||
| runner = "/home/arthur/src/probe-rs/target/release/probe-rs run --host ws://calculator.lab.9e.network:3000 --token flater1c --protocol swd --chip STM32U5A5ZJTxQ" |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably best to remove
This commit introduces a new project called Flashcrab, which includes support for OSPI (OctoSPI) flash memory operations and USB communication. The project also includes integration tests for various hardware functionalities such as DAC, hardware hashing, and LED sequence control. The build system is configured with Flip Link for the Thumbv8m target, and the project is set up for embedded testing. Signed-off-by: Arthur Heymans <[email protected]>
- Introduces new CsControl trait for chip select management - Provides NoCs implementation for no-op CS control = Implements CsControl for OutputPin with single CS support - Updates Serprog struct to use CsControl trait - Adds SSpiCs command handling for CS selection
This commit introduces Multi-IO SPI functionality to the serprog module, enabling support for advanced SPI modes like Dual I/O, Quad I/O, and QPI. It includes a new `multi_io_spi` module, updates to the `Serprog` struct to handle Multi-IO SPI transactions, and new commands (`QMultiIOSpiModes`, `MultiIOSpiOp`) for protocol interaction. The changes also ensure compatibility with existing SPI operations while extending the maximum buffer size handling for Multi-IO transactions. Signed-off-by: Arthur Heymans <[email protected]>
This commit introduces the `OspiWrapper` struct to work around orphan rules and implements the `MultiIOSpi` trait for it. The struct provides methods to build transfer configurations and handle reset, read, and write operations for OSPI (Octo-SPI) transactions. The `serprog` integration is updated to use `OspiWrapper` instead of a dummy SPI implementation. Additionally, the `vbus_detection` configuration for USB is disabled by default for broader compatibility. The changes enable support for multi-IO modes and enhance the functionality of the serprog interface. Signed-off-by: Arthur Heymans <[email protected]>
Signed-off-by: Arthur Heymans <[email protected]>
9d531d4 to
b12abcc
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP... test on actual HW