Forum Rule: Always post complete source code & details to reproduce any issue!
Page 25 of 25 FirstFirst ... 15 23 24 25
Results 601 to 606 of 606

Thread: USBHost_t36 USB Mass Storage Driver Experiments

  1. #601
    Senior Member xxxajk's Avatar
    Join Date
    Nov 2013
    Location
    Buffalo, NY USA
    Posts
    590
    Quote Originally Posted by wwatson View Post
    And again it continues but does not seem to get past the inquiry phase.
    The inquiry phase is seeing the thumb drive.
    Is this a powered hub by any chance?

  2. #602
    Senior Member xxxajk's Avatar
    Join Date
    Nov 2013
    Location
    Buffalo, NY USA
    Posts
    590
    @wwaton It was a bug that crept in. Fixed and working.

  3. #603
    Senior Member wwatson's Avatar
    Join Date
    Aug 2017
    Posts
    535
    Quote Originally Posted by xxxajk View Post
    Is this a powered hub by any chance?
    No, it is a Belkin four port HUB that I have been using for quite some time now and works with MSC. Have never had an issue with it. It has a power LED that lets me know when VUSB has been turned on.

  4. #604
    Senior Member wwatson's Avatar
    Join Date
    Aug 2017
    Posts
    535
    Quote Originally Posted by xxxajk View Post
    @wwaton It was a bug that crept in. Fixed and working.
    Did a pull on the library and results were this:

    With HUB:
    Code:
    Start.
    
    SWI_IRQ_NUM 30
    
    
    USB HOST READY.
    No media. Waiting to mount /
    
    
    
    Configuring: parent = 0, port = 1, speed = 2
    $$$$$$$$$$$$$$$$$$$$$$$$$ ADDRESS 1: 0 retries.
    $$$$$$$$$$$$$$$$$$$$$$$$$ ADDRESS 1: 0 retries.
    USBHub: checking numep 1, klass 09, interface.klass 09, protocol 00/01-00?01
    USBHub: checking numep 1, klass 09, interface.klass 09, protocol 00/01-01?01
    USBHub Accepting address assignment 01
    dispatchPkt status code 08
    dispatchPkt OTHER
    USBHub configure 01 04 02
    
    
    
    Configuring: parent = 1, port = 4, speed = 2
    $$$$$$$$$$$$$$$$$$$$$$$$$ ADDRESS 2: 0 retries.
    $$$$$$$$$$$$$$$$$$$$$$$$$ ADDRESS 2: 0 retries.
    BulkOnly: checking numep 2, klass 00, subklass 00
    BulkOnly: checking protocol 00, interface.klass 08, interface.subklass 06
    BulkOnly: checking interface.protocol 50
    BulkOnly: checking numep 2, klass 00, subklass 00
    BulkOnly: checking protocol 00, interface.klass 08, interface.subklass 06
    BulkOnly: checking interface.protocol 50
    
    BS SetInterface
    ep: 0x00 bmAttributes: 0x02 index: 1
    
    ep: 0x01 bmAttributes: 0x02 index: 2
    
    BS Start, speed: 2
    BS Start
    GetMaxLUN 0x00
    MaxLUN 0
    Inquiry 0x24 0x00
    LUN 0 `KingstonDataTraveler 3.0'
    Qualifier 0 Device type 00 RMB 1 SSCS 0 SCSI version 06
    Device conforms to T10/1731-D (SPC-4) standards.
    CheckLUN...
    9
    >>>>>>>>>>>>>>>>CAPACITY OK ON LUN 0
    039a33f300000200
    
    9
    Checked LUN...
    Onstart begin
    BS configured
    
    Configuring returned 00
    Without HUB:

    Code:
    Start.
    
    SWI_IRQ_NUM 30
    
    
    USB HOST READY.
    No media. Waiting to mount /
    
    
    
    Configuring: parent = 0, port = 1, speed = 2
    $$$$$$$$$$$$$$$$$$$$$$$$$ ADDRESS 1: 0 retries.
    $$$$$$$$$$$$$$$$$$$$$$$$$ ADDRESS 1: 0 retries.
    USBHub: checking numep 2, klass 00, interface.klass 08, protocol 50/00-00?01
    BulkOnly: checking numep 2, klass 00, subklass 00
    BulkOnly: checking protocol 00, interface.klass 08, interface.subklass 06
    BulkOnly: checking interface.protocol 50
    USBHub: checking numep 2, klass 00, interface.klass 08, protocol 50/00-01?01
    BulkOnly: checking numep 2, klass 00, subklass 00
    BulkOnly: checking protocol 00, interface.klass 08, interface.subklass 06
    BulkOnly: checking interface.protocol 50
    BS SetInterface
    ep: 0x00 bmAttributes: 0x02 index: 1
    
    ep: 0x01 bmAttributes: 0x02 index: 2
    
    BS Start, speed: 2
    BS Start
    GetMaxLUN 0x00
    MaxLUN 0
    Inquiry 0x24 0x00
    LUN 0 `KingstonDataTraveler 3.0'
    Qualifier 0 Device type 00 RMB 1 SSCS 0 SCSI version 06
    Device conforms to T10/1731-D (SPC-4) standards.
    CheckLUN...
    7
    >>>>>>>>>>>>>>>>CAPACITY OK ON LUN 0
    039a33f300000200
    
    7
    Checked LUN...
    Onstart begin
    BS configured
    I also tried compiling "UHS_FS_NEW_DEMO.ino" in "UHS_KINETIS_FS_HOST" and got this error:

    Code:
    Generating function prototypes...
    /home/wwatson/arduino-1.8.15/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=154 -DARDUINO=10815 -DARDUINO_TEENSY36 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wwatson/arduino-1.8.15/hardware/teensy/avr/cores/teensy3 -I/home/wwatson/Arduino/libraries/RTClib -I/home/wwatson/Arduino/libraries/UHS_host -I/home/wwatson/Arduino/libraries/ISR_safe_memory -I/home/wwatson/arduino-1.8.15/hardware/teensy/avr/libraries/Wire -I/home/wwatson/arduino-1.8.15/hardware/teensy/avr/libraries/SPI -I/home/wwatson/Arduino/libraries/UHS_ByteBuffer -I/home/wwatson/Arduino/libraries/UHS_FS /tmp/arduino_build_159496/sketch/UHS_FS_NEW_DEMO.ino.cpp -o /tmp/arduino_build_159496/preproc/ctags_target_for_gcc_minus_e.cpp
    /home/wwatson/arduino-1.8.15/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_159496/preproc/ctags_target_for_gcc_minus_e.cpp
    Compiling sketch...
    /home/wwatson/arduino-1.8.15/hardware/teensy/../tools/precompile_helper /home/wwatson/arduino-1.8.15/hardware/teensy/avr/cores/teensy3 /tmp/arduino_build_159496 /home/wwatson/arduino-1.8.15/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=154 -DARDUINO=10815 -DARDUINO_TEENSY36 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/wwatson/arduino-1.8.15/hardware/teensy/avr/cores/teensy3 /tmp/arduino_build_159496/pch/Arduino.h -o /tmp/arduino_build_159496/pch/Arduino.h.gch
    /home/wwatson/arduino-1.8.15/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -mno-unaligned-access -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=154 -DARDUINO=10815 -DARDUINO_TEENSY36 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/tmp/arduino_build_159496/pch -I/home/wwatson/arduino-1.8.15/hardware/teensy/avr/cores/teensy3 -I/home/wwatson/Arduino/libraries/RTClib -I/home/wwatson/Arduino/libraries/UHS_host -I/home/wwatson/Arduino/libraries/ISR_safe_memory -I/home/wwatson/arduino-1.8.15/hardware/teensy/avr/libraries/Wire -I/home/wwatson/arduino-1.8.15/hardware/teensy/avr/libraries/SPI -I/home/wwatson/Arduino/libraries/UHS_ByteBuffer -I/home/wwatson/Arduino/libraries/UHS_FS /tmp/arduino_build_159496/sketch/UHS_FS_NEW_DEMO.ino.cpp -o /tmp/arduino_build_159496/sketch/UHS_FS_NEW_DEMO.ino.cpp.o
    In file included from /home/wwatson/Arduino/libraries/UHS_host/UHS_host.h:64:0,
                     from /home/wwatson/Arduino/libraries/UHS_FS/examples/UHS_KINETIS_FS_HOST/UHS_FS_NEW_DEMO/UHS_FS_NEW_DEMO.ino:107:
    /home/wwatson/Arduino/libraries/UHS_host/UHS_KINETIS_FS_HOST/UHS_KINETIS_FS_HOST.h:215:22: error: variable or field 'uint8_t' declared void
             virtual void uint8_t vbusPower(uint8_t port, VBUS_t state) {
                          ^
    /home/wwatson/Arduino/libraries/UHS_host/UHS_KINETIS_FS_HOST/UHS_KINETIS_FS_HOST.h:215:22: error: expected ';' at end of member declaration
    /home/wwatson/Arduino/libraries/UHS_host/UHS_KINETIS_FS_HOST/UHS_KINETIS_FS_HOST.h:215:66: warning: ISO C++ forbids declaration of 'vbusPower' with no type [-fpermissive]
             virtual void uint8_t vbusPower(uint8_t port, VBUS_t state) {
                                                                      ^
    /home/wwatson/Arduino/libraries/UHS_host/UHS_KINETIS_FS_HOST/UHS_KINETIS_FS_HOST.h:215:30: error: conflicting return type specified for 'virtual int UHS_KINETIS_FS_HOST::vbusPower(uint8_t, VBUS_t)'
             virtual void uint8_t vbusPower(uint8_t port, VBUS_t state) {
                                  ^
    In file included from /home/wwatson/Arduino/libraries/UHS_host/UHS_host.h:49:0,
                     from /home/wwatson/Arduino/libraries/UHS_FS/examples/UHS_KINETIS_FS_HOST/UHS_FS_NEW_DEMO/UHS_FS_NEW_DEMO.ino:107:
    /home/wwatson/Arduino/libraries/UHS_host/UHS_usbhost.h:110:32: error:   overriding 'virtual uint8_t UHS_USB_HOST_BASE::vbusPower(uint8_t, VBUS_t)'
             virtual uint8_t UHS_NI vbusPower(NOTUSED(uint8_t port), NOTUSED(VBUS_t state)) {
                                    ^
    Using library RTClib in folder: /home/wwatson/Arduino/libraries/RTClib (legacy)
    Using library UHS_host in folder: /home/wwatson/Arduino/libraries/UHS_host (legacy)
    Using library ISR_safe_memory in folder: /home/wwatson/Arduino/libraries/ISR_safe_memory (legacy)
    Using library Wire at version 1.0 in folder: /home/wwatson/arduino-1.8.15/hardware/teensy/avr/libraries/Wire 
    Using library SPI at version 1.0 in folder: /home/wwatson/arduino-1.8.15/hardware/teensy/avr/libraries/SPI 
    Using library UHS_ByteBuffer in folder: /home/wwatson/Arduino/libraries/UHS_ByteBuffer (legacy)
    Using library UHS_FS in folder: /home/wwatson/Arduino/libraries/UHS_FS (legacy)
    Error compiling for board Teensy 3.6.
    Maybe it's me but before the updates it would compile but when uploaded the T3.6 would hang.

  5. #605
    Senior Member xxxajk's Avatar
    Join Date
    Nov 2013
    Location
    Buffalo, NY USA
    Posts
    590
    Kinetis is for Teensy 3.[012] :-) The other is for MAX3421E on SPI, and yes, you can use that (up to two MAX3421E) plus native USB at the same time, AND SDcard after 2 simple soldering modifications.
    Configuring returned 00 <-- means it was successful.
    mount isn't happening because your storage has a volume label. Remove the label (make it blank) and it will work with the demo.

  6. #606
    Senior Member wwatson's Avatar
    Join Date
    Aug 2017
    Posts
    535
    @xxxajk - Cool, that did it With HUB and without HUB.

    Output:
    Code:
    USB HOST READY.
    No media. Waiting to mount /
    / mounted.
    Removing '/HeLlO.tXt' file... completed with 4
    
    Starting Write test...
    File opened OK, fd = 1
    Wrote 19 bytes, File closed result = 0.
    
    Starting Read test...
    File opened OK, fd = 1, displaying contents...
    ]-[ello \/\/orld!
    
    Read completed, last read result = -1 (20), file close result = 0.
    Testing rename
    file rename result = 0.
    
    Removing '/10MB.bin' file... completed with 0
    10MB write timing test  10240 writes, (0), (0),  18983 ms (19 sec)
    completed with 0
    10MB read timing test 10240 reads, (20),  10490 ms (10 sec)
    completed with 0
    Directory of '/'
    -rw--a     10485760 2021-08-27 16:10:14 10MB.bin
    -rw--a           19 2021-08-27 16:09:54 newtest.txt
    30916788224 bytes available on disk.
    
    Flushing caches...
    Remove and insert media...
    Edit: Will try more devices this weekend

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •