diff --git a/esp-hal-common/src/soc/esp32s3/mod.rs b/esp-hal-common/src/soc/esp32s3/mod.rs index 9c3c52fe79a..9bf2ddebd75 100644 --- a/esp-hal-common/src/soc/esp32s3/mod.rs +++ b/esp-hal-common/src/soc/esp32s3/mod.rs @@ -51,7 +51,7 @@ pub unsafe fn configure_cpu_caches() { } // ideally these should be configurable - const CONFIG_ESP32S3_INSTRUCTION_CACHE_SIZE: u32 = 0x4000; // ESP32S3_INSTRUCTION_CACHE_16KB + const CONFIG_ESP32S3_INSTRUCTION_CACHE_SIZE: u32 = 0x8000; // ESP32S3_INSTRUCTION_CACHE_16KB const CONFIG_ESP32S3_ICACHE_ASSOCIATED_WAYS: u8 = 8; // ESP32S3_INSTRUCTION_CACHE_8WAYS const CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_SIZE: u8 = 32; // ESP32S3_INSTRUCTION_CACHE_LINE_32B diff --git a/esp-hal-common/src/spi/master.rs b/esp-hal-common/src/spi/master.rs index adf15f7ddf5..cc0b82e4d3f 100644 --- a/esp-hal-common/src/spi/master.rs +++ b/esp-hal-common/src/spi/master.rs @@ -50,6 +50,7 @@ use core::marker::PhantomData; use fugit::HertzU32; +use procmacros::ram; use super::{ DuplexMode, @@ -2526,6 +2527,7 @@ pub trait Instance { /// you must ensure that the whole messages was written correctly, use /// [`Self::flush`]. // FIXME: See below. + #[ram] fn write_bytes(&mut self, words: &[u8]) -> Result<(), Error> { let num_chunks = words.len() / FIFO_SIZE; @@ -2586,6 +2588,7 @@ pub trait Instance { /// Sends out a stuffing byte for every byte to read. This function doesn't /// perform flushing. If you want to read the response to something you /// have written before, consider using [`Self::transfer`] instead. + #[ram] fn read_bytes(&mut self, words: &mut [u8]) -> Result<(), Error> { let empty_array = [EMPTY_WRITE_PAD; FIFO_SIZE]; @@ -2606,6 +2609,7 @@ pub trait Instance { // FIXME: Using something like `core::slice::from_raw_parts` and // `copy_from_slice` on the receive registers works only for the esp32 and // esp32c3 varaints. The reason for this is unknown. + #[ram] fn read_bytes_from_fifo(&mut self, words: &mut [u8]) -> Result<(), Error> { let reg_block = self.register_block(); @@ -2642,6 +2646,7 @@ pub trait Instance { Ok(()) } + #[ram] fn transfer<'w>(&mut self, words: &'w mut [u8]) -> Result<&'w [u8], Error> { for chunk in words.chunks_mut(FIFO_SIZE) { self.write_bytes(chunk)?;