summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcpldcpu <cpldcpu@gmail.com>2015-08-03 20:46:36 +0200
committercpldcpu <cpldcpu@gmail.com>2015-08-03 20:46:36 +0200
commit8b01dff4d0e7607e192339b0f7129c89c77b225e (patch)
treead7f87a04367e4cfdf777b8eefbc990221ae6f15
parent0fb6c10fa92b3bc3b5e217f1369d7325faba145c (diff)
downloadmicronucleus-8b01dff4d0e7607e192339b0f7129c89c77b225e.tar.gz
micronucleus-8b01dff4d0e7607e192339b0f7129c89c77b225e.tar.bz2
micronucleus-8b01dff4d0e7607e192339b0f7129c89c77b225e.zip
firmware: Fix win10 timing issue
-rw-r--r--firmware/osccalASM.S12
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/osccalASM.S b/firmware/osccalASM.S
index 57730bf..f13f417 100644
--- a/firmware/osccalASM.S
+++ b/firmware/osccalASM.S
@@ -102,7 +102,7 @@ calibrateOscillatorASM:
ldi try, 128 ; calibration start value
ldi stp, 0 ; initial step width=0 for sync phase (first delay is discarded)
- ldi i, 11 ; 11 iterations (1x sync, 7x binary search, 3x neighbourhood)
+ ldi i, 10 ; 10 iterations (1x sync, 7x binary search, 2x neighbourhood)
usbCOloop:
@@ -147,8 +147,14 @@ usbCOWaitLoop:
sbic USBIN, USBMINUS ;[2]
rjmp usbCOWaitLoop ;[3]
- ; This section of code deals with traffic from other USB devices on the same hub.
+/*
+
+ ; This section of code deals with traffic from other USB devices on the same hub on USB1.1 hubs.
; If this code is excluded, micronucleus may only work when it is connected to a dedicated USB port
+
+ ; Disabled due to issues with some Win10 USB drivers, which shorten the time between reset and
+ ; first datapacket to less than 20ms.
+
#ifndef ENABLE_UNSAFE_OPTIMIZATIONS
sbis USBIN, USBPLUS ; ignore frame if data is present
rjmp usbCOnotdata
@@ -165,6 +171,8 @@ usbCOWaitNoData2:
rjmp usbCOWaitNoData2
rjmp usbCOLoopNoCal
#endif
+
+*/
usbCOnotdata:
sbrs cnt16H, 7 ;delay overflow?