4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-19 11:13:31 +08:00

fix:三字节读命令0x03,四字节读命令0x13,当命令为0x03需要加上0x10

This commit is contained in:
joechenchen 2022-12-15 10:28:45 +08:00 committed by Man, Jianting (Meco)
parent 63e7633246
commit ee632c21a8

View File

@ -170,7 +170,12 @@ static void qspi_set_read_cmd_format(sfud_flash *flash, uint8_t ins, uint8_t ins
flash->read_cmd_format.instruction = ins;
flash->read_cmd_format.address_size = 24;
} else {
flash->read_cmd_format.instruction = ins + 1;
if(ins == SFUD_CMD_READ_DATA){
flash->read_cmd_format.instruction = ins + 0x10;
}
else{
flash->read_cmd_format.instruction = ins + 1;
}
flash->read_cmd_format.address_size = 32;
}