Qspi on STM32U5 - #37
Draft
ArthurHeymans wants to merge 8 commits into
Draft
Conversation
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 <arthur@aheymans.xyz>
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 <arthur@aheymans.xyz>
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 <arthur@aheymans.xyz>
ArthurHeymans
commented
Jun 20, 2025
| [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.
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 <arthur@aheymans.xyz>
- 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 <arthur@aheymans.xyz>
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 <arthur@aheymans.xyz>
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
ArthurHeymans
force-pushed
the
QspiWithoutCallback
branch
from
June 20, 2025 12:33
9d531d4 to
b12abcc
Compare
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
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