AnsweredAssumed Answered

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

Question asked by Brent Williams on Oct 28, 2013
Latest reply on Jan 20, 2015 by soledad



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;



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:






Is there another way to format the device?


Is what I am trying to do even feasible?


Thanks for your help,