K20 - MFS with external serial (SPI) flash part - formatting device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

K20 - MFS with external serial (SPI) flash part - formatting device

838 Views
brentwilliams
Contributor II

Hello,

I am in the process of trying to get MFS working with my external serial (SPI) flash part.  I have created a flash spi driver that I am able to communicate to the part with.

I have used io_msf_install() to install the MFS over the spi flash driver.

The main issue I am having now is formatting the flash device.

The MFS documentation states that you can format the device via an ioctl call - IO_IOCTL_FORMAT and filling in the following structure:

     typedef struct mfs_format_data

     {

           uchar PHYSICAL_DRIVE;   

           uchar MEDIA_DESCRIPTOR;   

           uint_16 BYTES_PER_SECTOR;

           uint_16 SECTORS_PER_TRACK;

           uint_16 NUMBER_OF_HEADS;

           uint_32 NUMBER_OF_SECTORS;

           uint_32 HIDDEN_SECTORS;

           uint_16 RESERVED_SECTORS;

     } MFS_FORMAT_DATA, _PTR_ MFS_FORMAT_DATA_PTR;

In the data sheet for my spi external flash I have the BYTES_PER_SECTOR, NUMBER_OF_SECTORS.  I am not sure what to put in for:

     NUMBER_OF_HEADS??

     SECTORS_PER_TRACK??

     HIDDEN_SECTORS??

     RESERVED_SECTORS??

Is there another way to format the device?

Is what I am trying to do even feasible?

Thanks for your help,

Brent

Labels (1)
0 Kudos
3 Replies

457 Views
soledad
NXP Employee
NXP Employee

Hello Brent,

Did you resolve this issue?

Which MQX version are you using?

Regards

Sol

0 Kudos

457 Views
robsnell
Contributor I

I don't assert that this completely answers your question, but I think that this website may help: www.tavi.co.uk/phobos/fat.html

If the file system is using FAT, then his descriptions of these components may be useful.

0 Kudos

457 Views
brentwilliams
Contributor II

Thanks Rob

0 Kudos