How to Rename USB SDcard Mass storage Device in code?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to Rename USB SDcard Mass storage Device in code?

跳至解决方案
1,473 次查看
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.

标签 (2)
标记 (3)
1 解答
1,091 次查看
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.

在原帖中查看解决方案

2 回复数
1,092 次查看
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.
1,091 次查看
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 项奖励
回复