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

SPI once half-duplex can't be re-used as full-duplex #3122

Open
i404788 opened this issue Feb 10, 2025 · 0 comments
Open

SPI once half-duplex can't be re-used as full-duplex #3122

i404788 opened this issue Feb 10, 2025 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@i404788
Copy link
Contributor

i404788 commented Feb 10, 2025

Bug description

After a call to half_duplex_* any attempt to get back so far by manual register edits, but presumably also by stealing the SPI peripherals and re-creating it seems to fail.

Currently unable to continue testing due to missing hardware.

To Reproduce

spibus
    .half_duplex_write(
      mode,
      Command::None,
      Address::_24Bit(addr_spi_mode, mode),
      0u8,
      &(0u32.to_le_bytes()),
    )?;
let spi_config_fast = esp_hal::spi::master::Config::default()
        .with_frequency((23).MHz())
        .with_mode(esp_hal::spi::Mode::_0);
spibus.apply_config(&spi_config_fast);

// Do a SPI transfer here with an expected result; you'll get all 0x00.

Attempts to reconfigure registers (without success): i404788@0796e01

Expected behavior

When using half_duplex_write the data modes specified should be configured, when returning to the regular interface (tranfer/eh1) full-duplex is used again.

Environment

  • Target device: ESP32-S3
  • Crate name and version: main~52 (0.23.1-dev)

NOTE: split from the end of #2863

@i404788 i404788 added bug Something isn't working status:needs-attention This should be prioritized labels Feb 10, 2025
@MabezDev MabezDev removed the status:needs-attention This should be prioritized label Feb 18, 2025
@MabezDev MabezDev added this to the 1.0.0-beta.1 milestone Feb 18, 2025
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
Status: Todo
Development

No branches or pull requests

2 participants