tmk [Tue, 7 May 2019 03:01:59 +0000 (12:01 +0900)]
usb_usb: Add options for disabling blocking loops
USB startup wait loop delays UHS2 Task() starting for a while
like 200-600ms and USB suspend loop blocks the Task() while power
saving like 15-17ms. These loops may cause keyboard enumeration
failure, perhaps. Not confirmed it yet though.
tmk [Tue, 7 May 2019 02:09:25 +0000 (11:09 +0900)]
lufa: Startup and suspend loop can be disabled
Startup wait loop is originally intended to start keyboard task loop and
after console output endpoint becomes available. But now that console
output is buffered when it is not available and you don't have to wait
for it to be ready. You can disable the startup wait loop by defining
NO_WAIT_FOR_USB_CONFIGURED in config.h
Suspend loop is used for power saving by making tasks stop while
USB bus is under suspend status. But this may cause problem on some
devices like converter that must keep doing its task to retain
communication with keyboard. The suspend loop can block its task for
around 15-17ms. You can disable the suspend loop by defining
NO_USB_SUSPEND_LOOP in config.h.
tmk [Mon, 6 May 2019 03:15:37 +0000 (12:15 +0900)]
usb_usb: Order of init prevents uneeded bus reset
Device classes are registered to array of config driver pool and
tried in that order until proper class is found in configuration process.
If tried driver cannot handle device, bus reset is issued to the device.
tmk [Fri, 29 Mar 2019 06:45:20 +0000 (15:45 +0900)]
lufa: Fix for freeze at re/boot time problem
Calling led_set() in ISR can cause the problem. With converter
especially, led_set() can take long time and USB can be stuck in the end.
USB-USB converter freezes occasionally when computer power up or reboot.
https://geekhack.org/index.php?topic=69169.msg2740179#msg2740179
This is also related to suspend/wakeup issue #386.
Correct the comments of matrix ROW and COL. (#604)
according to the code:
static uint8_t matrix[MATRIX_ROWS];
#define ROW(code) (code>>3)
#define COL(code) (code&0x07)
in converter/terminal_usb/matrix.c
ROW is decided by bits 7-4 of scancode
COL is decided by bits 2-0 of scancode
Correct the comments of matrix ROW and COL. (#600)
according to the code:
static uint8_t matrix[MATRIX_ROWS];
#define ROW(code) (code>>3)
#define COL(code) (code&0x07)
in converter/ps2_usb/matrix.c
ROW is decided by bits 7~4 of scancode
COL is decided by bits 2~0 of scancode
tmk [Sun, 28 Oct 2018 04:43:59 +0000 (13:43 +0900)]
lufa: usb-usb: Use LUFA startup instead of cusotom
- Change keyboard_init() timing and matrix_scan() is called in USB
startup wait loop for FC660C
- FC660C startup seems to be faster and it doesn't work without this fix
when plugin the keyboard and converter at same time
console_putc:
Linux: works very well in general
Windows: also works very well and connection seems to be faster than Linux
Mac: to be: confirmed
NOTE: long session of matrix_print still blocks keyboard_task in main loop
and prevents it from sending keyboard report.
XT protocol buffer overflow occurs when slamng on keys
TODO: check when print functions are called in ISR
- This bug occurs when sending LED out report before keyboard becomes ready
- Ckecking with isReady() before using SetReport() solves this
- Slow startup keyboard like TMK trrigers this bug and Linux shows following error just after plugin converter
usb 3-1: device descriptor read/64, error -62