fix(spi_flash): Fix suspend issue on esp32s31, and add trs timing on other target

This commit is contained in:
C.S.M
2026-06-08 11:15:13 +08:00
parent cd9de8284d
commit 2acd9b9a7c
26 changed files with 249 additions and 46 deletions
@@ -315,6 +315,34 @@ static inline uint32_t spimem_flash_ll_get_tsus_unit_in_cycles(spi_mem_dev_t *de
return tsus_unit;
}
/**
* @brief Get trs unit values in SPI_CLK cycles
*
* @param dev Beginning address of the peripheral registers.
* @return uint32_t trs unit values
*/
static inline uint32_t spimem_flash_ll_get_trs_unit_in_cycles(spi_mem_dev_t *dev)
{
uint32_t trs_unit = 0;
if (dev->sus_status.flash_per_dly_128 == 1) {
trs_unit = 128;
} else {
trs_unit = 4;
}
return trs_unit;
}
/**
* Configure the delay after Resume
*
* @param dev Beginning address of the peripheral registers.
* @param dly_val delay time
*/
static inline void spimem_flash_ll_set_rs_delay(spi_mem_dev_t *dev, uint32_t dly_val)
{
dev->ctrl1.cs_hold_dly_per = dly_val;
}
/**
* Enable/disable write protection for the flash chip.
*