Micrium File system partition issue

67 Views Asked by At

I have partitioned the NOR Flash into two regions, and trying to mount these two regions into separate volumes. But im getting the error

FS_FAT_VolOpen(): Invalid boot sec sig: 0xFFFF != 0xAA55.

I have followed the steps

  1. Opened the device

    FSDev_Open("nor:0:", (void *)&nor_cfg, &err);

  2. Created the partition

FSDev_PartitionInit((CPU_CHAR*)"nor:0:",(FS_SEC_QTY )(6000),&err);
FSDev_PartitionAdd((CPU_CHAR*)"nor:0:",(FS_SEC_QTY )(6000),&err);

(Size of the flash is 8Mb)

verified the partition is created or not using

FSDev_GetNbrPartitions((CPU_CHAR*)"nor:0:",&err);

Its returning as 2.

  1. Tried to format the regions using
FSVol_Open("vol:0:", "nor:0:", 1, &err);
FSVol_Open("vol:1:", "nor:0:", 2, &err);

error returned as "FS_ERR_PARTITION_NOT_FOUND":

I'm getting the error as

FSPartition_RdEntry(): Invalid partition sig: 0xFFFF != 0xAA55.

1

There are 1 best solutions below

0
On

Try to format the regions with

FSVol_Open("vol:0:", "nor:0:", 0, &err);
FSVol_Open("vol:1:", "nor:0:", 1, &err);

I created two partitions 256MB and 768MB on the SD card. then formatted partitions with indices 1 and 2, and noticed that the partition with index 1 was created, but with a volume of 768MB, and the second one ended with an error. i changed the indices to 0 and 1 and it worked. you need to create partitions only if they are not there, otherwise you will lose information on the media.