You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
To make the driver's async machinery operable even when the C driver's ISR processing code is in IRAM, we need to make sure, that this function is placed in IRAM as well, because spi_notify would actually be called from within the SPI C driver ISR, so it should comply to the same restrictions - i.e. the closure of all code called from an ISR handler that pretends to be "in IRAM" needs to be in IRAM too.
The above can be done with a simple rustc #[linker_section = "something-something-iram"]. We can also conditionalize this attribute with cfg_attr to only do that if esp_idf_spi_master_isr_in_iram holds.
Currently, async support for SPI (and implementation of the
embedded-hal-async
traits) is dependent onCONFIG_SPI_MASTER_ISR_IN_IRAM
being disabled:esp-idf-hal/src/spi.rs
Lines 570 to 571 in 4f44787
There are two things:
read_async
and co aren't defined and figure out that it's a IDF setting.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.
The text was updated successfully, but these errors were encountered: