USB format failing with flash storage - SDK 2.5.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB format failing with flash storage - SDK 2.5.0

442 Views
nxa34640
NXP Employee
NXP Employee

Hello,

I am working on enabling USB MSC on KL28 based controller. For that, I have used frdmkl28z_dev_msc_ramdisk_freertos SDK examples project. This project is working as expected. When I connect chip, it is getting detected as mass storage device and format is successful. Now the problem is, it is using ramdisk as storage medium and my requirement is permanent flash based storage. So for that I have modified USB_DeviceMscCallback() to store and get back data from flash and not from ram. 

After code changes, USB enumeration process is successful and now when I try to format disk, it is failing with 'Windows is unable to complete the format'. I can see from debugging that flash write is success and 13 bytes of success response is prepared and sent to host. 

What can possibly be wrong here?    

SDK version used : 2.5.0

Labels (1)
0 Kudos
1 Reply

346 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Pankti Kapadia,

 

I reproduced your problem and did some tests on my side with your code. I found that the root cause of your problem is the large LBA you are handling in the GetLbaInformation event.

 

Please try using a smaller LBA, for example I used 4096 LBA and 4k buffers and it works okay on my side.

 

Please give it a try and let me know your findings.

 

Best regards,

Felipe

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos