mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-29 18:27:20 +02:00
fix(spi_flash): Fix issue that bit_length is wrong on suspend chip because not judge idle correctly
This commit is contained in:
@ -399,7 +399,7 @@ static inline void spimem_flash_ll_user_start(spi_mem_dev_t *dev, bool pe_ops)
|
||||
*/
|
||||
static inline bool spimem_flash_ll_host_idle(const spi_mem_dev_t *dev)
|
||||
{
|
||||
return dev->fsm.spi0_mst_st == 0;
|
||||
return dev->cmd.mst_st == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -401,7 +401,7 @@ static inline void spimem_flash_ll_user_start(spi_mem_dev_t *dev, bool pe_ops)
|
||||
*/
|
||||
static inline bool spimem_flash_ll_host_idle(const spi_mem_dev_t *dev)
|
||||
{
|
||||
return dev->fsm.spi0_mst_st == 0;
|
||||
return dev->cmd.mst_st == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -557,7 +557,7 @@ static inline void spimem_flash_ll_set_addr_bitlen(spi_mem_dev_t *dev, uint32_t
|
||||
*/
|
||||
static inline void spimem_flash_ll_set_extra_address(spi_mem_dev_t *dev, uint32_t extra_addr)
|
||||
{
|
||||
dev->cache_fctrl.cache_usr_addr_4byte = 0;
|
||||
dev->cache_fctrl.usr_addr_4byte = 0;
|
||||
HAL_FORCE_MODIFY_U32_REG_FIELD(dev->rd_status, wb_mode, extra_addr);
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ static inline uint32_t spimem_flash_ll_get_tsus_unit_in_cycles(spi_mem_dev_t *de
|
||||
{
|
||||
uint32_t tsus_unit = 0;
|
||||
if (dev->sus_status.flash_pes_dly_256 == 1) {
|
||||
tsus_unit = 128;
|
||||
tsus_unit = 256;
|
||||
} else {
|
||||
tsus_unit = 4;
|
||||
}
|
||||
@ -404,7 +404,8 @@ static inline void spimem_flash_ll_user_start(spi_mem_dev_t *dev, bool pe_ops)
|
||||
*/
|
||||
static inline bool spimem_flash_ll_host_idle(const spi_mem_dev_t *dev)
|
||||
{
|
||||
return dev->fsm.st == 0;
|
||||
// s3 has no cmd.mst_st, can use cmd.val instead
|
||||
return dev->cmd.val == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,8 +10,3 @@ set(COMPONENTS main esptool_py)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
project(test_esp_flash_drv)
|
||||
|
||||
message(STATUS "Checking memspi registers are not read-write by half-word")
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
check_register_rw_half_word(SOC_MODULES "spi_mem*" "spi1_mem*"
|
||||
HAL_MODULES "spimem_flash")
|
||||
|
Reference in New Issue
Block a user