aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorChristina Quast <chrysh.ng+git@gmail.com>2015-06-24 16:00:13 +0200
committerChristina Quast <chrysh.ng+git@gmail.com>2015-06-24 16:02:52 +0200
commit3d8c093cb222f251e77af58a0bf9a22e7fba1545 (patch)
treeb409dc1837b380ca7addb36cb11ca6b76e5635ac /firmware
parentad6f4d3fd21e60d0892cdc69899e6f5dd16e9892 (diff)
main: Increase timeout for USB configured state
When the timeout was too small, the main function would infinitely loop around, restarting the board and waiting for the USB interface to get configured. But since configuration seems to take more than one second, it rarely succeeded. Increasing the timeout makes the USB configuration finish in the first try.
Diffstat (limited to 'firmware')
-rw-r--r--firmware/src_simtrace/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/src_simtrace/main.c b/firmware/src_simtrace/main.c
index dbe5e46..afb82f3 100644
--- a/firmware/src_simtrace/main.c
+++ b/firmware/src_simtrace/main.c
@@ -51,7 +51,7 @@ extern int main( void )
printf("%s", "USB init\n\r");
while(USBD_GetState() < USBD_STATE_CONFIGURED){
- if(i >= MAX_USB_ITER) {
+ if(i >= MAX_USB_ITER*3) {
TRACE_ERROR("Resetting board (USB could not be configured)\n");
NVIC_SystemReset();
}