Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Async SPI support is not straightforward #486

@Kernald

Description

@Kernald

Currently, async support for SPI (and implementation of the embedded-hal-async traits) is dependent on CONFIG_SPI_MASTER_ISR_IN_IRAM being disabled:

esp-idf-hal/src/spi.rs

Lines 570 to 571 in 4f44787

#[cfg(not(esp_idf_spi_master_isr_in_iram))]
pub async fn read_async(&mut self, words: &mut [u8]) -> Result<(), EspError> {

There are two things:

  • The crate documentation doesn't make this obvious at all. One has to dig into the source to figure out why read_async and co aren't defined and figure out that it's a IDF setting.
  • Async SPI support should still be provided with the interrupt handler in IRAM.

The first point is pretty straightforward to address, but addressing the second would make that irrelevant - not sure how much effort the second point actually is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions