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
Hello Brent,
Did you resolve this issue?
Which MQX version are you using?
Regards
Sol
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.
Thanks Rob