-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LUFA stack using 10-20% CPU in "System Interrupts" (windows) #223
Comments
Most of that LUFA data is probably 'debug console data'(Endpoint 4 IN), uneeded empty data seems to be sent every 1ms. Build firmware with commenting out |
Commenting out |
...actually, it works a bit more than that. Layer switching works, and my bootloader keystroke works, and power. But none of the normal keys seem to. |
You are on Windows? If so remove device drivers of your keyboard from Device Manager. |
Thanks. I'm now running LUFA without the cpu drain, but also without the console. I don't really need the console for day to day use (although I did have an idea to make a layer visualiser using a wrapped hid_listen.exe). |
I'll look into BTW, What's your OS actually? I don't see this problem on my Windows 7. |
Windows 8.1 Pro. I've got another win 8.1 pro machine at home. I'll try it on that later and see if I get the same behaviour. |
Old console sent unneeded empty data every one milli sencond. After this fix console flushes endpoint data bank every 50ms only when needed.
Hopefully fixed at fdce0c9 |
57d27a8 Merge branch 'core_update_150924' into core 024abe3 core: Fix NKRO ifdef 7aa2d30 core: Fix for disabling NKRO in Boot protocol 95651fd core: Fix message print of debug command c20cd29 lufa: Fix endpoint bank mode for ATMega32u2 82ac21f next_usb: Fix next_kbd_set_leds() 537d9c7 Change to KC_BOOTLOADER(KC_BTLD) f2b3772 Add an assignable RESET key fc99257 Fix parenthesis e852582 Fix weak modifier clear in action macro c2a6c5c core: Fix lufa suspend callback(#234) fa548c5 usb_usb: Ignore error usage(0x01-03) report 513d95c usb_usb: Support locking key indicator LED cd78802 core: Add keymap section ldscript for ATMega32U2 70c9abd Add description for non-US keys on keycode.h 538c192 lufa: Fix console flush #223 87628c9 Revert "Make action_for_key a weak symbol" 3c0a1ba Make action_for_key a weak symbol 6bb0d7d ibm4704_usb: Fix protocol handling b6ef5cf Add keyboard_setup() and matrix_setup() f4bb8b2 ibm4704_usb: Fix interrupt of clock(rising edge) 0c1fcc1 usb_usb: Change debug LED pin config 595710d Reduce code size of magic commands 6bed174 Add description of AVR bootloader and boot section 54c6a01 Merge commit 'f6d56675f9f981c5464f0ca7a1fbb0162154e8c5' d18d42e Merge branch 'core-update2' into core febec88 Add compile options '-fdata-sections' git-subtree-dir: tmk_core git-subtree-split: 57d27a8
Old console sent unneeded empty data every one milli sencond. After this fix console flushes endpoint data bank every 50ms only when needed.
Old console sent unneeded empty data every one milli sencond. After this fix console flushes endpoint data bank every 50ms only when needed.
So I noticed in resmon.exe that "System Interrupts" or "Deferred Procedure Calls and Interrupt Service Routines" was taking 10-20% CPU nearly all the time.
Unplugging my ergodox (with TMK/LUFA stack) made the problem go away.
Out of interest, I recompiled the firmware with the PJRC stack, and the problem went away as well (although the PJRC stack has other issues).
I've made 2 traces I recorded using USBPcap - in both recordings I pressed the windows key a couple times then Ctrl-Ced the recording. You can see the LUFA one is constantly raising interrupts, but the PJRC one only raised a handful.
I don't know how to read USB/HID frames. Any idea what the LUFA firmware is trying to do? Or a better way of inspecting the traffic?
LUFA recording
PJRC recording
Let me know if you'd rather I raised this on @cub-uanic 's ergodox branch, but he has said in another issue that he hasn't played with the USB stacks.
The text was updated successfully, but these errors were encountered: