Skip to content

Commit 3b3c775

Browse files
committed
pbio/drv/usb: extend USB transmit timeout
Extend the USB transmit timeout from 5 ms to 50 ms. We are getting spurious unsubscribes due to the timeout while still being connected, so 5 ms is not long enough. Let's increase by 1 order of magnitude and see how it goes.
1 parent ee90e96 commit 3b3c775

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/pbio/drv/usb/usb_ev3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ static pbio_error_t pbdrv_usb_ev3_process_thread(pbio_os_state_t *state, void *c
984984
prev_status_flags = ~0;
985985
}
986986
} else if (!was_transmitting && is_transmitting) {
987-
pbio_os_timer_set(&tx_timeout_timer, 5);
987+
pbio_os_timer_set(&tx_timeout_timer, 50);
988988
}
989989
was_transmitting = is_transmitting;
990990

lib/pbio/drv/usb/usb_stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ PROCESS_THREAD(pbdrv_usb_process, ev, data) {
515515
if (transmitting) {
516516
// If the FIFO isn't emptied quickly, then there probably isn't an
517517
// app anymore. This timer is used to detect such a condition.
518-
etimer_set(&transmit_timer, 5);
518+
etimer_set(&transmit_timer, 50);
519519
}
520520
}
521521

0 commit comments

Comments
 (0)