This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5529: Use MCU's Flash as mass storage and CDC interface together over USB

Part Number: MSP430F5529

Hello,

I am using MSP430F5529 launchpad. I want to use Flash of MCU as a mass storage device to save some configurations of I2C slave devices and CDC interface on windows to get I2C commands from COM port.

I am using TI's MSP430 developer package as my reference and both of them(flash as a mass storage and CDC interface) are working independently. But I want to use both of these interfaces together. Is it possible?

  • Hi Rohit,

    Yes it is possbile to use both MSC and CDC interfaces together.  To create the descriptors for this composite you can use the Descriptor tool that comes with the USB developers package.  Once the descriptors are created, you will have to create an application for your implementation. 

    Regards,


    Arthi

  • Hi Arthi,

    Thank you for your reply.

    I used descriptor for CDC and MSC combination generated by Descriptor tool. I am able to detect mass storage device and but "Virtual COM Port (CDC)" as an other device. I also followed the steps from Examples_Guide_MSP430_USB.pdf to install USB_config of my project but getting below error message as a result:

    I am using MSP430_CDC.inf file which is generated by descriptor tool. I am using VID: 2047 and PID: 03E2 (Descriptor tool is showing valid range: 0x03DF-0x03FD).

    Please point me where I am missing something.

    Regards,

    Rohit

  • Hi Rohit,

    So there is a bug in the Descriptor tool where the .inf file is not generated with the correct device identifier for CDC + MSC composite devices.  I have put in a bug to have this fixed in the next release of the USB Developers Package.  In the meantime, here is what you can do to install the .inf file.

    Open the .inf file you created with the descriptor tool and change every instance of MI_00 to MI_01.   Then right click on the 'Virual COM Port' in Task Manager and point the driver installation to the directory where you have the updated .inf file. 

    Regards,

    Arthi

  • Thanks Arthi for support.

    Above solution worked for me.

    Regards,

    Rohit

  • Arthi,

    I need to install the .inf file whenever I will connect my MSP to another machine(computer) through USB. Is there any solution so that I do not need to install .inf file manually?

    Regards,
    Rohit
  • Hello Arthi,

    Is there any limitation on number of characters of filename while using file from mass storage?

    I am not able to open file if length of filename is more than some number.

    Rohit

  • Rohit,

    I was able to use a file name of up to 257 characters and I was able to open and save the file.  How many characters are in your filename?

    Regards,

    Arthi

  • Arthi,

    I am not able to open file having more than 12 characters in filename.

    Meanwhile I found that i should use USE_LFN macro (in ffconf.h) with 2 value to support long file name. But in that case, ff_convert and ff_wtoupper functions are needed in my source of FatFs but they are not defined.

    What is the value of this macro in your case? Do you have above functions defined in your source? If yes then please share that file.

    Thanks,

    Rohit

  • Rohit, I used the M1_fileSystemEmulation example that comes with the Developers Package. If you downloaded this package you should have that example available. If not, you can download this example using Resource Explorer.

    Regards,
    Arthi
  • Arthi,

    Yes I am also using same filesystem from developer package. I think there is some misunderstanding. By "I am not able to open file" I want to say that I am not able to open file in code using f_open() api of the filesystem FatFs.

    I am able to get new drive while connecting MSP and also can open file in notepad. If name of the file is longer than 12 characters then also I am able to open it in notepad but in this case I am not able to open it using f_open() api from code.

    Rohit

  • Rohit,

    Can you try a shorter path tot he file? It could be a combination of path length limits you are running up against.
  • JH,

    I am using only "filename.txt". I do not have multiple directories in my filesystem. But then also I able to use only upto 8 characters as filename.

    Rohit.
  • Rohit,

    To clarify, is this the filesytem on your PC, or implemented on the MSP430? If on MSP430, I'm thinking you are running into an array limit or something.

**Attention** This is a public forum