<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>USB MSD device enable/disable within composite device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85962/usb-msd-device-enable-disable-within-composite-device</link><description>I submitted this ticket about dynamically changing the USB descriptor to enable or disable the MSD device 
 https://devzone.nordicsemi.com/f/nordic-q-a/85653/dynamically-changing-usb-descriptor-on-ncs 
 
 The original case is locked, but to further explain</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Mar 2022 12:55:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85962/usb-msd-device-enable-disable-within-composite-device" /><item><title>RE: USB MSD device enable/disable within composite device</title><link>https://devzone.nordicsemi.com/thread/359131?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 12:55:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35847075-7891-43ee-b3a4-4f1f8d90b150</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I will ask a bit internally and let you know when I hear back. I could find this presentation that was a year ago, from the presentation it looks like they are looking into this:&amp;nbsp;&lt;a href="https://www.youtube.com/watch?v=dJ7_aRPM4Os"&gt;https://www.youtube.com/watch?v=dJ7_aRPM4Os&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB MSD device enable/disable within composite device</title><link>https://devzone.nordicsemi.com/thread/358994?ContentTypeID=1</link><pubDate>Mon, 21 Mar 2022 05:20:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7435c10e-6d8b-47bd-a162-a1e5bf8fa207</guid><dc:creator>dstarling</dc:creator><description>&lt;p&gt;I would tend to agree with that assessment, the issue is to filter this, I&amp;#39;ll likely have to copy the entire USB driver to be able to modify the function that updates the descriptors from static memory before output.&amp;nbsp; It currently does a couple of things like fix-up the serial number field.&amp;nbsp; The ability to filter descriptors likely should go in that function.&lt;br /&gt;So I&amp;#39;ll end up maintaining another custom driver outside the source tree unless I can get it adopted by Nordic/Zephyr?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: USB MSD device enable/disable within composite device</title><link>https://devzone.nordicsemi.com/thread/358850?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 12:34:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a03c1b2-73f3-4bf3-b8b9-ddf02a9d6f95</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;My impression is that in zephyr you add various USB class support during compile time by various config options, e.g.&amp;nbsp;CONFIG_USB_MASS_STORAGE. It&amp;#39;s not intended (or designed if you like) to dynamically adjust these run-time. So my suggestion would be inline with yours, that you need to manipulate the USB descriptors before you enable USB if you intermittently want to remove functionality. To switch configurations I suspect you need to do a softreset of the nRF52840, this will trigger the host to re-enumerate the USB device. To know which USB functionality you want to support at start of main() you may consider using the GPREGRET register (set it to a predefined value before you execute soft reset),&amp;nbsp;since GPREGRET is a retained register between soft resets:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/power/doc/power.html#register.GPREGRET"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/power/doc/power.html#register.GPREGRET&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>