Not sure if here or the T4 thread is the best place to discuss/debug...
I tried with the current updated library(libraries) and still having issues with the thumb drives...
@WMXZ and @wwatson - First probably need to figure out how/where the USB Host device should be declared. With the example app as part of "this" library you have it explicitly defined as part of the sketch, where as with the uSDFS code it is defined internal to the library... The issue comes up, for example I thought I would try the thumb drive connected to a HUB instead of directly and nothing runs at all as there is no HUB device defined in the uSDFS library. Can define in sketch but it wants reference (or pointer?) to the usb object... Although in practice I don't think it actually uses it...
But back to main thing. Tried with two different thumb drives and I don't think either gets beyond the mount command.
The old Cruzer 1GB one
Code:
Test uSDFS
2:/
USB2 PLL running
reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20005000
periodictable = 20005000
port change: 10001803
connect
begin reset
port change: 18001205
port enabled
end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
12 01 00 02 09 00 01 40 E3 05 08 06 98 32 00 01 00 01
VendorID = 05E3, ProductID = 0608, Version = 3298
Class/Subclass/Protocol = 9(Hub) / 0 / 1(Single-TT)
Number of Configurations = 1
enumeration:
enumeration:
Product: USB2.0 Hub
enumeration:
Config data length = 25
enumeration:
Configuration Descriptor:
09 02 19 00 01 01 00 E0 32
NumInterfaces = 1
ConfigurationValue = 1
09 04 00 00 01 09 00 00 00
Interface = 0
Number of endpoints = 1
Class/Subclass/Protocol = 9(Hub) / 0 / 0
07 05 81 03 01 00 0C
Endpoint = 1 IN
Type = Interrupt
Max Size = 1
Polling Interval = 12
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20004460
found possible interface, altsetting=0
number of interfaces found = 1
USBHub control callback
09 29 04 E0 00 32 64 00 FF 00 00 00 00 00 00 00
Hub ports = 4
USBHub control callback
USBHub control callback
USBHub control callback
USBHub control callback
power turned on to all ports
device addr = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
ep interval = 12
interval = 256
best_bandwidth = 2, at offset = 0
pipe cap1 = F0012101
HUB Callback (member)
status = 8
getstatus, port = 3
USBHub control callback
01 01 01 00
New Port Status
status=10101 port=3
state=0
Device is present:
Has Power
USBHub control callback
Port Status Cleared, port=3
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 01 00 00
New Port Status
status=101 port=3
state=2
Device is present:
Has Power
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 01 00 00
New Port Status
status=101 port=3
state=3
Device is present:
Has Power
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 01 00 00
New Port Status
status=101 port=3
state=4
Device is present:
Has Power
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 01 00 00
New Port Status
status=101 port=3
state=5
Device is present:
Has Power
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 8
getstatus, port = 3
USBHub control callback
01 01 00 00
New Port Status
status=101 port=3
state=6
Device is present:
Has Power
sending reset
send_setreset
USBHub control callback
unhandled setup, message = 40323
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 0
HUB Callback (member)
status = 8
getstatus, port = 3
USBHub control callback
03 05 10 00
New Port Status
status=100503 port=3
state=7
Device is present:
Enabled, speed = 480 Mbit/sec
Has Power
USBHub control callback
unhandled setup, message = 140123
timer event (24999 us): Hello, I'm resettimer, this = 20004460, timer = 20004794
port_doing_reset = 3
PORT_RECOVERY
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
12 01 00 02 00 00 00 40 81 07 06 54 00 02 01 02 03 01
VendorID = 0781, ProductID = 5406, Version = 0200
Class/Subclass/Protocol = 0 / 0 / 0
Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: SanDisk
enumeration:
Product: U3 Cruzer Micro
enumeration:
Serial Number: 00007080C0732B8C
enumeration:
Config data length = 32
enumeration:
Configuration Descriptor:
09 02 20 00 01 01 00 80 2F
NumInterfaces = 1
ConfigurationValue = 1
09 04 00 00 02 08 06 50 00
Interface = 0
Number of endpoints = 2
Class/Subclass/Protocol = 8(Mass Storage) / 6(SCSI) / 80(Bulk Only)
07 05 81 02 00 02 00
Endpoint = 1 IN
Type = Bulk
Max Size = 512
Polling Interval = 0
07 05 02 02 00 02 00
Endpoint = 2 OUT
Type = Bulk
Max Size = 512
Polling Interval = 0
enumeration:
msController claim this=20004840
Descriptor 4 = INTERFACE
msController claim this=20004840
09 04 00 00 02 08 06 50 00 07 05 81 02 00 02 00 07 05 02 02 00 02 00
endpointType = 2
numendpoint=2
endpointIn=81
endpointOut=2
packet size in (msController) = 512
packet size out (msController) = 512
polling intervalIn = 0
polling intervalOut = 0
new_Pipe
new_Pipe
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
control CallbackIn (msController)
00 00 00 00 00 00 00 00
control CallbackIn (msController)
01 00 00 00 00 00 00 00
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
...
Gets into an endless cycle of transfers... Don't see anything like the next message to do CD...
The newer drive does not work either (I also just tried reformat on windows 10 Fat system... to see if that would change it). Again does not get to the CD... But instead of endless messages it just hangs...
Code:
Test uSDFS
2:/
USB2 PLL running
reset waited 6
USBHS_ASYNCLISTADDR = 0
USBHS_PERIODICLISTBASE = 20005000
periodictable = 20005000
port change: 10001803
connect
begin reset
port change: 18001205
port enabled
end recovery
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
12 01 00 02 09 00 01 40 E3 05 08 06 98 32 00 01 00 01
VendorID = 05E3, ProductID = 0608, Version = 3298
Class/Subclass/Protocol = 9(Hub) / 0 / 1(Single-TT)
Number of Configurations = 1
enumeration:
enumeration:
Product: USB2.0 Hub
enumeration:
Config data length = 25
enumeration:
Configuration Descriptor:
09 02 19 00 01 01 00 E0 32
NumInterfaces = 1
ConfigurationValue = 1
09 04 00 00 01 09 00 00 00
Interface = 0
Number of endpoints = 1
Class/Subclass/Protocol = 9(Hub) / 0 / 0
07 05 81 03 01 00 0C
Endpoint = 1 IN
Type = Interrupt
Max Size = 1
Polling Interval = 12
enumeration:
USBHub memory usage = 960
USBHub claim_device this=20004460
found possible interface, altsetting=0
number of interfaces found = 1
USBHub control callback
09 29 04 E0 00 32 64 00 FF 00 00 00 00 00 00 00
Hub ports = 4
USBHub control callback
USBHub control callback
USBHub control callback
USBHub control callback
power turned on to all ports
device addr = 1
new_Pipe
allocate_interrupt_pipe_bandwidth
ep interval = 12
interval = 256
best_bandwidth = 2, at offset = 0
pipe cap1 = F0012101
HUB Callback (member)
status = 4
getstatus, port = 2
USBHub control callback
01 01 01 00
New Port Status
status=10101 port=2
state=0
Device is present:
Has Power
USBHub control callback
Port Status Cleared, port=2
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 4
getstatus, port = 2
USBHub control callback
01 01 00 00
New Port Status
status=101 port=2
state=2
Device is present:
Has Power
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 4
getstatus, port = 2
USBHub control callback
01 01 00 00
New Port Status
status=101 port=2
state=3
Device is present:
Has Power
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 4
getstatus, port = 2
USBHub control callback
01 01 00 00
New Port Status
status=101 port=2
state=4
Device is present:
Has Power
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 4
getstatus, port = 2
USBHub control callback
01 01 00 00
New Port Status
status=101 port=2
state=5
Device is present:
Has Power
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 4
getstatus, port = 2
USBHub control callback
01 01 00 00
New Port Status
status=101 port=2
state=6
Device is present:
Has Power
sending reset
send_setreset
USBHub control callback
unhandled setup, message = 40323
timer event (19999 us): Debounce Timer, this = 20004460, timer = 20004778
ports in use bitmask = 0
HUB Callback (member)
status = 4
getstatus, port = 2
USBHub control callback
03 05 10 00
New Port Status
status=100503 port=2
state=7
Device is present:
Enabled, speed = 480 Mbit/sec
Has Power
USBHub control callback
unhandled setup, message = 140123
timer event (24999 us): Hello, I'm resettimer, this = 20004460, timer = 20004794
port_doing_reset = 2
PORT_RECOVERY
new_Device: 480 Mbit/sec
new_Pipe
enumeration:
enumeration:
enumeration:
Device Descriptor:
12 01 00 02 00 00 00 40 0C 09 00 10 00 11 01 02 00 01
VendorID = 090C, ProductID = 1000, Version = 1100
Class/Subclass/Protocol = 0 / 0 / 0
Number of Configurations = 1
enumeration:
enumeration:
Manufacturer: SMI Corporation
enumeration:
Product: USB DISK
enumeration:
Config data length = 32
enumeration:
Configuration Descriptor:
09 02 20 00 01 01 00 80 FA
NumInterfaces = 1
ConfigurationValue = 1
09 04 00 00 02 08 06 50 00
Interface = 0
Number of endpoints = 2
Class/Subclass/Protocol = 8(Mass Storage) / 6(SCSI) / 80(Bulk Only)
07 05 81 02 00 02 FF
Endpoint = 1 IN
Type = Bulk
Max Size = 512
Polling Interval = 255
07 05 02 02 00 02 FF
Endpoint = 2 OUT
Type = Bulk
Max Size = 512
Polling Interval = 255
enumeration:
msController claim this=20004840
Descriptor 4 = INTERFACE
msController claim this=20004840
09 04 00 00 02 08 06 50 00 07 05 81 02 00 02 FF 07 05 02 02 00 02 FF
endpointType = 2
numendpoint=2
endpointIn=81
endpointOut=2
packet size in (msController) = 512
packet size out (msController) = 512
polling intervalIn = 255
polling intervalOut = 255
new_Pipe
new_Pipe
Descriptor 5 = ENDPOINT
Descriptor 5 = ENDPOINT
control CallbackIn (msController)
00 00 00 00 00 00 00 00
control CallbackIn (msController)
00 00 00 00 00 00 00 00
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
msController CallbackOut (static)
transfer->qtd.token = 1
msController dataOut (static)
msController CallbackIn (static)
transfer->qtd.token = 0
msController dataIn (static)
Edit: wondering if polling interval differences? The one says 0 the other is 255