This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] MSP432E401Y:使用内部闪存创建 FATFS 系统

Guru**** 2564210 points
Other Parts Discussed in Thread: MSP432E401Y

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/807613/msp432e401y-create-a-fatfs-system-with-internal-flash

器件型号:MSP432E401Y

我正在尝试参考示例项目 fatsraw 并使用 MSP432E401Y 上的内部闪存实施 fatfs。

我在 MSP_EXP432E401Y.c 中将闪存基地址设置为以下地址:

#define SECTORSIZE (0x4000)
#define NVS_REGESS_BASE (0x80000)
#define REGIZE (SECTORSIZE * 32)

对于块大小、扇区数和扇区大小、我在新创建的 NVSFatFS_diskIoctrl 中设置它们:

GET_Sector_count=1024

get_sector_size=512

get_block_size=512

然后、我运行 f_mkfs 来为闪存创建文件系统:

fresult = f_mkfs (STR (drive_NUM)、fm_FAT、0x1000、src.obj.fs->win、sizeof (src.obj.fs->win));

在 f_mkfs()中,分配单元(群集)的大小设置为4096字节。

fresult 为 FR_OK 结果。 但是,当尝试获取运行 fresult=f_getfree(driveNumber,&freeClusterCount, Fatfs)的可用群集时,freeClusterCount 总是返回0。 (fresult 为 FR_OK)

您能否建议更合适的扇区计数/扇区大小/块大小或在闪存上创建 FATFS 的任何其他配置设置?

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    尊敬的 Andy:

    是否需要在内部闪存上使用 FATFS?

    如果不是、SimpleLink MSP432E4 SDK 提供了以下使用 SPIFFS 库(github.com/.../spiffs) 的示例、允许在内部存储器上使用文件系统(非 FATFS):./examples/rtos/MSP_EXP432E401Y/drivers/spiffsinternal

    谢谢、
    SAI