diff --git a/components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp b/components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp index a7f76c67d3..d82ceaabc0 100644 --- a/components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp +++ b/components/storage/blockdevice/COMPONENT_QSPIF/QSPIFBlockDevice.cpp @@ -857,13 +857,13 @@ int QSPIFBlockDevice::_sfdp_detect_erase_types_inst_and_size(uint8_t *basic_para for (int i_ind = 0; i_ind < 4; i_ind++) { smptbl.erase_type_inst_arr[i_ind] = QSPI_NO_INST; // Default for unsupported type smptbl.erase_type_size_arr[i_ind] = 1 - << basic_param_table_ptr[QSPIF_BASIC_PARAM_TABLE_ERASE_TYPE_1_SIZE_BYTE + 2 * i_ind]; // Size is 2^N where N is the table value + << basic_param_table_ptr[QSPIF_BASIC_PARAM_TABLE_ERASE_TYPE_1_SIZE_BYTE + 2 * i_ind]; // Size is 2^N where N is the table value tr_debug("Erase Type(A) %d - Inst: 0x%xh, Size: %d", (i_ind + 1), smptbl.erase_type_inst_arr[i_ind], smptbl.erase_type_size_arr[i_ind]); if (smptbl.erase_type_size_arr[i_ind] > 1) { // if size==1 type is not supported smptbl.erase_type_inst_arr[i_ind] = basic_param_table_ptr[QSPIF_BASIC_PARAM_TABLE_ERASE_TYPE_1_BYTE - + 2 * i_ind]; + + 2 * i_ind]; if ((smptbl.erase_type_size_arr[i_ind] < smptbl.regions_min_common_erase_size) || (smptbl.regions_min_common_erase_size == 0)) { diff --git a/components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp b/components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp index 9b8cc88ebd..18373e1941 100644 --- a/components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp +++ b/components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp @@ -696,7 +696,7 @@ int SPIFBlockDevice::_sfdp_detect_erase_types_inst_and_size(uint8_t *basic_param for (int i_ind = 0; i_ind < 4; i_ind++) { smptbl.erase_type_inst_arr[i_ind] = 0xff; //0xFF default for unsupported type smptbl.erase_type_size_arr[i_ind] = local_math_power( - 2, basic_param_table_ptr[SPIF_BASIC_PARAM_ERASE_TYPE_1_SIZE_BYTE + 2 * i_ind]); // Size given as 2^N + 2, basic_param_table_ptr[SPIF_BASIC_PARAM_ERASE_TYPE_1_SIZE_BYTE + 2 * i_ind]); // Size given as 2^N tr_debug("Erase Type(A) %d - Inst: 0x%xh, Size: %d", (i_ind + 1), smptbl.erase_type_inst_arr[i_ind], smptbl.erase_type_size_arr[i_ind]); if (smptbl.erase_type_size_arr[i_ind] > 1) { diff --git a/drivers/source/SFDP.cpp b/drivers/source/SFDP.cpp index eb8cbce7e5..5f43192a8e 100644 --- a/drivers/source/SFDP.cpp +++ b/drivers/source/SFDP.cpp @@ -134,7 +134,7 @@ int sfdp_parse_headers(Callback sfdp_reader, return 0; } -int sfdp_parse_sector_map_table(Callback sfdp_reader, sfdp_smptbl_info &smptbl) +int sfdp_parse_sector_map_table(Callback sfdp_reader, sfdp_smptbl_info &smptbl) { uint8_t sector_map_table[SFDP_BASIC_PARAMS_TBL_SIZE]; /* Up To 20 DWORDS = 80 Bytes */ uint32_t tmp_region_size = 0;