How to Rename USB SDcard Mass storage Device in code?

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

How to Rename USB SDcard Mass storage Device in code?

Jump to solution
982 Views
pramodk_g_
Contributor III

Hi everyone,

                             I have implemented code for USB SDcard mass storage device from RAMDISK example provided in MQX 4.0.1. It is working fine on my TWR K60N512 module. Whenever I connect my usb cable between  PC  and TWR module it will show Removable Disk with its contents. How it is possible to name the device in code so that it will show the device name other than Removable Disk ?

I used the examples of usb RAMDISK and MFS SD card examples to implement this code. Please help me if someone has knowledge on this.

Thanks,

Pramod.

Labels (2)
Tags (3)
1 Solution
600 Views
RadekS
NXP Employee
NXP Employee

As first I would like note that you cannot access disk simultaneously by PC and MQX.

Only one could have access to disk.

So, there are two possible ways:

  1. You can connect disk to PC and format it from PC. In this case you can enter disk name.
  2. Or you can mount disk to MQX system, format it and use io_ctl command IO_IOCTL_SET_VOLUME. After unmounting and conecting to PC, volume name should be visible also for PC.

View solution in original post

2 Replies
601 Views
RadekS
NXP Employee
NXP Employee

As first I would like note that you cannot access disk simultaneously by PC and MQX.

Only one could have access to disk.

So, there are two possible ways:

  1. You can connect disk to PC and format it from PC. In this case you can enter disk name.
  2. Or you can mount disk to MQX system, format it and use io_ctl command IO_IOCTL_SET_VOLUME. After unmounting and conecting to PC, volume name should be visible also for PC.
600 Views
pramodk_g_
Contributor III

Thanks Radek S,

I could rename the drive name in second way and its working fine. Is it possible to improve the speed over USB when SD card is mounted as MSD?. I developed this code from usb-msd-device example and my current speed is around 110KB/s. Please help if its possible?

Thanks,

Pramod.

0 Kudos
Reply