From 7a1beac2f9daf4e538453b86db2311f85038ccb0 Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Thu, 6 Mar 2014 11:32:18 +0100 Subject: firmware: Extend timeout with any USB traffic, set timeout to 6s fixed weird bug with USB3.0 hub where MN is only recognized after 5s --- firmware/bootloaderconfig.h | 2 +- firmware/main.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/firmware/bootloaderconfig.h b/firmware/bootloaderconfig.h index d52fa8c..3c1fba5 100644 --- a/firmware/bootloaderconfig.h +++ b/firmware/bootloaderconfig.h @@ -149,7 +149,7 @@ */ #define AUTO_EXIT_NO_USB_MS 0 -#define AUTO_EXIT_MS 5000 +#define AUTO_EXIT_MS 6000 /* * Defines the setting of the RC-oscillator calibration after quitting the bootloader. (OSCCAL) diff --git a/firmware/main.c b/firmware/main.c index 59e4616..1c265c7 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -176,8 +176,6 @@ static void writeWordToPageBuffer(uint16_t data) { static uint8_t usbFunctionSetup(uint8_t data[8]) { usbRequest_t *rq = (void *)data; - idlePolls.b[1]=0; // reset idle polls when we get usb traffic - if (rq->bRequest == cmd_device_info) { // get device info usbMsgPtr = (usbMsgPtr_t)configurationReply; return sizeof(configurationReply); @@ -281,7 +279,8 @@ int main(void) { if (USB_INTR_PENDING & (1<