This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Dynamically changing USB Descriptor on NCS?

I would like to be able to use 3 different USB descriptors.

1. CDC ACM

2. Mass Storage

3. Composite device with CDC ACM and Mass Storage

These should be selectable within firmware based on what configuration is desired.

Is there a way to do this in the NCS?  I am current using v1.8.0.

I use the CDC ACM for Logging and shell, and the Mass Storage for data generated in the device.  However if I just configure the device for #3, then the data is corrupted via Windows 10.  So I would like to be able to enable/disable the Mass Storage as needed.

When the device is ejected and reattached as Mass Storage it works better, but since the CDC ACM is connected for debugging, when you try to eject the device in Windows, it will not let you if the CDC ACM is connected.

Parents
  • Interesting, so do you know anything about how the MSDEnable/Disable works?  I guess I'll go take a look at that functionality.

    The other issue seems to be corruption when accessing the device from both the firmware side and the PC side.  I guess I will need to disable the MSD function on the USB while the device is accessing the flash via FatFS and not write to it when the PC is accessing the device, correct?

    Is there any expectation that the flash via FatFS should work with both devices connected at the same time?

  • Sorry about the last question, let me rephrase.  Is there any plan to implement a locking mechanism that would allow for simultaneous operation between the processor and the USB driver as mention?  I am assuming that is up to the user to implement, but thought I would ask.

Reply
  • Sorry about the last question, let me rephrase.  Is there any plan to implement a locking mechanism that would allow for simultaneous operation between the processor and the USB driver as mention?  I am assuming that is up to the user to implement, but thought I would ask.

Children
No Data
Related