mist-devel / mist-binaries

Firmware and core binaries for the MIST board
202 stars 48 forks source link

Don't work USB Keybord. #115

Closed xolod79 closed 2 years ago

xolod79 commented 2 years ago

Between releases 20210530 (last work) and 20210618 my keyboard stopped working. If I switch to another USB socket, it starts working until it is powered off by MiST Console log on 20210618:

Minimig by Dennis van Weeren
ARM Controller by Jakub Bednarski

Version ATH210618

SDHC card detected
spiclk: 24 MHz
usb_init
max3421e_init()
Chip revision: 13
busprobe()
usb_reset_state
Partition Count: 1
Partition: 0 Start: 2048 Size: 61829120
Partition type: EXFAT
fat_size: 7552
fat_number: 1
fat_start: 4096
root_directory_start: 7
dir_entries: 0
data_start: 12288
cluster_size: 64
free_clusters: 4294967295
ChangeDirectoryName: / -> / = /
debug_mode = 0
Error opening file "/MIST.CFG" (4)
INI_PARSER : Start INI parser for core "(null)".
INI_PARSER : Can't open file CORE ARC !
ARC CONF STR:
loaded_from_usb = 0
FPGA bitstream file opened, file size = 217507
[**]
FPGA bitstream loaded
FPGA configured in 1304 ms
ident = a4
Identified 8BIT core
Sending core mod = 0
Core name from FPGA is "MENU"
Loading config /MENU.CFG
Looking for MENU.ROM
Looking for /MENU.ROM
Looking for /MENU.RAM
Looking for /MENU.VHD
error mounting /MENU.VHD (4)
Looking for /MENU.HD0
error mounting /MENU.HD0 (4)
Looking for /MENU.HD1
error mounting /MENU.HD1 (4)
Looking for /MENU.HD2
error mounting /MENU.HD2 (4)
Looking for /MENU.HD3
error mounting /MENU.HD3 (4)
INI_PARSER : Start INI parser for core "MENU".
INI_PARSER : Opened file /MIST.INI with size 1330 bytes.
INI_PARSER : line(0): "[mist]".
INI_PARSER : Got SECTION 'MIST' with ID 1
INI_PARSER : line(0): "scandoubler_disable=0".
INI_PARSER : Got VAR 'SCANDOUBLER_DISABLE' with VALUE 0
INI_PARSER : line(0): "csync_disable=1".
INI_PARSER : Got VAR 'CSYNC_DISABLE' with VALUE 1
INI_PARSER : line(0): "mouse_boot_mode=0".
INI_PARSER : Got VAR 'MOUSE_BOOT_MODE' with VALUE 0
INI_PARSER : line(0): "key_menu_as_rgui=0".
INI_PARSER : Got VAR 'KEY_MENU_AS_RGUI' with VALUE 0
INI_PARSER : line(0): "joystick_emu_fixed_index=1".
INI_PARSER : Got VAR 'JOYSTICK_EMU_FIXED_INDEX' with VALUE 1
INI_PARSER : line(0): "joystick_disable_shortcuts=0".
INI_PARSER : Got VAR 'JOYSTICK_DISABLE_SHORTCUTS' with VALUE 0
INI_PARSER : line(0): "joystick_prefered_db9=0".
INI_PARSER : line(0): "joystick_ignore_hat=0".
INI_PARSER : Got VAR 'JOYSTICK_IGNORE_HAT' with VALUE 0
INI_PARSER : line(0): "joystick_ignore_osd=0".
INI_PARSER : Got VAR 'JOYSTICK_IGNORE_OSD' with VALUE 0
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(0): "".
INI_PARSER : line(4): "".
sending keymap
CDC control open
OSD is now invisible
ChangeDirectoryName: / -> / = /
OSD is now visible
=> CONDETIRQ
busprobe()
=> BUSEVENTIRQ
usb_configure(parent=0 port=0 lowspeed=0)
using free entry at 0
Setting addr 1
usb_set_addr(new=1)
trying to init class 0
usb_hub_init()
-> accepted :-)
status change on port 3, 0x10301
Status of port 3:
connected
powered
low speed
Changes on port 3:
connected
dev 1: port 3 connect!
resetting port 3
status change on port 3, 0x100303
Status of port 3:
connected
enabled
powered
low speed
Changes on port 3:
reset
port 3 reset complete!
usb_configure(parent=1 port=3 lowspeed=1)
using free entry at 1
Setting addr 2
usb_set_addr(new=2)
failed to assign address

