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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,083 次查看
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

标签 (1)
0 项奖励
回复
3 回复数

1,702 次查看
soledad
NXP Employee
NXP Employee

Hello Brent,

Did you resolve this issue?

Which MQX version are you using?

Regards

Sol

0 项奖励
回复

1,702 次查看
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 项奖励
回复

1,702 次查看
brentwilliams
Contributor II

Thanks Rob

0 项奖励
回复