drivers: flash: stm32 ospi flash driver the correct erase instruction
Use the most adapted instruction for the sector erase command It can be 0x20 or ox21 or 0x21DE in octo - DTR mode. The value is given by the SFDP table and filled in the erase_types table the during the SFDP discovery process. Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
7d45f3c92a
commit
01684df03a
1 changed files with 4 additions and 4 deletions
|
@ -1108,11 +1108,11 @@ static int flash_stm32_ospi_erase(const struct device *dev, off_t addr,
|
|||
? SPI_NOR_CMD_SE_4B
|
||||
: SPI_NOR_CMD_SE;
|
||||
}
|
||||
/* Avoid using wrong erase type,
|
||||
* if zero entries are found in erase_types
|
||||
*/
|
||||
bet = NULL;
|
||||
}
|
||||
/* Avoid using wrong erase type,
|
||||
* if zero entries are found in erase_types
|
||||
*/
|
||||
bet = NULL;
|
||||
}
|
||||
LOG_DBG("Sector/Block Erase addr 0x%x, asize 0x%x amode 0x%x instr 0x%x",
|
||||
cmd_erase.Address, cmd_erase.AddressSize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue