<p>Hoernchen has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/simtrace2/+/26028">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">firmware: increase reset delay before usb reattach<br><br>The previous value was way too low and led to reenumeration issues when<br>switching from app to bl because the hosts are fairly lenient and<br>feature long delays until they accept disappearing devices as gone for<br>good instead of ignoring a presuambly flaky usb cable or connection.<br><br>Related: SYS5061<br>Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36<br>---<br>M firmware/apps/dfu/main.c<br>M firmware/libcommon/source/usb.c<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/28/26028/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/firmware/apps/dfu/main.c b/firmware/apps/dfu/main.c</span><br><span>index 4813881..48ba879 100644</span><br><span>--- a/firmware/apps/dfu/main.c</span><br><span>+++ b/firmware/apps/dfu/main.c</span><br><span>@@ -342,7 +342,7 @@</span><br><span>     TRACE_INFO("USB init...\n\r");</span><br><span>     /* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */</span><br><span>         USBD_Disconnect();</span><br><span style="color: hsl(0, 100%, 40%);">-      mdelay(50);</span><br><span style="color: hsl(120, 100%, 40%);">+   mdelay(500);</span><br><span>         USBDFU_Initialize(&dfu_descriptors);</span><br><span> </span><br><span>         while (USBD_GetState() < USBD_STATE_CONFIGURED) {</span><br><span>diff --git a/firmware/libcommon/source/usb.c b/firmware/libcommon/source/usb.c</span><br><span>index 0868263..d86fc92 100644</span><br><span>--- a/firmware/libcommon/source/usb.c</span><br><span>+++ b/firmware/libcommon/source/usb.c</span><br><span>@@ -690,7 +690,7 @@</span><br><span>  unsigned int i;</span><br><span>      /* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */</span><br><span>         USBD_HAL_Suspend();</span><br><span style="color: hsl(0, 100%, 40%);">-     mdelay(20);</span><br><span style="color: hsl(120, 100%, 40%);">+   mdelay(500);</span><br><span>         USBD_HAL_Activate();</span><br><span> </span><br><span>     // Get std USB driver</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/simtrace2/+/26028">change 26028</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/simtrace2/+/26028"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: simtrace2 </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36 </div>
<div style="display:none"> Gerrit-Change-Number: 26028 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>