Skip to content

Commit 0cb62c4

Browse files
committed
SFDP: unit tests: Fix Configuration ID in fake test data
The second byte of the sector map descriptor is the configuration ID. On a device with non-configurable layout, the only available map descriptor's configuration ID must be 0x00 as required by the JESD216D standard. This value is important, because we will check each descriptor's configuration ID when we support multiple configurations. Note: The test data is fake - when we modified real data of a configurable device to become non-configurable for test purpose, we forgot to change this field.
1 parent 50183d2 commit 0cb62c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/blockdevice/tests/UNITTESTS/SFDP/test_sfdp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ static const mbed::bd_addr_t sector_map_start_addr = 0xD81000;
3333
* three regions for test purpose.
3434
*/
3535
static const uint8_t sector_map_single_descriptor[] {
36-
0xFF, 0x01, 0x02, 0xFF, // header, highest region = 0x02
36+
0xFF, 0x00, 0x02, 0xFF, // header, highest region = 0x02
3737
0xF1, 0x7F, 0x00, 0x00, // region 0
3838
0xF4, 0x7F, 0x03, 0x00, // region 1
3939
0xF4, 0xFF, 0xFB, 0x03 // region 2
@@ -255,7 +255,7 @@ TEST_F(TestSFDP, TestMoreRegionsThanSupported)
255255
* twelve regions for test purpose.
256256
*/
257257
const uint8_t sector_map_single_descriptor_twelve_regions[] {
258-
0xFF, 0x01, 0x0B, 0xFF, // header, highest region = 0x0B
258+
0xFF, 0x00, 0x0B, 0xFF, // header, highest region = 0x0B
259259
0xF1, 0x7F, 0x00, 0x00, // region 0
260260
0xF4, 0x7F, 0x03, 0x00, // region 1
261261
0xF4, 0xFF, 0xFB, 0x03, // region 2

0 commit comments

Comments
 (0)