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.
This commit is contained in:
Christina Quast
2015-06-24 16:00:13 +02:00
parent ad6f4d3fd2
commit 3d8c093cb2

View File

@@ -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();
}