Skip to content

Commit 80f87e3

Browse files
author
Veijo Pesonen
committed
BUGFIX: SFDP Sector Map Parameter Header detection
The Sector Map Function Specific Table is assigned the ID LSB of 81 in hexadecimal, not in decimal[1]. [1] JESD216.01 p. 53
1 parent 18c941c commit 80f87e3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ int QSPIFBlockDevice::_sfdp_parse_sfdp_headers(uint32_t &basic_table_addr, size_
681681
basic_table_addr = ((param_header[6] << 16) | (param_header[5] << 8) | (param_header[4]));
682682
// Supporting up to 64 Bytes Table (16 DWORDS)
683683
basic_table_size = ((param_header[3] * 4) < SFDP_DEFAULT_BASIC_PARAMS_TABLE_SIZE_BYTES) ? (param_header[3] * 4) : 64;
684-
} else if ((param_header[0] == 81) && (param_header[7] == 0xFF)) {
684+
} else if ((param_header[0] == 0x81) && (param_header[7] == 0xFF)) {
685685
// Found Sector Map Table: LSB=0x81, MSB=0xFF
686686
tr_debug("Found Sector Map Table at Table: %d", i_ind + 1);
687687
sector_map_table_addr = ((param_header[6] << 16) | (param_header[5] << 8) | (param_header[4]));

components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ int SPIFBlockDevice::_sfdp_parse_sfdp_headers(uint32_t &basic_table_addr, size_t
777777
// Supporting up to 64 Bytes Table (16 DWORDS)
778778
basic_table_size = ((param_header[3] * 4) < SFDP_DEFAULT_BASIC_PARAMS_TABLE_SIZE_BYTES) ? (param_header[3] * 4) : 64;
779779

780-
} else if ((param_header[0] == 81) && (param_header[7] == 0xFF)) {
780+
} else if ((param_header[0] == 0x81) && (param_header[7] == 0xFF)) {
781781
// Found Sector Map Table: LSB=0x81, MSB=0xFF
782782
tr_debug("Found Sector Map Table at Table: %d", i_ind + 1);
783783
sector_map_table_addr = ((param_header[6] << 16) | (param_header[5] << 8) | (param_header[4]));

0 commit comments

Comments
 (0)