Skip to content

Conversation

@ArthurHeymans
Copy link
Contributor

WIP... test on actual HW

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]>
[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"
Copy link
Contributor Author

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]>
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