And after switch keyboard to another USB socket:

status change on port 2, 0x10301
Status of port 2:
connected
powered
low speed
Changes on port 2:
connected
dev 1: port 2 connect!
resetting port 2
status change on port 1, 0x110100
Status of port 1:
powered
Changes on port 1:
connected
reset
status change on port 2, 0x100303
Status of port 2:
connected
enabled
powered
low speed
Changes on port 2:
reset
port 2 reset complete!
usb_configure(parent=1 port=2 lowspeed=1)
using free entry at 1
Setting addr 2
usb_set_addr(new=2)
trying to init class 0
usb_hub_init()
not a hub!
-> not accepted :-(
trying to init class 1
HID: usb_hid_init(2)
HID: HID protocol is KEYBOARD
HID: hid descriptor size 9
HID: -> report descriptor size = 54
HID: endpoint 1, interval = 10ms
HID: HID protocol is NONE
HID: hid descriptor size 9
HID: -> report descriptor size = 161
HID: endpoint 2, interval = 10ms
HID: enabling boot mode
HID: HID report descriptor:
0000: 05 01 09 80 a1 01 85 02 19 81 29 83 15 00 25 01 ...€¡.…..)ƒ..%.
0010: 75 01 95 03 81 02 95 05 81 01 c0 05 09 09 01 a1 u.•..•..À....¡
0020: 01 85 03 0a 8a 01 0a 23 02 0a 2a 02 0a 21 02 0a .….....#..*..!..
0030: 27 02 0a 26 02 0a 25 02 0a 24 02 0a 83 01 0a cd '..&..%..$..ƒ..Í
0040: 00 0a b7 00 0a b6 00 0a b5 00 0a e9 00 0a ea 00 ..·..¶..µ..é..ê.
0050: 0a e2 00 0a 94 01 0a 92 01 0a 34 00 0a b2 00 0a .â..”..’..4..²..
0060: b4 00 0a 06 02 0a b8 00 0a 3d 02 15 00 25 01 95 ´.....¸..=...%.•
0070: 18 75 01 81 02 c0 05 09 09 01 a1 01 85 04 0a 56 .u..À....¡.…..V
0080: 01 0a 57 01 0a 58 01 0a 59 01 0a 5a 01 0a 5b 01 ..W..X..Y..Z..[.
0090: 15 00 25 01 95 06 75 01 81 02 95 01 75 02 81 01 ..%.•.u..•.u..
00a0: c0 À
HID NONE: report type = 0, size = 1
HID configured
-> accepted :-)
status change on port 1, 0x110100
Status of port 1:
powered
Changes on port 1:
connected
reset
status change on port 1, 0x110100
Status of port 1:
powered
Changes on port 1:
connected
reset

gyurco commented 2 years ago

It doesn't seem to be a firmware issue:

port 3 reset complete!
usb_configure(parent=1 port=3 lowspeed=1)
using free entry at 1
Setting addr 2
usb_set_addr(new=2)
failed to assign address

USB protocol error somewhere. If you can build a new firmware, you can investigate the error code, just change

puts("failed to assign address");

to

iprintf("failed to assign address (rcode=%d)", rcode);

in usb.c

Then the rcode can tell something about the problem.

BTW, other devices are working in port3? And after you plug your keyboard to port2, what are those events on port1? Can be a powering issue.

xolod79 commented 2 years ago

I have a USB-RTC connected to port 3 of the USB. Power problems cannot be ruled out. But on firmware before 30.05.2021(including it) everything works fine.

retrofun commented 2 years ago

@xolod79: is this still an issue with the current firmware?

USB enumeration was tweaked in the meantime. Does it work with firmware 220220+?

xolod79 commented 2 years ago

I confirm the latest firmware working normally with the keyboard