你好
CYUSB3014有个demo是 massstorage。 是使用内部的RAM来实现一个mass storage或者U盘的功能。
我有两个问题,
一,这个demo实现的mass storage,在第一次连到host,比如win10时候,会弹出提示需要格式化。能否在代码中做一些修改,使得3014在上电后就是格式化完成的状态?如果实现不了,具体原因是啥?
二,如果上面的一无法实现,那么,我能使用一个64Kb或者256Kb的EEPROM,透过I2C总线来代替这个RAM么?这样的话,在完成格式化,并断电后。再次上电并连到win10上的时候,是否就不会弹出格式化的提示了?
已解决! 转到解答。
Hello,
If your final application does not need to save files after power restart, you can just integrate the file system with this application. You can use a reference for the file system project on this path (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\storage_examples\cyfx3s_fatfs) and you need to make your custom code by mixing both examples.
- it asked for format because file system is not configure so every time we plug Fx3 windows try to format block of memory and create filesystem, if we init part of ram with proper filesystem then we will not get this format popup every time.
Best Regards,
Biren
Translation of Question
Some questions about cyusb3014 massstorage demo -- formatting USB flash disk
Hello
Cyusb3014 has a demo called massstorage. Internal RAM is used to realize the function of a mass storage or USB flash disk.
I have two questions,
1. Regarding the mass storage implementation in this demo, a prompt will pop up asking for formatting, when it is connected to the host, such as win10, for the first time. Can you make some changes in the code so that 3014 is formatted after power on? If not, what is the specific reason?
2. If the above one cannot be implemented, can I use a 64KB or 256Kb EEPROM to replace this RAM through the I2C bus? In this case, after formatting and powering off, when I power on again with connected to win10, will the formatting prompt pop up still?
Hello,
1. it asks to format the disk because in this example data is stored in RAM once you power off and on the device, it does not retain file storage information on RAM, so it always asks to format the device every time. You can test the same code with just reset and it will not ask for format.
2. If you replace RAM data storage with I2C EEPROM then you will not get this format popup every time, maybe you need to integrate the filesystem also.
Best Regards,
Biren
Hi Biren
As I know, some application also use RAM to build a USB disk, but no need format when the first power
But I don't know how to do that,
Do you have any thoughts on this?
I'm sure there is no EEPROM in that case, I checked the board.
Hello,
If your final application does not need to save files after power restart, you can just integrate the file system with this application. You can use a reference for the file system project on this path (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\storage_examples\cyfx3s_fatfs) and you need to make your custom code by mixing both examples.
- it asked for format because file system is not configure so every time we plug Fx3 windows try to format block of memory and create filesystem, if we init part of ram with proper filesystem then we will not get this format popup every time.
Best Regards,
Biren
Hi Biren
Yes, I just don't want to see the format popup when power on.
And no files need to be saved in RAM disk.
Let me try, thanks
Hi Biren
We see some code below in demo cyfx3s_fatfs
/* Pre-mount all storage volumes. */
for (b = 0; b < _VOLUMES; b++)
{
rc = f_mount(b, &Fatfs[b]);
if (rc)
CyFXUartPrint (0, "MOUNT ERROR\r");
}
What's this using?
In my requirement, could you help to list those codes/functions that needs merge?
we are not femilar with file system, but want to fast resolve this.
thanks