MC52259 as MSD device with RAM disk driver

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

MC52259 as MSD device with RAM disk driver

Jump to solution
2,818 Views
jhmrd
Contributor III

I am trying to develop an application running on a MC52259 which can provide a RAM disk to a PC through the USB interface. I have the MFS example RAM disk from MQX 3.5.1 running and can see the RAM disk and control it through the shell. I also have the USB device disk example running, and can see the device enumerate on my PC. However, there is no example I can find which will tie the USB driver to the RAM disk driver. The Disk_App() function in the example code is blank. Is there another example I can use?

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
883 Views
JuroV
NXP Employee
NXP Employee

Yes, this is what I am suggesting.

 

Windows sometimes hides or does not assigns disk drive letter. Start -> My Computer (right click) -> Manage -> Disk Management -> select disk and assign a letter.

View solution in original post

0 Kudos
Reply
5 Replies
883 Views
JuroV
NXP Employee
NXP Employee

Hello,

 

disk example in USB / device runs on RAM, although the area is not mapped to MFS. Note that if it was, you would not see what you probably expect: files on RAM disk (the reason is caching from PC host: there is not any rule when shoul PC host write to the USB disk). If you want to map the disk anyway, then you need to map g_disk.storage_disk from USB host example to the MFS partition + storage area.

0 Kudos
Reply
883 Views
jhmrd
Contributor III

Thank you for the quick response, but this does not solve my problem. I need to share a file system between the application running under MQX with the PC via USB. I need to be able to create files on the MC52259 and read them back on the PC. Is there any example code which supports this?

0 Kudos
Reply
883 Views
JuroV
NXP Employee
NXP Employee

There is not such example.

I will repeat myself: if you want to write a file to a USB disk device, which is connected to the PC host in the same time- dont do that; USB mass storage class is not specified for such operation. What you can do is to prepare a RAM disk with MFS and then plug-in USB disk device to the PC host.

0 Kudos
Reply
883 Views
jhmrd
Contributor III

Are you suggesting that I use the host mode USB drivers on my device to write to a pen drive, remove the pen drive, then connect it to the PC to transfer my files?

 

I am having a problem with the device msd disk application. When I connect my device to a PC, I can see that the device is detected and connected to the PC. But no disk drive letter is assigned by the PC to my device, so I cannot access the ram disk from the PC. Is there something I must do on the PC to format the ram disk? Is there something else you can suggest that could be wrong?

 

0 Kudos
Reply
884 Views
JuroV
NXP Employee
NXP Employee

Yes, this is what I am suggesting.

 

Windows sometimes hides or does not assigns disk drive letter. Start -> My Computer (right click) -> Manage -> Disk Management -> select disk and assign a letter.

0 Kudos
Reply