Change in simtrace2[master]: firmware: increase reset delay before usb reattach

2021-11-01 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/simtrace2/+/26028 )

Change subject: firmware: increase reset delay before usb reattach
..

firmware: increase reset delay before usb reattach

The previous value was way too low and led to reenumeration issues when
switching from app to bl because the hosts are fairly lenient and
feature long delays until they accept disappearing devices as gone for
good instead of ignoring a presuambly flaky usb cable or connection.

Related: SYS5061
Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
---
M firmware/apps/dfu/main.c
M firmware/libcommon/source/usb.c
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/firmware/apps/dfu/main.c b/firmware/apps/dfu/main.c
index 4813881..48ba879 100644
--- a/firmware/apps/dfu/main.c
+++ b/firmware/apps/dfu/main.c
@@ -342,7 +342,7 @@
TRACE_INFO("USB init...\n\r");
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 
ms */
USBD_Disconnect();
-   mdelay(50);
+   mdelay(500);
USBDFU_Initialize(_descriptors);

while (USBD_GetState() < USBD_STATE_CONFIGURED) {
diff --git a/firmware/libcommon/source/usb.c b/firmware/libcommon/source/usb.c
index 0868263..d86fc92 100644
--- a/firmware/libcommon/source/usb.c
+++ b/firmware/libcommon/source/usb.c
@@ -690,7 +690,7 @@
unsigned int i;
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 
ms */
USBD_HAL_Suspend();
-   mdelay(20);
+   mdelay(500);
USBD_HAL_Activate();

// Get std USB driver

--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26028
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
Gerrit-Change-Number: 26028
Gerrit-PatchSet: 5
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: merged


Change in simtrace2[master]: firmware: increase reset delay before usb reattach

2021-11-01 Thread Hoernchen
Hello Jenkins Builder, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/simtrace2/+/26028

to look at the new patch set (#5).

Change subject: firmware: increase reset delay before usb reattach
..

firmware: increase reset delay before usb reattach

The previous value was way too low and led to reenumeration issues when
switching from app to bl because the hosts are fairly lenient and
feature long delays until they accept disappearing devices as gone for
good instead of ignoring a presuambly flaky usb cable or connection.

Related: SYS5061
Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
---
M firmware/apps/dfu/main.c
M firmware/libcommon/source/usb.c
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/28/26028/5
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26028
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
Gerrit-Change-Number: 26028
Gerrit-PatchSet: 5
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: newpatchset


Change in simtrace2[master]: firmware: increase reset delay before usb reattach

2021-11-01 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/simtrace2/+/26028 )

Change subject: firmware: increase reset delay before usb reattach
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26028
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
Gerrit-Change-Number: 26028
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 01 Nov 2021 12:04:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in simtrace2[master]: firmware: increase reset delay before usb reattach

2021-11-01 Thread Hoernchen
Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/simtrace2/+/26028 )

Change subject: firmware: increase reset delay before usb reattach
..


Patch Set 3:

(1 comment)

https://gerrit.osmocom.org/c/simtrace2/+/26028/3/firmware/libcommon/source/usb.c
File firmware/libcommon/source/usb.c:

https://gerrit.osmocom.org/c/simtrace2/+/26028/3/firmware/libcommon/source/usb.c@693
PS3, Line 693:  mdelay(500);
> are we sure this doesn't make us run into the watchdog?
I don't see how, the apps are loaded immediately by calling their reset handler 
functions from the bl reset handler, and those apps then initialize the WD with 
a 2s timeout before calling this function, there is nothing that should be 
blocking this long here, and after returning the wd gets reset while waiting 
until usb is initialized.



--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26028
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
Gerrit-Change-Number: 26028
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Mon, 01 Nov 2021 11:25:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in simtrace2[master]: firmware: increase reset delay before usb reattach

2021-10-31 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/simtrace2/+/26028 )

Change subject: firmware: increase reset delay before usb reattach
..


Patch Set 3: Code-Review+1

(1 comment)

https://gerrit.osmocom.org/c/simtrace2/+/26028/3/firmware/libcommon/source/usb.c
File firmware/libcommon/source/usb.c:

https://gerrit.osmocom.org/c/simtrace2/+/26028/3/firmware/libcommon/source/usb.c@693
PS3, Line 693:  mdelay(500);
are we sure this doesn't make us run into the watchdog?



--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26028
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
Gerrit-Change-Number: 26028
Gerrit-PatchSet: 3
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sun, 31 Oct 2021 07:35:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in simtrace2[master]: firmware: increase reset delay before usb reattach

2021-10-29 Thread Hoernchen
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/simtrace2/+/26028

to look at the new patch set (#2).

Change subject: firmware: increase reset delay before usb reattach
..

firmware: increase reset delay before usb reattach

The previous value was way too low and led to reenumeration issues when
switching from app to bl because the hosts are fairly lenient and
feature long delays until they accept disappearing devices as gone for
good instead of ignoring a presuambly flaky usb cable or connection.

Related: SYS5061
Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
---
M firmware/apps/dfu/main.c
M firmware/libcommon/source/usb.c
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/28/26028/2
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26028
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
Gerrit-Change-Number: 26028
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in simtrace2[master]: firmware: increase reset delay before usb reattach

2021-10-29 Thread Hoernchen
Hoernchen has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/simtrace2/+/26028 )


Change subject: firmware: increase reset delay before usb reattach
..

firmware: increase reset delay before usb reattach

The previous value was way too low and led to reenumeration issues when
switching from app to bl because the hosts are fairly lenient and
feature long delays until they accept disappearing devices as gone for
good instead of ignoring a presuambly flaky usb cable or connection.

Related: SYS5061
Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
---
M firmware/apps/dfu/main.c
M firmware/libcommon/source/usb.c
2 files changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/28/26028/1

diff --git a/firmware/apps/dfu/main.c b/firmware/apps/dfu/main.c
index 4813881..48ba879 100644
--- a/firmware/apps/dfu/main.c
+++ b/firmware/apps/dfu/main.c
@@ -342,7 +342,7 @@
TRACE_INFO("USB init...\n\r");
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 
ms */
USBD_Disconnect();
-   mdelay(50);
+   mdelay(500);
USBDFU_Initialize(_descriptors);

while (USBD_GetState() < USBD_STATE_CONFIGURED) {
diff --git a/firmware/libcommon/source/usb.c b/firmware/libcommon/source/usb.c
index 0868263..d86fc92 100644
--- a/firmware/libcommon/source/usb.c
+++ b/firmware/libcommon/source/usb.c
@@ -690,7 +690,7 @@
unsigned int i;
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 
ms */
USBD_HAL_Suspend();
-   mdelay(20);
+   mdelay(500);
USBD_HAL_Activate();

// Get std USB driver

--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26028
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
Gerrit-Change-Number: 26028
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen 
Gerrit-MessageType: newchange