mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
fix(spi_flash): Fix suspend issue on esp32s31, and add trs timing on other target
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user