Hi:
Now, Our RT1064 has a External Flash(S25FL128S) , This Flash Chip min Sector is 64K,so we should correct USB block to 64K.But when we modify this parameter in SDK demo,USB Device can not work.The specific process is as follows:
change LENGTH_OF_EACH_LBA 512 -> 8K , USB can not work as follow:
I found that if LENGTH_OF_EACH_LBA less than 4*1024 ,USB can work successfully. But Our Flash chip requests this parameter to be 64K,because that chip can only erase a sector 64K .
What can I do to achieve this goal? Please give me some comments and feedback.
Thanks!
Hi @DCJJJJ
I hope you are doing well!
I have replicated the issue you are describing, using the same demo and the evkmimxrt1064_dev_msc_disk_freertos, both define the LBA size to be of 512 bytes by default.As you mention the higher LBA size I could get was about 4K.
I am currently checking if the stack does support a higher size for LBA. Otherwise, what you could do is write some functions that store the previous contents of 64 KB sector of your flash memory and later on re-write them along your new LBA of 4KB.
Diego
Thank you for you reply.
I have tried the method you said before I asked help for you.I built a 64K buffer to store data and modify 4k of them.So it is about 60k data is not updated every times that made the speed becomes very slow.So i want to ask for help to you to slove this problem.
BR
DCJJJ